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: See Note below.
- 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. Can contain the following special value:
- The spooled file with the highest number with a name matching spooled-file-name is selected.
- 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.
Services provided in SYSTOOLS have authorization requirements that are determined by the interfaces used to implement the service. To understand the authority requirements, extract the SQL for the service and examine the implementation.
VALUES SYSTOOLS.GENERATE_PDF( JOB_NAME => '908049/QUSER/QZDASOINIT', SPOOLED_FILE_NAME => 'PGMA', SPOOLED_FILE_NUMBER => 2, PATH_NAME => '/usr/listing1');