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 file identifier where we can use?

0 Answers  


what are the types of identifers

2 Answers   IBM,


purpose of pannel group??/

2 Answers   CTS,


If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

0 Answers  


how can I tell when to replace the array?

0 Answers   IBM,






can i use unique key in LF

3 Answers   TCS,


1.Can any body share me about thease opcodes with example please.Im new for AS/400.Could u please tell me in real senario? 1.TESTN, 2.EVAL 3.EVALR, TIME, 4.MONITOR 5. ENDMON 6.ON-ERROR 7.COMMIT ROLLBACK?

1 Answers   CSC,


Hi, can any one tell me :IN CASE OF SINGLE PAGE FILE HOW WILL I LOAD THE PREVIOUS PAGE WITHOUT THE USE OF SFLCLR INDICATOR ?

3 Answers   IBM,


How can you delete a record from a file in RPG without using DELETE oppcode?

2 Answers   UST,


How do you call procedures in ILE?

3 Answers  


How can we know running job is batch or interactive?

0 Answers  


in a cl pgm records are copied to a file in qtemp a pgm is called to delete records from the file in qtemp no of records in file in library qtemp is checked wat shud be the count of records let say it was 10 initially endpgm

2 Answers  


Categories