PRINT CALL (Print an IMS segment)
This function prints the current segment in the format specified.
Returns zero if successful, otherwise nonzero.
Prints the segment contents stored in the INREC variable, in one of the following
formats:
- CHAR
- Prints the segment as it is stored on the IMS database.
- HEX
- Prints three lines of data. The first line shows the character representation of each byte. The second and third lines show the hexadecimal value of each byte.
- SNGL
- Prints the segment split into individual fields down the report.
- TABL
- Prints the segment split into individual fields across the report.
The INREC variable contains the data of the current segment.
To print in SNGL or TABL format, you must have already loaded a view, by preceding this function call with a call to VIEWIMS.
IEB example using PRINT
⋮
$$FILEM IEB
⋮
$$FILEM PROC=*
filerc = VIEWIMS('TPLDSN=FMN.IMS.IVP.TEMPLATE')
filerc = GETIMS('SEGMENT=SUBURB ',
' WHERE SEGMENT=SUBURB #SUBURB-NAME=CITY BEACH')
PRINT(INREC,CHAR)
PRINT(INREC,HEX)
PRINT(INREC,SNGL)
PRINT(INREC,TABL)
/+
⋮