OPERATION CODE ARGUMENTS


Operation arguments are used in factor 1 or factor 2 of an operation. They are normally associated with a specific operation and are typically used to identify a specific reserved name or function.

Table 1.13: Operation Code Arguments

Control Value

Operation Code

Description

*ENTRY

PLIST

The *ENTRY parameter list identifies the parameter list used to pass parameters into and return parameters from the program.

*INZSR

BEGSR

The *INZSR subroutine, if specified in the program, is called by the RPG cycle before 1P output.

*LIKE

DEFINE

The *LIKE DEFINE op code is used to define a new field, based on the attributes of another field. The types of fields that can be defined with *LIKE DEFINE are character and packed decimal.

*LOCK

IN

OUT

The *LOCK IN op code is used to read a data area and then to place an object lock on that data area.

The *LOCK OUT op code is used to write a data area and retain the object lock.

*LDA

DEFINE

The *DTAARA DEFINE *LDA op code is used to assign a variable to receive the contents of the local data area.

*PDA

DEFINE

The *DTAARA DEFINE *PDA op code is used to assign a variable to receive the program initialization parameters.

*DTAARA

DEFINE

IN

OUT

The *DTAARA DEFINE op code is used to declare the entry in factor 2 as a data area. An optional field name can be specified in the result field. If factor 2 is not specified, the field name in the result field is used as the data-area name.

The IN *DTAARA operation is used to read all data areas defined in the program. If *LOCK IN *DTAARA is specified, all data areas defined in the program are read and an object lock is placed on each one.

The OUT *DTAARA operation is used to write (i.e., output) all data areas defined in the program. If *LOCK OUT *DTAARA is specified, all data areas are written and any object locks are retained.

*PSSR

BEGSR

The *PSSR subroutine, if specified in the program, is called by the RPG exception/error handling routine whenever an unmonitored error occurs.

*END

SETLL

The *END SETLL operation positions the file cursor for a database file to the end of the database file.

*START

SETLL

The *START SETLL operation positions the file cursor to the beginning of the file.




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net