New CPYSPLF Function to Copy SPLFs to Stream Files in the IFS
The Copy Spooled File (CPYSPLF) command has been expanded to support copying spooled file data to stream files in the IFS. Optionally, you can transform the data to another format before writing the data.
Resolving the problem
The Copy Spooled File (CPYSPLF) command now supports copying spooled files into the integrated file system. The spooled file can optionally be converted using a workstation customizing object. This allows the spooled file to be converted to other formats. To convert the spooled files to Portable Document Format (PDF), you must download and apply 7.1 PTF SI43471 or a superseding PTF and you must also install licensed program 5770TS1, *BASE and Option 1, "IBM Transform Services for i" and "Transforms - AFP to PDF Transform".
For more information, refer to the following APAR and PTF cover letters:
APAR SE47834 OSP-PRT ENHANCEMENTS TO CPYSPLF COMMAND
7.1 PTF SI43471 OSP-PRT Enhancements to CPYSPLF command
This document was last updated on 24 October 2013.
To take advantage of this new function, specify the new *TOSTMF special value on the CPYSPLF TOFILE parameter. The spooled file will be converted based on the workstation customizing object specified in the Workstation customizing object (WSCST) parameter and the output placed in the stream file specified in the To stream file (TOSTMF) parameter.
To stream file (TOSTMF)
Specifies the stream file where the output data is to be written. All directories in the path name must exist. New directories are not created. This parameter must specify a value other than *NONE if the To data base file (TOFILE) parameter is *TOSTMF.
The output is written to a user-defined physical file. This value is only valid if the To data base file (TOFILE) parameter specifies a user-defined physical database file.
Specify the path name for the stream file where the output data is to be written. This value is only valid if the To data base file (TOFILE) parameter specifies *TOSTMF.
Note: If the stream file exists, the CCSID associated with the stream file will not be changed.
For more information on specifying path names, refer to "Object naming rules" in the CL topic collection in the Programming category in the IBM i Information Center at the following URL:
Note: This parameter is Unicode-enabled. For additional information, see "Unicode support in CL" in the CL topic collection in the Programming category in the IBM i Information Center at the following URL:
Workstation customizing object (WSCST)
Specifies the workstation customizing object to use to transform the spooled file output to final form before writing it to a stream file. If the To data base file (TOFILE) parameter specifies a physical database file, the WSCST parameter is ignored. In order to convert a spooled file using the (WSCST) parameter, the device type (DEVTYPE) of the spooled file must be *SCS or *AFPDS.
Specifies that no workstation customizing object is to be used.
If the To data base file (TOFILE) parameter specifies *TOSTMF and the device type of the spooled file is *AFPDS or *USERASCII, the spooled file data will be copied directly to the stream file. If the stream file does not exist, the associated CCSID of the stream file will be set to 65535.
For other types of spooled files, the spooled file data will be copied to the stream file using the Control character (CTLCHAR) parameter to format the data. Lines will be ended with carriage return and line feed controls to indicate record boundaries. Specifically, the carriage return is a hexadecimal x'0D' and a line feed is a x'25'. If the stream file does not exist, a CCSID obtained from the spooled file attributes will be associated with the stream file.
If the spooled file has a CHRID attribute other than *DEVD, the CHRID attribute will be used to select the CCSID to be associated with the stream file. If the spooled file has a CHRID attribute of *DEVD, the CCSID of the job which created the spooled file will be used.
The output is transformed to Portable Document Format (PDF) before it is written into a stream file. If the stream file does not exist, the CCSID associated with the stream file will be set to 65535.
Qualifier 1: Workstation customizing object name
Specify the name of the customizing object. When a named customizing object is used and the stream file does not exist, the CCSID associated with the stream file will be set to 65535.
Qualifier 2: Library
*LIBL - All libraries in the library list for the current thread are searched until the first match is found.
The current library for the job is used to locate the customizing object. If no current library entry exists in the library list, QGPL is used.
Specify the name of the library where the customizing object is located.
Stream file option (STMFOPT)
Specifies whether the copy operation replaces or fails to copy the records to the stream file if a stream file with the specified name already exists. If the stream file does not exist, it is created.
No records are copied and the operation will fail.
The records replace the existing stream file records.
|Operating System||IBM i 7.1|
More support for:
Software version: 7.1, 7.1.0
Operating system(s): IBM i
Reference #: N1011580
Modified date: 2013-05-26