RPG IV Words with Special Functions/Reserved Words
The RPG IV reserved words listed below have special functions within a program.
The following reserved words allow you to access the job date, or a portion of it, to be used in the program:
UDATE
*DATE
UMONTH
*MONTH
UYEAR
*YEAR
UDAY
*DAY
The following reserved words can be used for numbering the pages of a report, for record sequence numbering, or to sequentially number output fields:
PAGE
PAGE1-PAGE7
Figurative constants are implied literals that allow specifications without referring to length:
*BLANK/*BLANKS
*ZERO/*ZEROS
*HIVAL
*LOVAL
*NULL
*ON
*OFF
*ALLX'x1..'
*ALLG'oK1K2i'
*ALL'X..'
The following reserved words are used for positioning database files. *START positions to beginning of file and *END positions to end of file.
*END
*START
The following reserved words allow RPG IV indicators to be referred to as data:
*IN
*INxx
The following are special words used with date and time:
*CDMY
*CMDY
*CYMD
*DMY
*EUR
*HMS
*ISO
*JIS
*JOB
*JOBRUN
*JUL
*LONGJUL
*MDY
*SYS
*USA
*YMD
The following are special words used with translation:
*ALTSEQ
*EQUATE
*FILE
*FTRANS
*PLACE allows repetitive placement of fields in an output record. (See *PLACE for more information.)
*ALL allows all fields that are defined for an externally described file to be written on output. (See Rules for Figurative Constants for more information on *ALL)
The following are special words used within expressions:
AND
NOT
OR
Note:
NOT can only be used within expressions. It cannot be used as a name anywhere in the source.
The following are special words used with parameter passing:
*NOPASS
*OMIT
*RIGHTADJ
*STRING
*TRIM
*VARSIZE
The following special words aid in interpreting the event parameter in an event handling procedure for the XML-SAX operation code: