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

How to declare the dynamic(run time) array in rpgle? can you please give example

2 Answers   Polaris,


I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?

2 Answers  


what r drawbacks of OPM? Why do we go for ILE RPG?

1 Answers  


How can we access Interactive job LDA in Batch Job?. and How we can access a file in interactive QTEMP lib in Batch job?.

4 Answers   IBM,


What is the difference between copybooks and subprocedures in as400?

0 Answers  


1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?

1 Answers   HP,


Assume my file has 100 records and I want to see only first 10 records. Is this possible through lf?

1 Answers  


How to change the name of physical members Dynamically?

1 Answers  


A pgm subroutine calling child subroutine, that child subroutine again calling parent subroutine, u have 1000 lines of code, with out debugging , how can u find that error??? Is there any command to find errors in pgm???

3 Answers   HSBC,


if i have three programs progA,progB and progC .now i call progB from progA. but the progB does not exist . now i want to call progC instead of starting dump. how can we achieve this.

10 Answers   Four soft,


how can an indexed file be used as arrival sequence in RPG?

3 Answers   IBM,


Need a sql query: retrieve all duplicate records in table?

1 Answers  


Categories