GENERATE_PDF scalar function
The GENERATE_PDF scalar function generates a PDF file in the Integrated File System containing the content of a spooled file.
This function requires the following product: 5770TS1 - Option 1 - Transform Services - AFP to PDF Transform
Authorization: This scalar function uses the Copy Spooled File (CPYSPLF) CL command. Any authority requirements for the CL command apply to the use of this function.
- A character string containing a qualified job name. Can contain the following special value:
- Use the name of the current job.
- A character string containing the name of the spooled file.
- The number of the spooled file.
- A character string containing the name of the path where the result PDF file is to be written.
This function is provided in the SYSTOOLS schema as an example of how spooled file data can be converted to PDF format by embedding the CPYSPLF CL command in an SQL scalar function. Similar to other Db2 for i provided tools within SYSTOOLS, the SQL source can be extracted and used as a model for building similar helper functions, or to create a customized version within a user-specified schema.
VALUES SYSTOOLS.GENERATE_PDF( JOB_NAME => '908049/QUSER/QZDASOINIT', SPOOLED_FILE_NAME => 'PGMA', SPOOLED_FILE_NUMBER => 2, PATH_NAME => '/usr/listing1');