Skip to content

Export an iSeries SPOOL FILE to a PDF file

Looking for an example project to get you started?
  • User avatar
  • Support_Julie Offline
  • Support Specialist
  • Posts: 91
  • Joined: Thu Mar 05, 2009 3:49 pm
  • Location: Ashland, NE USA
  • Contact:

Export an iSeries SPOOL FILE to a PDF file

Post by Support_Julie »

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"
toList="[email protected]">
			<from address="[email protected]" />
				<![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))
Julie Rosenbaum
Sr Support Analyst
e. [email protected]
p. 1.800.949.4696
  • bpitzke Offline
  • Posts: 1
  • Joined: Tue Sep 01, 2015 8:02 am

Re: Export an iSeries SPOOL FILE to a PDF file

Post by bpitzke »

I have tried unsuccessfully to do this..the project will override my variables to the correct values:
Overriding variable 'JOBNUMBER' with value '466338'
Overriding variable 'JOBUSER' with value 'LUELOFF_K'
Overriding variable 'SPOOLFILENUMBER' with value '000001'
Overriding variable 'JOBNAME' with value 'IC0620'
But when it executes the surveyor command it fills in the default values

Can you please help?
  • Support_Rick Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: Export an iSeries SPOOL FILE to a PDF file

Post by Support_Rick »

Can you send me a copy of your Project XML and full job log?
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Post Reply