[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
HP COBOL
|
Previous | Contents | Index |
<>
CARD-READER IS THE-CARDS CONSOLE IS LOCAL-USER |
C01 IS STARTING-NEW-FORM |
WRITE REPORT-REC AFTER STARTING-NEW-FORM. |
SWITCH 1 IS FIRST-SWITCH ON IS ONE-ON OFF IS ONE-OFF SWITCH-4 ON FOUR-ON |
Condition | Truth Value |
---|---|
IF FOUR-ON | false |
IF ONE-ON | true |
IF NOT ONE-OFF | true |
IF ONE-ON AND NOT FOUR-ON | true |
ALPHABET EB-CONV IS EBCDIC |
ALPHABET ALPH-B IS "A" THRU "Z" "9" THRU "0" " " ALSO "/" ALSO "\" "," |
Statements | Truth Value |
---|---|
MOVE "A" TO ITEMA.
MOVE "9" TO ITEMB. IF ITEMA < ITEMB |
true |
MOVE " " TO ITEMA.
MOVE "\" TO ITEMB. IF ITEMA = ITEMB AND ITEMB > "Z" |
true |
MOVE "1" TO ITEMA.
MOVE "9" TO ITEMB. IF ITEMA < ITEMB |
false |
ALPHABET ALPH-C IS 128 THRU 1 |
Statements | Truth Value |
---|---|
MOVE "A" TO ITEMA.
MOVE "B" TO ITEMB. IF ITEMA < ITEMB |
false |
MOVE "9" TO ITEMA.
IF ITEMA < "2" |
true |
MOVE "HELLO" TO ITEMA.
IF ITEMA > SPACES |
false |
SYMBOLIC CHARACTERS ESCAPE POUND DOUB-L ARE 28 36 55. |
DISPLAY "Enter value" ESCAPE POUND DOUB-L. |
CURRENCY SIGN "G" . . . 01 ITEMA PIC X(5). 01 ITEMB PIC X(5). 01 ITEMC PIC GG,GG9.99. 01 ITEMD PIC ZZZ.ZZ9,99. 01 ITEME PIC ZZZ,. |
Statement | ITEMC Result |
---|---|
MOVE 12.34 TO ITEMC | sssG12.34 |
MOVE 100 TO ITEMC | ssG100.00 |
MOVE 1000 TO ITEMC | G1,000.00 |
CURRENCY SIGN IS "G" CURRENCY SIGN IS "USD" WITH PICTURE SYMBOL "U" CURRENCY SIGN IS "DM" WITH PICTURE SYMBOL "D" CURRENCY SIGN IS "M". . . . 01 ITEMA PIC GG,GG9.99. 01 ITEMB PIC U,UUU,UU9.99. 01 ITEMC PIC DD,DD9.99. 01 ITEMD PIC MMM,MM9.99. |
Statement | Result |
---|---|
MOVE 12.34 TO ITEMA | ITEMA = sssG12.34 |
MOVE 1000 TO ITEMB | ITEMB = USD1,000.00 |
MOVE 12.34 TO ITEMC | ITEMC = ssDM12.34 |
MOVE 1000 TO ITEMD | ITEMD = sM1,000.00 |
01 ITEMA PIC X(5). 01 ITEMB PIC X(5). 01 ITEMC PIC GG,GG9.99. 01 ITEMD PIC ZZZ.ZZ9,99. 01 ITEME PIC ZZZ,. |
Statement | ITEMD Result |
---|---|
MOVE 1 TO ITEMD | ITEMD = ssssss1,00 |
MOVE 1000 TO ITEMD | ITEMD = ss1.000,00 |
MOVE 1,1 TO ITEMD | ITEMD = ssssss1,10 |
MOVE 12 TO ITEME | ITEME = s12, |
SPECIAL-NAMES. CURSOR IS CURSOR-POSITION. DATA DIVISION. WORKING-STORAGE SECTION. 01 CURSOR-POSITION. 02 CURSOR-LINE PIC 99. 02 CURSOR-COL PIC 99. |
SPECIAL-NAMES. SYMBOLIC CHARACTERS FKEY-10-VAL ARE 11 CRT STATUS IS CRT-STATUS. DATA DIVISION. WORKING-STORAGE SECTION. 01 CRT-STATUS. 03 KEY1 PIC 9. 03 KEY2 PIC X. 88 FKEY-10 VALUE FKEY-10-VAL. 03 FILLER PIC X. . . . ACCEPT MENU-SCREEN. IF KEY1 EQUAL "0" PERFORM OPTION_CHOSEN ELSE IF KEY1 EQUAL "1" AND FKEY-10 DISPLAY "You pressed the F10 key; exiting..." LINE 22. |
Previous | Next | Contents | Index |