COBOL Manual for TNS/E Programs (H06.03+)
Contents
HP COBOL Manual for TNS/E Programs—520347-003
xxxiii
Examples (continued)
Examples (continued)
Example 9-1. ACCEPT Statement Reading From a Terminal 9-4
Example 9-2. ACCEPT Statement Reading Alphanumeric Data 9-4
Example 9-3. ACCEPT Statement Reading Numeric Data 9-5
Example 9-4. ACCEPT Statements Reading Current Data and Time 9-8
Example 9-5. ADD CORRESPONDING Statement 9-16
Example 9-6. ALTER Statement 9-17
Example 9-7. Alternative to ALTER Statement 9-17
Example 9-8. Called Program That Calls Another Program 9-28
Example 9-9. COMPUTE Statement 9-40
Example 9-10. Combination of IF and COMPUTE Statements 9-41
Example 9-11. CONTINUE Statement 9-41
Example 9-12. DELETE Statement 9-44
Example 9-13. DISPLAY Statement 9-45
Example 9-14. DIVIDE INTO Statement With GIVING and REMAINDER
Phrases 9-54
Example 9-15. DIVIDE BY Statement With GIVING and REMAINDER
Phrases 9-54
Example 9-16. Calling a pTAL Routine That Does Not Ignore Trailing Spaces 9-59
Example 9-17. EVALUATE Statement as “Case” Statement 9-63
Example 9-18. EVALUATE Statement With Both Ranges and Discrete Values 9-63
Example 9-19. EVALUATE Statement With Two Distinct Subjects 9-63
Example 9-20. EVALUATE Statement as a Decision Table 9-64
Example 9-21. EXIT PERFORM Statement 9-69
Example 9-22. EXIT PERFORM CYCLE Statement 9-70
Example 9-23. EXIT Statement in Nested In-Line PERFORM Statement 9-72
Example 9-24. Three-Way Conditional GO TO Statement 9-74
Example 9-25.
Simple Conditional IF Statement 9-81
Example 9-26.
Delimited-Scope IF Statement 9-81
Example 9-27. Simple Conditional IF ELSE Statement 9-81
Example 9-28. Delimited-Scope IF ELSE Statement 9-81
Example 9-29. IF ELSE Statement Nested Within PERFORM Statement 9-81
Example 9-30. Delimited-Scope IF ELSE Statement Nested Within PERFORM
Statement 9-81
Example 9-31. Nested Conditional IF Statements 9-82
Example 9-32. Delimited-Scope IF Statement 9-82
Example 9-33. INITIALIZE Statements 9-84
Example 9-34. INITIALIZE Statement 9-85
Example 9-35. INSPECT TALLYING With One Compare-String 9-91










