我如何知道我的输出文件在哪里?

huangapple go评论78阅读模式
英文:

How can I know where my spooled file is located?

问题

我正在使用Java程序从AS400调用一个CL程序,该CL程序生成一个要检索的输出文件。我不知道生成的输出文件位于何处。它的位置在哪里?

我尝试使用相同的作业号、用户和名称在wrkjob中查找它,该作业号对应于创建输出文件的作业。

英文:

I am using a java program to call a CL program from as400 that generates a spooled file that is to be retrieved. I do not know where the generated spooled file is. Where is it located?

I tried finding it using wrkjob with the same number, user, and name to the job that created the spooled file.

答案1

得分: 0

问题是在这种情况下,主机服务器作业已从默认的QUSER配置文件切换到您连接的用户ID... IBM i在以您用于连接的用户ID下运行的名为QPRTJOB的单独作业中生成了该输出文件。

因此,您应该将该输出文件视为您自己的文件之一,可以使用任何标准方法,如WRKSPLF USER(*CURRENT)

您还可以通过WRKJOB JOB(您的用户配置文件/QPRTJOB) OPTION(*SPLF)找到它。

如果您没有看到输出文件,要么它没有被创建,要么它已被打印(并且您的系统配置为在打印后删除)。

通常,当人们拥有一个现有的流程,该流程创建一个输出文件,然后将其转换为PDF并通过电子邮件发送时,会遇到此问题。由于输出文件最终在不同的作业中创建,因此转换过程无法找到它,因为大多数情况下都在寻找当前作业中创建的输出文件。

在这种情况下,一种选择是修改流程以使用“检索最后创建的输出文件标识”(QSPRILSP)API。

以下是关于此问题的一些IBM文档。
查找并处理在QPRTJOB作业下生成的输出文件

英文:

The issue is that in this scenario, a host server job which has swapped from the default QUSER profile to the user ID you've connected with...the IBM i generates the spool file in a separate job named QPRTJOB running under the user ID you used to connect.

So you should see the spool file as one of your own, using any standard methods such as WRKSPLF USER(*CURRENT)

You should also be able to find it via WRKJOB JOB(your-user-profile/QPRTJOB) OPTION(*SPLF)

If you don't see a spool file, either it didn't get created, or it got printed (and your system is configured to delete after printing.)

This issue normally bites people when they have an existing process that creates a spool file and the converts it to PDF for instance and emails it. Since the spool file ends up created in a different job, the conversion process doesn't find it since most are looking for the spool file created in the current job.

In that case, one option is to modify the process to use the Retrieve Identity of Last Spooled File Created (QSPRILSP) API

Here's some IBM documentation about this issue..
Finding and Working with Spooled Files Generated under a QPRTJOB Job

huangapple
  • 本文由 发表于 2020年7月29日 14:45:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/63147812.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定