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

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


Support Specialist
Posts: 66
Joined: Thu Mar 05, 2009 3:49 pm

Post by 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.
1 post Page 1 of 1