Retrieve data from a data area and use it in a project

Looking for an example project to get you started?

Retrieve data from a data area and use it in a project

Postby Support_Duane » Mon Jun 21, 2010 9:55 am

There are two sets of code here, one for a CL program that will retrieve a value from a data area and place that value into a variable, the second is the XML for a project that will call the program and retrieve the value stored in the variable.

Code: Select all
/* Description.. This program performs the following function:       */
/*               1) Retrieves a value from a data area               */
/* Program name. RTVDADTA                                            */
/* Authored by.. Linoma Software                                     */
/* Date/time.... 06/17/10                                            */
/*                                                                   */
           PGM PARM(&value)                                           
             DCL VAR(&VALUE) TYPE(*CHAR) LEN(25)                       
/* get the data from the data area                                   */
/* we're done now                                                    */

Code: Select all
<project name="Retrieve value from DataArea" mainModule="Main" version="1.0">
   <module name="Main">
      <exec400 version="1.0" resourceId="Dev61">
         <program name="rtvdadta" library="djohnson">
            <parameter dataType="text" length="25" usage="out" outputVariable="value" />
      <print version="1.0">
         <![CDATA[the value in the data area was "${value}"]]>

You will, of course, need to make changes to fit your situation.
Support Specialist
Posts: 65
Joined: Thu Mar 05, 2009 3:49 pm

Return to Example Projects

Who is online

Users browsing this forum: No registered users and 1 guest