Export an iSeries SPOOL FILE to a PDF file

Looking for an example project to get you started?

Export an iSeries SPOOL FILE to a PDF file

Postby Support_Julie » Wed Mar 31, 2010 8:38 am

Can we use GoAnywhere Director to export an iSeries SPOOL FILE to a PDF file?

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
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">
JOB(${JobNumber}/${JobUser}/${JobName}) SPLNBR(${SpoolFileNumber})

      <sendEmail version="2.0" resourceId="e-mail server"
         <from address="from@example.com" />
            <![CDATA[Spool file]]>
            <![CDATA[Attached is your spool file.

Job Name:                ${JobName}
  User:                      ${JobUser}
  Number:                 ${JobNumber} 

Spool File Number:    ${SpoolFileNumber}]]>
         <attachment file="${DestFileName}" />


   <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.

QPADEV000G) (JobUser JSMITH) (JobNumber 178655) (SpoolFileNumber 000002))
Software Support
Linoma Software
Support Specialist
Posts: 77
Joined: Thu Mar 05, 2009 3:49 pm
Location: Ashland, NE USA

Return to Example Projects

Who is online

Users browsing this forum: No registered users and 1 guest