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
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?
- Support Specialist
- Posts: 91
- Joined: Thu Mar 05, 2009 3:49 pm
- Location: Ashland, NE USA
-
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.
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.
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.
For others' information, we use the Variables parameter in the RUNPROJECT to pass variable data into a GA project.
- Posts: 2
- Joined: Wed Mar 04, 2015 4:08 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...
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" />
</program>
</exec400>
HTH, let me know if this doesn't answer your question.
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" />
</program>
</exec400>
HTH, let me know if this doesn't answer your question.
5 posts
Page 1 of 1