Can we use GoAnywhere Director to export an iSeries SPOOL FILE to a PDF file?
A.
GoAnywhere Director cannot convert a spool file to a readable PC format.
However, SURVEYOR/400 (By Linoma Software) will convert a spool file to a PDF or TXT file. The Surveyor command EXPSPL can be ran from a GoAnywhere Director project.
Surveyor/400 will need to be installed on your iSeries in order for this project to work.
The following variables are defined in this project:
Variable Name............Default Value
JobName....................*ALL
JobUser..................... *CURRENT
JobNumber................. "000000"
SpoolFileNumber........... *LAST
DestFileName.............. /tmp/myfile.pdf
For this to work you will need to fill in the proper values for your job and spool file number.
Copy the following XML code to a text file. Save it to a file named SpoolFile.XML From the GoAnywhere project menu, you will be able to IMPORT the project.
The project emails the PDF file that is created.
Code: Select all
<project name="SpoolFile" mainModule="Main" version="1.0" logLevel="debug">
<variable name="JobName" value="*ALL" />
<variable name="JobUser" value="*CURRENT" />
<variable name="JobNumber" value="000000" />
<variable name="SpoolFileNumber" value="*LAST" />
<variable name="DestFileName" value="/tmp/myfile.pdf" />
<module name="Main">
<exec400 version="1.0" resourceId="DEV 54">
<command>
<![CDATA[SURVEYOR/EXPSPL
JOB(${JobNumber}/${JobUser}/${JobName}) SPLNBR(${SpoolFileNumber})
NAMEFORMAT(*SINGLE_FILE_NAME) IFSDEST('${DestFileName}') FILTEROV(*YES)
USEMSG(*YES) OUTPUT(*NONE)
]]>
</command>
</exec400>
<sendEmail version="2.0" resourceId="e-mail server"
toList="[email protected]">
<from address="[email protected]" />
<subject>
<![CDATA[Spool file]]>
</subject>
<message>
<![CDATA[Attached is your spool file.
Job Name: ${JobName}
User: ${JobUser}
Number: ${JobNumber}
Spool File Number: ${SpoolFileNumber}]]>
</message>
<attachment file="${DestFileName}" />
</sendEmail>
</module>
<description>export spool file with Surveyor/400 EXPSPL to IFS</description> </project>
This is the an example of what you would use for your CL. Here, we pass
values to overwrite the default variables in the project.
If the variables are not overwritten, the project will use the default settings.
GOANYWHERE/RUNPROJECT PROJECT('/test/SpoolFile') VARIABLE((JobName
QPADEV000G) (JobUser JSMITH) (JobNumber 178655) (SpoolFileNumber 000002))