| Factor 1 | Op Code | Factor 2 | Result | Length | Dec | Resulting Ind. | ||
|---|---|---|---|---|---|---|---|---|
| workstn device ID | ACQ | workstn file name | [error] | |||||
| [numeric value] | ADD(H) | numeric value | sum | [size] | [dec] | [+] | [-] | [ 0 ] |
| [base date/time] | ADDDUR | duration:dur code | new date/time | |||||
| ALLOC | num of bytes | pointer variable | [error] | |||||
| compare value 1 | ANDxx | compare value 2 | ||||||
| [subroutine name] | BEGSR | |||||||
| BITOFF | 'bit nums to set off' | char variable | [size] | |||||
| BITON | 'bit nums to set on' | char variable | [size] | |||||
| compare value 1 | CAB [1] | compare value 2 | [label] | [1>2] | [1<2] | [1=2] | ||
| compare value 1 | CABxx | compare value 2 | [label] | [1>2] | [1<2] | [1=2] | ||
| CALL | program name | [plist] | [error] | [LR] | ||||
| CALLB(D) | 'proc name' or ptr [2] | [plist] | [error] | |||||
| [compare value 1] | CASxx | [compare value 2] | subroutine | [1>2] | [1<2] | [1=2] | ||
| CALLP(E) | prototype-name[(parm1 : parm2 : … ]) | |||||||
| [operand 1] | CAT(P) | operand 2[:num blanks] | char variable | [size] | [error] | |||
| key value or rec num | CHAIN(N) | record format | n/f | [error] | ||||
| key value or rec num | CHAIN(N) | file name | [data struct] | n/f | [error] | |||
| check list | CHECK | base value[:start] | [position(s)] | [size] | [dec] | [error] | [found] | |
| check list | CHECKR | base value[:start] | [position(s)] | [size] | [dec] | [error] | [found] | |
| [*NOKEY] | CLEAR | [*ALL] | variable to clear | [size] | [dec] | |||
| CLOSE | file name | [error] | ||||||
| CLOSE | *ALL | [error] | ||||||
| [boundary] | COMMIT | [error] | ||||||
| compare value 1 | COMP [3] | compare value 2 | [1>2] | [1<2] | [1=2] | |||
| DEALLOC(N) | pointer variable | [error] | ||||||
| *LIKE | DEFINE | based-on variable | new variable | [ ][size] | [dec] | |||
| *DTAARA | DEFINE | [data area name] [4] | assignment | [size] | [dec] | |||
| [key value] | DELETE | file name | [n/f] | [error] | ||||
| [key value] | DELETE | record format | [n/f] | [error] | ||||
| [numerator] | DIV(H) | denominator | result | [size] | [dec] | [+] | [-] | [ 0 ] |
| [starting value] | DO | [iterations] | [counter] | [size] | [dec] | |||
| DOU | expression | |||||||
| compare value 1 | DOUxx | compare value 2 | ||||||
| DOW | expression | |||||||
| compare value 1 | DOWxx | compare value 2 | ||||||
| [message ID] | DSPLY | [*EXT] | [response] | [size] | [error] | |||
| [message ID] | DSPLY | [message queue] | [response] | [size] | [error] | |||
| [descriptive text] | DUMP (A) | |||||||
| ELSE | ||||||||
| ELSEIF | expression | |||||||
| END | [increment] | |||||||
| ENDCS | ||||||||
| ENDDO | [increment] [5] | |||||||
| ENDFOR | ||||||||
| ENDIF | ||||||||
| ENDMON | ||||||||
| ENDSL | ||||||||
| [label] | ENDSR | [return point] | ||||||
| EVAL(HMR) | result-value = expression | |||||||
| EVALR(HMR) | result-value = expression | |||||||
| EXCEPT | [except output label] | |||||||
| EXFMT | record format | [error] | ||||||
| EXSR | subroutine | |||||||
| EXTRCT | date var : dur code | extracted value | [size] | [dec] | [error] | |||
| FEOD | file name | [error] | ||||||
| FOR | Index = start TO | DOWNTO limit BY increment | |||||||
| FORCE | file name | |||||||
| GOTO | label | |||||||
| IF | expression | |||||||
| Compare value 1 | IFxx | compare value 2 | ||||||
| [*LOCK] | IN | data area | [error] | |||||
| [*LOCK] | IN | *DTAARA | [error] | |||||
| ITER |
| |||||||
| KFLD | Key field | |||||||
| Key list name | KLIST | |||||||
| LEAVE | ||||||||
| LEAVESR | ||||||||
| Search pattern | LOOKUP | array(starting elem) | [high] | [low] | [equal] | |||
| Search pattern | LOOKUP | table 1 | [Table 2] | [high] | [low] | [equal] | ||
| MHHZO | source | Char variable | [size] | |||||
| MHLZO | source | Char variable | [size] | |||||
| MLHZO | source | Char variable | [size] | |||||
| MLLZO | source | Char variable | [size] | |||||
| MONITOR | ||||||||
| [Date format][sep] [6] | MOVE(P) | source | target | [size] | [dec] | [+] | [-] | [0 or b] |
| MOVEA(P) | source | target | [size] | [dec] | [+] | [-] | [0 or b] | |
| [Date format][sep] | MOVEL(P) | source | target | [size] | [dec] | [+] | [-] | [0 or b] |
| [Numeric value] | MULT(H) | numeric value | product | [size] | [dec] | [+] | [-] | [ 0 ] |
| MVR | remainder | [size] | [dec] | [+] | [-] | [ 0 ] | ||
| workstn device ID | NEXT | workstn file name | [error] | |||||
| [occurrence to set to] | OCCUR | data structure | [occurrence] | [size] | [dec] | [error] | ||
| ON-ERROR | exception ID1 { : exception ID2… | *ALL | *PROGRAM | *FILE } | |||||||
| OPEN | file name | [error] | ||||||
| compare value 1 | ORxx | compare value 2 | ||||||
| OTHER | ||||||||
| [*LOCK] | OUT | data area | [error] | |||||
| [*LOCK] | OUT | *DTAARA | [error] | |||||
| [Input value] | PARM | [output value] | parameter | [size] | [dec] | |||
| Parameter list name | PLIST | |||||||
| [Workstn device ID] | POST | workstn file name [7] | [infds] | [error] | ||||
| READ(N) | record format | [error] | eof | |||||
| READ(N) | file name | [Data struct] | [error] | eof | ||||
| READC | subfile record format | [error] | eof | |||||
| [Key value] | READE(N) | record format | [error] | eof | ||||
| [Key value] | READE(N) | file name | [Data struct] | [error] | eof | |||
| READP(N) | record format | [error] | bof | |||||
| READP(N) | file name | [Data struct] | [error] | bof | ||||
| [Key value] | READPE(N) | record format | [error] | bof | ||||
| [Key value] | READPE(N) | file name | [Data struct] | [error] | bof | |||
| REALLOC | num of bytes | Pointer variable | [error] | |||||
| Workstn device ID | REL | workstn file name | [error] | |||||
| [*NOKEY] | RESET | [*ALL] | Variable to reset | [size] | [dec] | |||
| RETURN | ||||||||
| ROLBK | [error] | |||||||
| Search pattern[:length] | SCAN | search var[:start] | [position(s)] [8] | [size] | [dec] | [error] | [found] | |
| SELECT | ||||||||
| Key value | SETGT | file name | [n/f] | [error] | ||||
| Key value | SETGT | record format | [n/f] | [error] | ||||
| Key value | SETLL | file name | [n/f] | [error] | [found] | |||
| Key value | SETLL | record format | [n/f] | [error] | [found] | |||
| SETOFF | [ind1] | [ind2] | [ind3] | |||||
| SETON | [ind1] | [ind2] | [ind3] | |||||
| SHTDN | yes | |||||||
| SORTA | array | |||||||
| SQRT(H) | numeric value | Square root | [size] | [dec] | ||||
| [Numeric value] | SUB(H) | numeric value | difference | [size] | [dec] | [+] | [-] | [ 0 ] |
| [Date / time] | SUBDUR | duration:dur code | Date / time | [error] | ||||
| Date / time | SUBDUR | date / time | Duration:dur code | [size] | [dec] | [error] | ||
| [Length of source] | SUBST(P) | source var[:start] | Char variable | [size] | [error] | |||
| label | TAG | |||||||
| Format to test | TEST(D,T, Z) | Date / time variable | [error] | |||||
| TESTB | 'bit numbers to test' | Char variable | [size] | [xor] | [mix] | [equal] | ||
| TESTN | Char variable | [size] | [num] | [mix] | [blank] | |||
| TESTZ | Char variable | [size] | [+] | [-] | [other] | |||
| TIME | Date/time/numeric val | [size] | [dec] | |||||
| UNLOCK | data area | *DTAARA | [error] | ||||||
| UNLOCK | file name | [error] |
| |||||
| UPDATE | record format | [error] | ||||||
| UPDATE | file name | [Data struct] | [error] | |||||
| WHEN | expression | |||||||
| Compare value 1 | WHENxx | compare value 2 | ||||||
| WRITE | record format | [error] | [full] [9] | |||||
| WRITE | file name | [Data struct] | [error] | |||||
| XFOOT(H) | numeric array | Sum of array | [size] | [dec] | [+] | [-] | [ 0 ] | |
| From value : to value | XLATE(P) | source[:start] | Char variable | [size] | [error] | |||
| Z-ADD(H) | numeric value | Num variable | [size] | [dec] | [+] | [-] | [ 0 ] | |
| Z-SUB(H) | numeric value | Num variable | [size[ | [dec] | [+] | [-] | [ 0 ] | |
|
[1]If the result field (label) is not specified, at least one resulting indicator is required.
[2]A procedure pointer can be a quoted procedure name, a named constant (representing a quoted procedure name), or a pointer variable that has been declared with the PROCPTR keyword specified.
[3]At least one resulting indicator is required.
[4]If factor 2 is not specified, the result field is used as the name of the data structure.
[5]The increment value is valid for END and ENDDO operations associated with a DO op code.
[6]The date format can be any format supported by RPG IV, such as * MDY, *YMD, or * ISO.
[7]Factor 2 is optional when a workstation device file's INFDS data structure name is specified for the result field.
[8]If the result field is omitted, resulting indicator 3 is required.
[9]Resulting indicator 2 [full] is valid only for WRITE operations to a WORKSTN subfile detail record format. | ||||||||