hi,
I have one data area called ABC of type *CHAR length is 10 in that i have some data i want pass that data area to RPGLE program as parameter, with in RPGLE program how can i receive that data area values in my program as PLIST and i am just calling this program from command line not from CL PROGRAM can any one help me regarding this
Software/Hardware used:
ASKED:
July 15, 2008 1:05 PM
UPDATED:
May 4, 2010 7:37 AM
Hi,
Slight amendment to above statement :-
Data Areas are accessible to all programs
Should read
Data Areas in your library list are accessible to all programs
Regards,
Martin Gilbert.
It sounds as if you want to use the contents of the data area when you call the program from the command line, and you don’t want to write a CL program, and you don’t want to declare the data area in your program.
Well, there are only two ways to do that. First is to look at the data area, see what the value is, and use that value in the parameter list.
Second is to change your mind and write a CL program or declare the data area in your program.
You CAN access a data area which is not in your library list, by using the RTVDTAARA CL command. You can only use this in a CL program.
Is there some specific reason why you don’t want to use a CL program or declare the data area in the RPG code? If so, please let us know. It won’t make any difference to the answers, though.
Regards,
Sloopy
Data Areas in your library list are accessible to all programs
You CAN access a data area which is not in your library list, by using the RTVDTAARA CL command.
RPG has allowed reference to data areas through variable names since V5R3. The variable may have the name in the form ‘LIBRARY/DTAANAME’. That is, it does not have to be in your library list and you don’t need to use RTVDTAARA.
Tom