首先要求有对应的插件包:
Version 7.1: 5770TS1.
Version 6.1: 5761TS1.
Version 7.1: B_GROUPx_04 disk.
Version 6.1: B29xx_02 disk.
如果没有,需要对应的管理员安装:
Version 7.1: 5770TS1 and 5770TS1 option 1.
Version 6.1: 5761TS1 and 5761TS1 option 1.
01 OVRPRTF FILE(QPQUPRFIL) DEVTYPE(*AFPDS) +
TOSTMF('/MyFolder/test.pdf') WSCST(*PDF) +
OVRSCOPE(*CALLLVL)
02 RUNQRY QRY(*NONE) QRYFILE((MYLIB/TESTPF)) OUTTYPE(*PRINTER)
There are three parameters in the OVRPRTF command we need to address:
Printer Device Type, DEVTYPE, need to be *AFPDS.
To Stream File, TOSTMF, contains the folder and file name I wish to save the spooled file to. In this example I will save it to the document test.pdf in the IFS folder MyFolder.
Work Stations Customization Object, WSCST, must be *PDF.
When I run the RUNQRY command, line 2, no spool file is produced. The PDF file is created in MyFolder instead. To view it you can either use the Operations Navigator or you can use the DSPLNK at the command prompt:
DSPLNK OBJ('/MyFolder/*') |
As I have used the asterisk after the folder name the command displays all of the files in the folder:
Display Object Links |
While running the above example if you receive a CPFCE01 error then Transform Services is not installed on your server.
Additional Message Information |
In my second example I am copying an existing spool file to my folder as a PDF file:
CPYSPLF FILE(QPQUPRFIL) TOFILE(*TOSTMF) + |
The same parameters in the CPYSPLF command, TOSTMF, WSCST, STMFOPT, have to be completed as in the previous example. And in the To File, TOFILE, the value *TOSTMF is given as I am copying the spool file to a stream file.
If you do not have Transform Services on your server you can still copy spool files to the IFS as a TIF (TIFF) file using the Work Stations Customization Object, WSCST, QWPTIFFG4, see below:
01 OVRPRTF FILE(QPQUPRFIL) DEVTYPE(*AFPDS) + |
The TIF is not as nice as the PDF, but it is better than nothing.




