i 'm new to as/400.in an interview i was asked this
question.give a practical example for passing information or
data through local data area.
I know only that data area is an object used to store tiny
bits of data or it can store one value at a time and it is
used to store frequently changing values or datas.thats all
i know about data area can any one tell me how local data
area and user defined data area are used to pass data
between jobs with a example or coding.thanks in advance.
Answers were Sorted based on User's Feedback
Answer / sameer
Every job has an *LDA created by the system. To see the
*LDA of your current session you logged in - DSPDTAARA *LDA.
You can pass the same to other's job LDA by psssing it as
parameter of the program of the job we are calling. This
way informaton floats between different jobs.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / prabhas
Data area is a storage area to store limited information.
Example: a new and unique customer number is generated
whenever a new customer is added to customer master file.
Data area keeps track of last record added and add 1 to it.
Through program we can access new customer number.
To create a data area, use the command CRTDTAARA (Create
Data Area). For example, to create a 100 character data
area named LASTINV#:
CRTDTAARA DTAARA(MYLIB/LASTINV#) TYPE(*CHAR) LEN(100)
Now, load the first 10 positions with the
value "AA12345678" with the CHGDTAARA (Change Data Area)
command
CHGDTAARA DTAARA(QTEMP/LASTINV# (1 10)) VALUE('AA12345678')
Look at the value of the data area with DSPDTAARA (Display
Data Area):
DSPDTAARA MYLIB/LASTINV#
A CL program can retrieve the value with RTVDTAARA. An RPG
program uses the "IN" operation to retrieve the value and
the "OUT" operation to change it.
| Is This Answer Correct ? | 6 Yes | 5 No |
wat is curser?? and its types???
am 2010 passed out . can any one tell me which course is good to put 2+fake .guide me
1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?
1.Write code to read the records from a file and load an array of size 99? Make sure that you take care of all the error conditions?
Errors in Sql query will be in which state?
What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?
Can we found a record existance in a file w/o reading the file?
6 Answers Traitsys Technologies,
What are the commands that can be executed in CLP but not in RPG? Why?
how do I preserve and clean the array?
To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...
How can read PF in reverse order (end to start) in CL pgm..
The RP program is displaying records 11 times .But there are 10 records in a pf.(ie last record is displayed twice).How to display records only 10 times?