暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

基于Spool File 生成 物理文件PF(源Google)

啊皮 2021-09-24
643

首先要求有对应的插件包:

  • 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

Directory . . . . : MyFolder

Type options, press Enter.
5=Display 8=Display attributes 9=Display authority

Opt Object link Type Attribute Text
_ test.pdf STMF

While running the above example if you receive a CPFCE01 error then Transform Services is not installed on your server.

                         Additional Message Information

Message ID . . . . . . : CPFCE01 Severity . . . . . . . : 40
Message type . . . . . : Escape
Date sent . . . . . . : DD/DD/DD Time sent . . . . . . : TT:TT:TT

Message . . . . : Required product option not available.
Cause . . . . . : The function requires that product 5770TS1 option 01 be
available to use.
Recovery . . . : Use the Check Product Option (CHKPRDOPT) command to verify
that product 5770TS1 option 01 has been properly installed on the system.
Correct the error and try the request again.

In my second example I am copying an existing spool file to my folder as a PDF file:

   CPYSPLF    FILE(QPQUPRFIL) TOFILE(*TOSTMF) +
SPLNBR(*LAST) +
TOSTMF('/MyFolder/test_1.pdf') WSCST(*PDF) +
STMFOPT(*REPLACE)

The same parameters in the CPYSPLF command, TOSTMFWSCSTSTMFOPT, 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) +
TOSTMF('/MyFolder/test_1.tif') +
WSCST(QWPTIFFG4) OVRSCOPE(*CALLLVL)

02 RUNQRY QRY(*NONE) QRYFILE((DEVSRC)) OUTTYPE(*PRINTER)

The TIF is not as nice as the PDF, but it is better than nothing.


文章转载自啊皮,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论