variables from as400

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
5 posts Page 1 of 1


Posts: 41
Joined: Wed Mar 30, 2011 10:19 am

Post by monahanks » Fri Jun 17, 2011 9:29 am
it is possible to use RUNPROJECT from a CLLE on the as400 to run a goanywhere project, passing a variable to the project. is it possible to receive a variable back into the CLLE from the project? for example, if i execute RUNPROJECT passing a variable named 'error' with a value of 'false', and in the project that variable is changed to 'true ' on an error, can that value 'true ' be passed back to the CLLE and used as a condition in the CLLE?


User avatar
Support Specialist
Posts: 87
Joined: Thu Mar 05, 2009 3:49 pm
Location: Ashland, NE USA

Post by Support_Julie » Fri Jun 17, 2011 11:27 am
You cannot return variables values from RUNPROJECT to a CL program.

You can however, write to a Data Area and then retrieve that value in a project using the exec400 command to execute the rtvdata command.
Julie Rosenbaum
Sr Support Analyst
p. 1.800.949.4696


Posts: 41
Joined: Wed Mar 30, 2011 10:19 am

Post by monahanks » Fri Jun 17, 2011 1:20 pm
Thanks Julie. Using your suggestion, I created a CLLE that is executed from the GA project to change a data area, and I retrieve that data area into my CLLE to test if the project ended with an error.
For others' information, we use the Variables parameter in the RUNPROJECT to pass variable data into a GA project.

Awebb Reeds

Posts: 2
Joined: Wed Mar 04, 2015 4:08 pm

Post by Awebb Reeds » Fri Mar 06, 2015 5:17 pm
Mona, would you possibly be willing to show me the steps for getting that data area back from your CL and how it's set in the project itself? I've tried doing this a million ways and cannot seem to get any data...


Posts: 41
Joined: Wed Mar 30, 2011 10:19 am

Post by monahanks » Thu May 14, 2015 2:30 pm
Hi, sorry for the late reply - I haven't hit the forum in a while.
In my GA project I call my CLLE (named @UTL878C below) and pass variables containing necessary library names for the application environment and the actual data area name. In my project I set the variable ${DataField} with the actual value and send it to the CLLE. The CLLE does the actual populating of the data area.
On the IBMi I call the project passing the variable to GA.

<exec400 label="populate_dtaara" resourceId="CMRG400" version="1.0" executeOnlyIf="${Failed eq NO}">
<program name="@UTL878C" library="${programlib}">
<parameter label="FileNbr" value="${NbrATSFiles}" dataType="text" length="1" usage="inout" />
<parameter label="dtara" value="${dtara}" dataType="text" length="10" usage="inout" />
<parameter label="filelib" value="${filelib}" dataType="text" length="10" usage="inout" />
<parameter label="DataField" value="${DataField}" dataType="text" length="100" />

HTH, let me know if this doesn't answer your question.
5 posts Page 1 of 1