× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Don,
What I am trying to do is when a user signs on a data area is created for that 
user. Then a program will run asking the users location. Once I get that I want 
to output a two(2) chara code in the data area to use in my cl.
I have also enclosed part of my code.

 Duserdta          DS                  dtaara(*var:UsrID) 
 Dprtdev                   1     10A                      
 D                sds                                     
 DUsrID                  254    263A       

Any suggestion or pointers would be greatly appreciated.
Willie..               

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Fisher, Don
Sent: Thursday, December 15, 2005 11:54 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Help with data area in RPG


The local data area can be populated using the CHGDTAARA command.  The CL
Reference has detailed information on how to use this command.  

The RPG program code would look something like:
LocalDataArea UDS       DTAARA(*LDA)
<Sub-fields>

IN LocalDataArea

The parameters method would just involve the CL program passing whatever
information you're placing in the data area as parameters (*ENTRY in RPG) to
the RPG program (CALL RPGPGM (&PARM1 &PARM2...)

As for the third, QTEMP is unique to each job in the system so even though
the data area would have the same name, there would be a different copy of
it for each user signed on. 

As a fourth option, how about creating a service program to populate and
retrieve the information in your data area?  You wouldn't have to put the
logic into every CL and RPG program that will use this technique that way. 

Hope that helps.

Donald R. Fisher, III
Project Manager
Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@xxxxxxxxxxxxx

<clip>
Would you please show me an example of the first two. Cannot use the last
suggestion because has to be different for each user that signson.
<clip>

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.