Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



i 'm new to as/400.in an interview i was asked this question.give a practical example for pas..

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

i 'm new to as/400.in an interview i was asked this question.give a practical example for pas..

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

Post New Answer

More RPG400 Interview Questions

what is the procedure and explain about real time scenario.

0 Answers   Adhoc Technologies, Hanuman Automation, HSBC, IBM,


Can we used ovrdbf command after the opnqry file if yes then What will be out put of your program?

4 Answers   IBM,


suppose there are 100 records and i want to read records between 60-70 how we can read this 10 records in rpg

2 Answers   Polaris,


How can we find out whether the job is interactive or Batch through RPG program? 2) How can we find out through CL program?

6 Answers   CSC,


what is the necessary command needed before OPNQRYF and why?

5 Answers  






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.

6 Answers  


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.

1 Answers  


Delete FileName at first statement in RPG.

1 Answers  


can we perform CHAIN operation on Subfile record format....?

4 Answers  


Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?

2 Answers  


how can I tell when to replace the array?

0 Answers   IBM,


what is the necessary keyword needed to scroll subfile records?

0 Answers   IBM,






Categories