|
The system tests for the presence of the input record
exit by examining field RTDAIREX in the routing data area. If this
field is zeros or blanks, the Network Print Facility assumes
no input record exit is to be used. If this field is something else,
it uses this name in a conditional LOAD to the input record exit and
saves its address. This address is used to access the exit on all
calls.
The input record exit is invoked for 4 conditions.
The specific condition can be determined by checking the field RTDAFUNC
in the routing data area. The four conditions explained below are:
open, put, close, and term/release. - OPEN
- The system is preparing to process a print file. It is about to
allocate and open the QSAM file to contain the data to be passed.
The input record exit should prepare itself as follows:
- Obtain program storage, if necessary. For the JES capture point,
this should be necessary only on the first OPEN issued by a (JES)
logical printer. For the VTAM® capture point, this is necessary for each print file. The address
of this storage is stored in the area pointed to by IRESTRG and is
returned for any processing related to this logical printer/file.
- Get addressability to the routing data area. The address of the
RDA is in field IRERTD in the parameter area. Use the DSECT RTDATA,
generated using the EZAPPFCD RDA=DSECT macro.
- Examine the field RTDARTYP. If it is not acceptable, it can be
changed to one of the following record fowmats:
- Value
- Meaning
- FB
- File will be allocated as fixed blocked records.
- FBA
- File will be allocated as fixed blocked records with ASA carriage
control.
- FBM
- File will be allocated as fixed blocked records with machine carriage
control.
- VB
- File will be allocated as variable blocked records.
- VBA
- File will be allocated as variable blocked records with ASA carriage
control.
- VBM
- File will be allocated as variable blocked records with machine
carriage control.
- Examine the field RTDARECL. This field specifies the logical
record length to be used for the QSAM file. If the file format is
VB, VBA or VBM, this specifies the maximum record length. If the
file format is FB, FBA or FBM, it specifies the actual record length.
If the value is not acceptable, it can be changed but with the following
considerations:
- If the record format is FB, FBA or FBM, and this length is greater
than the length of records passed from the capture point, the records
are padded to the right with blanks. This might cause unpredictable
results including the insertion of additional blank lines on the printed
output. The exit must avoid this condition by reformatting the data
as it is processed.
- If the record format is FB, FBA or FBM, and this length is less
than the length of records passed from the capture point, the records
are split, resulting in multiple printed lines for each line received
from the capture point. The exit must avoid this condition by reformatting
the data as it is processed.
- If the record format is VB, VBA or VBM, this length is the maximum
record length and includes the 4-byte LLbb field preceding each record.
- Examine the field RTDABLKS. This field specifies the blocksize
to be used in the QSAM file. If the value is not acceptable it can
be changed, with the following considerations:
- If the record format is FB, FBA or FBM, it must be an even multiple
of the value in RTDARECL.
- If the record format is VB, VBA or VBM, it must be a minimum of
the value in RTDARECL plus 4.
- Examine the field RTDABUFS. This field specifies the buffer size
to be passed to the exit for PUT processing. If this buffer size
is not acceptable, it can be changed. It must have a minimum value
of the value in RTDARECL plus 2.
- PUT
- Network Print Facility is about to place a record of print data on the file for processing.
The data is located in a buffer and the address and length of the
data is passed to the input record exit via the parameter list. The
input record exit performs three functions:
- It modifies the data. For this purpose, there are two bytes of
buffer space in front of the data, which is used by the exit to expand
the record to the left. The amount of buffer space to the right is
equal to the buffer size minus the record length minus 2. If the exit
moves the record within the buffer or moves it to another buffer,
it must replace the address and length of the data in the parameter
list fields.
- The input record exit specifies the disposition of the data by
using the IREWFLG as follows:
- Value
- Meaning
- X'00'
- Write the data to the file.
- X'01'
- Do not write the data to the file.
- The input record exit controls the logic of the capture point
using the field IRERFLG as follows:
- Value
- Meaning
- X'00'
- Do not re-invoke the input record exit until the next data record
has been obtained or the file is to be closed.
- X'01'
- Re-invoke the input record exit without a new input buffer before
returning to the capture point. This permits the input record exit
to insert additional data.
- X'02'
- This option is available for JES only. It tells the capture point
to restart processing at the beginning of the spool file.
- CLOSE
- Processing for CLOSE is similar to processing for PUT. The following
exceptions must be observed:
- The data address and length fields will have no meaning at invocation.
If the exit wants to write an additional data record to the file,
it must place the address and length of the data in these fields.
- Unless the input record exit provides data to be written to the
file, IREWFLG must be set to X'01'.
- A value of X'00' in IRERFLG is interpreted as 'continue with CLOSE
processing. Thus, if the exit specifies this value, it will be the
last time the exit is invoked related to this file.
- A value of X'02' in IRERFLG is currently not supported for CLOSE.
- TERM/RELEASE
- The exit is invoked at this time to allow it to free any resources
such as storage that it might have obtained.
|