How to Pass Variables to IBMi

Looking for an example project to get you started?

How to Pass Variables to IBMi

Postby Support_Julie » Mon Dec 12, 2011 4:11 pm

This is an example of how to pass a variable or value back to the IBMi from a GoAnywhere Director Project:


Code: Select all
<project name="How to Pass data back to IBMi" mainModule="Main" version="2.0">
   <!-- Passed Parameters -->
   <variable name="UserName" value="" />

   <module name="Main">

      <timestamp label="Create Timestamp Variable" version="1.0">
         <format outputVariable="Todays_Date" pattern="yyyy-MM-dd" />
         <format outputVariable="Two_Weeks_Ago" pattern="yyyy-MM-dd" dayOfMonth="-14" />
      </timestamp>

      <if label="Get UserName" condition="${ UserName eq &apos;&apos; }">

         <setVariable label="Set UserName" name="UserName" value="${system.user.name}" version="2.0" />

      </if>

      <exec400 label="Write Parms to DataArea" resourceId="Dev53" version="1.0">
         <command>
            <![CDATA[CRTDTAARA DTAARA(QGPL/GAPARMS)
                        TYPE(*CHAR)
                          LEN(250)
                        TEXT('Parameters from GoAnywhere')                                                       
                                ]]>
            <monmsg messageID="CPF1023" action="continue" />
         </command>
         <command>
            <![CDATA[CHGDTAARA DTAARA(QGPL/GAPARMS (1 10)) VALUE('${UserName}')]]>
         </command>
         <command>
            <![CDATA[CHGDTAARA DTAARA(QGPL/GAPARMS (11 15)) VALUE('${Todays_Date}')]]>
         </command>
         <command>
            <![CDATA[CHGDTAARA DTAARA(QGPL/GAPARMS (26 15)) VALUE('${Two_Weeks_Ago}')]]>
         </command>
      </exec400>

   </module>

</project>
Julie
Software Support
Linoma Software
Support_Julie
Support Specialist
 
Posts: 78
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 2 guests

cron