How to determine the job name/user/number for a CL program c

Looking for an example project to get you started?
1 post Page 1 of 1


Support Specialist
Posts: 11
Joined: Tue Feb 09, 2010 11:16 am

Post by Support_Mary » Thu Dec 02, 2010 10:05 am
How to determine the job name/user/number for a CL program called by a GoAnywhere Project.

This sample project XML will allow you to get the user and job name as well as the job number from your called CL program.

<project name="system i retrieve job d info " mainModule="Main" version="1.0" logLevel="normal">
<variable name="JOBNAME" value="none" />
<variable name="USERNAME" value="none" />
<variable name="JOBNBR" value="none" />

<module name="Main">

<exec400 label="Connect to System i" version="1.0" resourceId="DEV 54">
<program name="badcl" library="wmwise">
<parameter label="JOBNAME " dataType="text" length="10" usage="out" outputVariable="JOBNAME" />
<parameter label="USERNAME" dataType="text" length="10" usage="out" outputVariable="USERNAME" />
<parameter label="JOBNBR" dataType="text" length="6" usage="out" outputVariable="JOBNBR" />

<print version="1.0">
<![CDATA[JOB Description from CL program ${JOBNAME} ${USERNAME} ${JOBNBR}



You will need to add a line something like this to your CL program:


You can retrieve additional information using any of the parameters available in the Retrieve Job Attribute (RTVJOBA) command. More information on the RTVJOBA command is available from IBM.
1 post Page 1 of 1