Collapse all | Expand all
Dynamic distribution and selecting NO PRINT
Example first prints the data to the output page. Then using
PRINTIF either PRT01 or PRT02 is loaded to buffer 4 depending on whether line one of the spool file has 01 or 02 in character positions 1 and 2. Then character positions 1 and 2 of line one are loaded to buffer 1 to trigger the Dynamic Distribution function. Reference line 5 looks in line 2 for "NO PRINT" and clears buffer 1 if it finds it so the Dynamic Print function in reference line 6 isn't triggered (because there is no data in the buffer) and the page isn't printed. Finally, reference 6 uses the
Dynamic Distribution function to route the page to the appropriate outq.
download
Dynamic printing to more than one printer
Example shows how the SUBTABLE function can be used to load the
outq into a buffer and use the buffer in the DYNAMIC DISTRIBUTION
function to control where the page prints.
download
Report formatting for 80/132/198 characters
Example shows how to set up a form to handle reports of varying
column widths. The form prints landscape to accommodate reports
198 characters wide. The first three references load the form page
to buffer line 1. Each set of page controls gets loaded to the buffer
but gets replaced by the next reference line if there is data in
character positions beyond those selected in the previous reference.
Finally, the Distributed Print function is used to distribute the
page to the appropriate outq based on a 01 or a 02 in the first line,
position 1 and 2 of the spool file.
download
Form distribution based on spool file input queue
Example retrieves the outque attribute of the spool file using the EXTRACT function and loads it in buffer 2. Form pages 1 and 2 are printed to the outques set up in the batch job controller. Pages 3 and 4 are printed to the outque loaded in buffer 3 by concatenating part of the outque attribute in buffer 2 with either A, B, C or D, depending on the outque attribute.
download