The Copy Spooled File to IFS command copies a spooled file to the IFS
as a stream file. The default is to convert the spooled data to a
plain text format. Options exist to convert to a rich text format,
HTML format, or create a PDF. Blank lines are inserted so that the
stream file gives the same appearance as the spooled file. This
allows further use of spooled data to be handled by PC or Internet
applications.
When using a text or HTML format, spooled files that can be converted
by CPYSPLF (SCS) are supported (AFPDS cannot be used).
An option exists to allow the spooled file to be converted to a
format than can be re-converted to a spooled file on another system.
The intent of the function is to allow a spooled file on a source
system to be transferred to a target system as an E-mail attachment
and then made into a spooled file on the target system. Because
system APIs are used for the conversion, no restrictions exist as to
the data that can be placed in the spooled file (AFPDS may be used).
See the CPYIFSSPLF command to convert to a spooled file on the target
system.
CPYSPLFIFS uses the CPYTOSTMF default for the AUT parameter to set
the authority to a new stream file. If the stream file exists, no
authority change occurs.
A typical command would be:
CPYSPLFIFS FILE(xxx) TOSTMF(/home...)
The default for STMFTYPE is *TXT which causes a plain text format.
At each page break, a record is output that contains a value that
will identify the page break. The default is a long string of
dashes.
If CPYSPLFIFS is used in an interactive job and the stream file
already exists, the default for STMFOPT will cause a prompt that
allows the user to replace, add, or cancel.
The maximum spooled file with of 378 bytes is supported.
CPYSPLFIFS escape messages you can monitor for
----------------------------------------------
None. Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
FILE The spooled file name to be copied.
TOSTMF The path name of the stream file to which the data
is to be copied. The default is *GEN which means
the stream file will be placed in the current
directory. The system sets the current directory to
the home directory as specified in the user profile.
If the home directory does not exist, the root
directory ('/') is used.
The name of the stream file will be the spooled file
name and a 3 character extension (TXT, HTM, RTF, or
PDF). These file extensions are recognized by the
appropriate PC program interface.
If the stream file does not exist, it is created.
A specific path name may be entered.
To use *PDF, you must have xxxxTS1 (IBM Transform
Services) and PASE installed. Check these options
with (where xxxx is the code version):
CHKPRDOPT PRDID(xxxxSS1) OPTION(33)
CHKPRDOPT PRDID(xxxxTS1) OPTION(1)
Review the low level messages to ensure the proper
install.
JOB The qualified job name of the job with the spooled
file. The default is * meaning the current job.
SPLNBR The file number of the spooled file. This defaults
to *ONLY. *LAST or a specific number may be
specified.
STMFOPT The option to use when writing to a stream file that
already exists. If the stream file does not exist,
it is created.
If *NONE is used in an interactive job and the
stream file exists, a prompt will occur that allows
the user to replace, add, or cancel.
If *NONE is used in a batch job and the stream file
exists, an error will occur.
*ADD may be specified to add to the existing stream
file. However, *ADD is not valid for stream file
types *RTV, *SYS, and *PDF.
*REPLACE may be specified to replace the data in the
existing stream file.
STMFTYPE The type of conversion to be performed on the
spooled file. *TXT is the default for plain text.
*RTF may be specified for 'rich text format'.
*HTM may be specified for HTML type text.
*SYS may be specified to create a format that can
re-converted to a spooled file. The intent of the
function is to allow a spooled file on a source
system to be transferred to a target system as an
E-mail attachment and then made into a spooled file
on the target system. This requires the TAA
Productivity Tools product on the target system.
See the CPYIFSSPLF command to convert to a spooled
file on the target system.
*PDF may be specified to create a PDF format. When
copying to a *PDF type, the NEWPAGE parameter is
ignored. If you are sending the PDF file (such as
with SNDIFSMAIL), be sure to specify both the
subject and the IFS file name with the '.pdf'
extension.
NEWPAGE The 'new page' indication that will appear at the
beginning of each new page including the first.
The default is *DASHES which will cause a long
string of dashes.
*NONE may be entered to cause a blank line, but will
not generate a new page indicator.
A specific value (up to 15 characters) may be
entered. For example, if the medium you will
eventually write to requires a special value to
cause a skip to a new page, you could insert that
value for the NEWPAGE parameter.
Internal security
-----------------
To use the STMFTYPE(*PDF) option, you must have the proper options
installed for the operating system. This is checked using the
command CHKPRDOPT which is shipped as *PUBLIC *EXCLUDE. To avoid
authorizing the user to CHKPRDOPT, the command is run in a CL program
(TAASPNAC2) which adopts QSECOFR authority. The sub program
TAASPNAC2 may only be called from TAASPNAC.
Restrictions
------------
When using a text or HTML option, spooled files that can be converted
by CPYSPLF (SCS) are supported (AFPDS cannot be used).
Overprinting is not supported. Overprinting is an old impact printer
technique where the space before value for a line is 0, causing the
line to be bolded. This will cause duplicate data to be printed with
the CPYSPLFIFS tool. CPYSPLFIFS always assumes a 'space before'
value of 1.
Prerequisites
-------------
The following TAA Tools must be on your system:
CVTFRMSPLF Convert from spooled file
PMTOPR Prompt operator
RSNALLMSG Resend all messages
RTVSPLFA Retrieve spooled 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
------ ---- --------- ---------- ----------
CPYSPLFIFS *CMD TAASPNA QATTCMD
TAASPNAC *PGM CLP TAASPNAC QATTCL
TAASPNAC2 *PGM CLP TAASPNAC2 QATTCL
TAASPNAR *PGM RPGLE TAASPNAR QATTRPG
TAASPNAR2 *PGM RPGLE TAASPNAR2 QATTRPG
|