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:
- XML_ATTR_UCS2_REF
- XML_ATTR_NAME
- XML_ATTR_PREDEF_REF
- XML_ATTR_CHARS
- XML_CHARS
- XML_COMMENT
- XML_UCS2_REF
- XML_PREDEF_REF
- XML_DOCTYPE_DECL
- XML_ENCODING_DECL
- XML_END_CDATA
- XML_END_DOCUMENT
- XML_END_ELEMENT
- XML_END_PREFIX_MAPPING
- XML_EXCEPTION
- XML_PI_TARGET
- XML_PI_DATA
- XML_STANDALONE_DECL
- XML_START_CDATA
- XML_START_DOCUMENT
- XML_START_ELEMENT
- XML_START_PREFIX_MAPPING
- XML_UNKNOWN_ATTR_REF
- XML_UNKNOWN_REF
- XML_VERSION_INFO
- XML_END_ATTR