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)
CHGDTAARA DTAARA(QTEMP/LASTINV# (1 10)) VALUE('AA12345678')
Look at the value of the data area with DSPDTAARA (Display
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|
what is the procedure and explain about real time scenario.
Can we used ovrdbf command after the opnqry file if yes then What will be out put of your program?
suppose there are 100 records and i want to read records between 60-70 how we can read this 10 records in rpg
How can we find out whether the job is interactive or Batch through RPG program? 2) How can we find out through CL program?
what is the necessary command needed before OPNQRYF and why?
Suppose we add one field in physical file and this physical file is used by several programs.how do we know which program is using that file? What are the impact analysis.
I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.
Delete FileName at first statement in RPG.
can we perform CHAIN operation on Subfile record format....?
Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?
how can I tell when to replace the array?
what is the necessary keyword needed to scroll subfile records?