Output from the Begin Data Set exit

At return, restore the contents of all registers. Do not set a return code in register 15.

The exit can set these fields in the ANFUEXTP control block:

XTPWORK1
Address of a work area, or zeros. For information about how to use work areas, see Programming considerations.
XTPWORK2
Address of a work area, or zeros. For information about how to use work areas, see Programming considerations.
XTPRCFLG
Flags to request that IP PrintWay™ add a record and specify characteristics of the new record.
Tips:
  1. IP PrintWay sets all flags to B'0' before it calls the exit.
  2. If the exit does not add a record on the first call to the exit (XTPRCEXT=0), IP PrintWay does not call the exit again regardless of whether flag XTPRLAST is set. That is, the exit must add at least one record for the exit to be called more than once.
  3. If the exit adds a record (XTPRCEXT=1) on any call to the exit, set the XTPRLAST flag if it is the last record. This tells IP PrintWay to not call the exit again.
Flag meanings when set to B'1':
XTPRCTRN
Translate data in the new record to the printer code page specified in the printer definition. Also, IP PrintWay adds a CRLF instruction (X'0D0A') to the end of the data to start a new line. This can cause a blank line to be printed if the new record does not contain any data.
Tip: To avoid a blank line when the exit adds a printer instruction, code the printer instruction in hexadecimal and do not set this flag.
XTPRCCC
The new record contains a carriage control character in column 1.
XTPRLAST
Do not call this exit again to add another record to the beginning of this data set.
XTPRCEXT
Add the record whose address is in field XTPERPTR.
XTPRCDBL
The new record contains double-byte characters.
XTPMSGFL
Flags indicating the destination of a message that is created by this exit. IP PrintWay sets these flags to B'0' before it calls the exit. Put the address of the message in field XTPMSGP and the length of the message in field XTPMSGLN.
Flag meanings when set to B'1':
XTPM2CON
IP PrintWay basic mode writes the message to the console. IP PrintWay extended mode writes the message to both the console and the Infoprint Server common message log.
XTPM2MDS
IP PrintWay basic mode writes the message to the IP PrintWay message-log data set. IP PrintWay extended mode writes the message to both the Infoprint Server common message log and the console.
XTPMSGLN
Length of the message whose address is in field XTPMSGP.
XTPMSGP
Address of a message that is created by this exit. IP PrintWay adds message ID ANFM155I (basic mode) or AOP3003I (extended mode) to the beginning of this message.
XTPERPTR
Address of the record to be added.
XTPERLEN
Length of the record to be added.
XTP_MISC_FLAGS
Flags containing miscellaneous information when set to B'1':
XTP_TRANS_DOC_HEADER
Indicates that IP PrintWay translates the document header to the printer code page that is specified in the printer definition before it sends the header to the printer.
XTP_TRANS_DOC_TRAILER
Indicates that IP PrintWay translates the document trailer to the printer code page that is specified in the printer definition before it sends the trailer to the printer.
XTP_DOC_HEADER_PTR
The address of a 292-byte area that contains the document header. IP PrintWay sends the document header to the printer at the beginning of the data set and at the beginning of each subsequent copy of the data set. Specify the length of the document header in the XTP_DOC_HEADER_LENGTH field.
Rules:
  1. Do not change the address in this field. You can change the data in the 292-byte area that this field points to.
  2. The document header cannot exceed 292 bytes.
  3. Set the XTP_TRANS_DOC_HEADER flag to indicate whether IP PrintWay translates the document header to the printer code page specified in the printer definition.
  4. Do not specify these values, which are allowed only in a printer definition:
    <ESC> <CR> <FF> <LF> <SP>
XTP_DOC_TRAILER_PTR
The address of a 292-byte area that contains the document trailer. IP PrintWay sends the document trailer to the printer at the end of the data set and at the end of each subsequent copy of the data set.
Rules:
  1. Do not change the address in this field. You can change the data in the 292-byte area that this field points to.
  2. Specify the length of the document trailer in XTP_DOC_TRAILER_LENGTH.
  3. The document trailer cannot exceed 292 bytes.
  4. Set XTP_TRANS_DOC_TRAILER to indicate whether IP PrintWay must translate the document trailer to the printer code page specified in the printer definition.
  5. Do not specify these values, which are allowed only in a printer definition:
    <ESC> <CR> <FF> <LF> <SP>
XTP_DOC_HEADER_LENGTH
The length of the document header. XTP_DOC_HEADER_PTR contains the address of the document header. If you do not want to change the document header that is specified in the printer definition, do not change the value in this field. If you do not want a document header at all, specify -1.
XTP_DOC_TRAILER_LENGTH
The length of the document trailer. XTP_DOC_TRAILER_PTR contains the address of the document trailer. If you do not want to change the document trailer that is specified in the printer definition, do not change the value in this field. If you do not want a document trailer at all, specify -1.
XTPOPTNS
The transmission options. For the field names, see the ANFUEXTP macro. For each option, there are two fields:
  • The first field contains the length of the value. A number greater than zero indicates that the next field contains a valid value.
  • The second field contains the value for the option.
If you add or change a value for one of the options, also set the length in the length field.