Most operations may be used in an alternate calculation specification syntax. This syntax is known as free-format.
Free-format syntax does not use the traditional Factor 1, Factor 2, and the result field. Instead, positions 8 through 80 of the source line may be used specify the operation code and its parameters using free-format syntax.
Table 5.12 shows a list of the operation codes that may be used with the free format syntax. Values enclosed in {} are optional in the free-format syntax.
| Op Code | Extended Factor 2 |
|---|---|
| CALLP | Proc-name(parm1, parm2...) |
| DOU | Conditional expression |
| DOW | Conditional expression |
| EVALR | Result value = expression |
| EVAL | Result value = expression |
| FOR | Index [=start][ TO | DOWNTO [ BY increment ] |
| IF | Conditional expression |
| ON-ERROR | error condition codes |
| WHEN | Conditional expression |
| RETURN | Return value expression |
| ACQ{(E)} device-name workstn-file | IN{(E)} {*LOCK} data-area-name |
| BEGSR subroutine-name | ITER |
| {CALLP{(EMR)}} name({parm1{:parm2...}}) | LEAVE |
| CHAIN{(ENHMR)} search-arg {data-structure} | LEAVESR |
| CLEAR {*NOKEY} {*ALL} name | MONITOR |
| CLOSE{(E)} file-name | NEXT{(E)} program-device file-name |
| COMMIT{(E)} {boundary} | ON-ERROR {exception-id1 {:exception-id2...}} |
| DEALLOC{(EN)} pointer-name | OPEN{(E)} file-name |
| DELETE{(EHMR)} {search-arg} | OTHER |
| DOU{(MR)} indicator-expression | OUT{(E)} {*LOCK} data-area-name |
| DOW{(MR)} indicator-expression | POST{(E)} {program-device} file-name |
| DSPLY{(E)} {message {output-queue {response}}} | READ{(EN)} name {data-structure} |
| DUMP{(A)} {identifier} | READC{(E)} record-name |
| ELSE | READE{(ENHMR)} search-arg|*KEY {data-structure} |
| ELSEIF{(MR)} indicator-expression | READP{(EN)} name {data-structure} |
| ENDDO | READPE{(ENHMR)} search-arg|*KEY {data-structure} |
| ENDFOR | REL{(E)} program-device file-name |
| ENDIF | RESET{(E)} {*NOKEY} {*ALL} name |
| ENDMON | RETURN{(HMR)} expression |
| ENDSL | ROLBK{(E)} |
| ENDSR {return-point} | SELECT |
| {EVAL{(HMR)}} result = expression | SETGT{(EHMR)} search-arg |
| EVALR{(MR)} result = expression | SETLL{(EHMR)} search-arg |
| EXCEPT {except-name} | SORTA array-name |
| EXFMT{(E)} format-name | TEST{(EDTZ)} {dtz-format} field-name |
| EXSR subroutine-name | UNLOCK{(E)} name |
| FEOD{(EN)} file-name | UPDATE{(E)} name {data-structure|%FIELDS(name{:name...})} |
| FOR{(MR)} index {= start}{BY increment} {TO|DOWNTO limit} | WHEN{(MR)} indicator-expression |
| FORCE file-name | WRITE{(E)} name {data-structure} |
| IF{(MR)} indicator-expression |