The Print CPYSPL2 command provides an inverse function of the
CPYSPLF2 TAA function. CPYSPLF2 creates a data base file from a
spooled input file with blank lines and a new page indication. This
allows a display of the data using a program rather than DSPSPLF.
PRTCPYSPL2 reads the outfile created by CPYSPLF2 and re-generates a
spooled file.
A typical CPYSPLF2 command would be:
CPYSPLF2 FILE(PRTME) TOFILE(LIB1/PRINTP)
The spooled file PRTME would be read and written to the PRINTP file
in LIB1. You must first create the TOFILE which should have the same
length as the printer width (such as 132).
At some later point you can re-generate the spooled file by:
PRTCPYSPL2 FILE(LIB1/PRINTP) SPLFNAME(PRTME)
The CPYSPLF2 command does not capture any of the attributes of the
spooled file (such as CPI or LPI). PRTCPYSPL2 uses a standard
printer file TAAPRT1 in TAATOOL which may not have the attributes
needed for your output.
TAAPRT1 was created using the default values of CRTPRTF such as 66
lines to the page, a printer width of 132, LPI = 6, CPI = 10, etc.
The PRTCPYSPL2 program issues an override to TAAPRT1 with certain
parameters specified. The page size width is determined by accessing
the record length of the file to be read.
PAGESIZE(*N nnn)
USRDTA(PRTCPYSPL2)
SPLFNAME(from the command parameter)
SECURE(*NO)
Because SECURE(*NO) is specified, you may issue an OVRPRTF command
prior to PRTCPYSPL2 to override any of the values (including those
specified within the program). Because overrides merge if they are
specified at different program stack levels, you can combine what is
requested in the program with your own requirements.
For example, if you want 8 lines per inch, you would specify:
OVRPRTF FILE(TAAPRT1) LPI(8)
PRTCPYSPL2 ...
If you override a value that is specified within the program, your
value takes precedence. For example,
OVRPRTF USRDTA(xxx)
PRTCPYSPL2 ...
The PRTCPYSPL2 program is coded to allow up to 378 bytes to be
printed (the largest width allowed for spooled output). If you
display the spooled file after it is created, you will see Record
Length = 378. The Page size width value will be set to the record
length of the file that is read.
You can override the width if needed. For example, assume you used
CPYSPLF2 to output to a file with a record length of 132, but the
data is only 80 bytes and the page width when printed should be 80.
You may issue an override such as:
OVRPRTF PAGESIZE(*N 80)
PRTCPYSPL2 ...
You may also override to your own printer file such as:
OVRPRTF FILE(TAAPRT1) TOFILE(xxx)
PRTCPYSPL2 ...
PRTCPYSPL2 escape messages you can monitor for
----------------------------------------------
None. Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
FILE The qualified name of the file to be printed. The
file must have been created by the CPYSPLF2 TAA
command or have identical data.
The library defaults to *LIBL. A specific library
or *CURLIB may be used.
MBR The member of the file to be printed. The default
is *FIRST.
SPLFNAME The name of the spooled file to be output. The
default is *FILE meaning to use the name assigned to
the FILE parameter.
NEWPAGE The value that was specified on CPYSPLF2 to indicate
a new page. This value appears in positions 1-15 of
a record. The default value is **NEWPAGE** which is
the default value used for CPYSPLF2.
Restrictions
------------
None.
Prerequisites
-------------
The following TAA Tools must be on your system:
HLRMVMSG HLL Remove message
RTVDBFA Retrieve data base file attributes
SNDCOMPMSG Send completion message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
PRTCPYSPL2 *CMD TAASPNP QATTCMD
TAASPNPC *PGM CLP TAASPNPC QATTCL
TAASPNPR *PGM RPG TAASPNPR QATTRPG
|