PRINT CALL (Print an IMS segment)


1 PRINT (INREC,
2.1! CHAR
2.1 HEX
2.1 SNGL
2.1 TABL
1)

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)
/+
⋮