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

i would like to know under what circumstance the object will get locked on AS400.

5 Answers   IBM,


Can we found a record existance in a file w/o reading the file?

6 Answers   Traitsys Technologies,


Whether a module can consists of many procedures or it can consist of subprocedures having a main procedure?If it is possible that it can contain many individual procedures than can we have different name for complete module and how do we call this module in main modul?

3 Answers   Steria,


explain sflclr, sflend, sfldlt, and sflcsrrrn?

0 Answers   IBM,


WHAT IS MEANT BY SIGNATURE VAILOTION ERROR

1 Answers   IBM,






i want code and what are used key words are ...like wrkmbrpdm screen (q) i have a file with 3 fields empno,empname,empaddr... here you give the empno it displays from that number to remaining empno's how? sub file screen: employee details pos to:empno then enter empno empname empaddr so file have 100 records from 1 to 100 so the above pos you give the 55 empno...it displays the from 55 to remaining... ...... please share this answel

2 Answers   IBM,


Thanks gagan for your answer,i'm new to as400,i don't know embedded sql in rpg.can you send me the coding for the below mentioned question in embedded sql rpg. how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.

2 Answers   iGate,


I know whole thing ab't Arrays related to declaration..can anyone tell me what exactly use of array or anyone faced a situation where he found use of array must....

1 Answers  


Suppose you have 3 members in a database file. How to read records from all the members without using CL (OVRDBF) i.e. Entire process should be handled exclusively in a RPG program?

7 Answers  


How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...

1 Answers  


Q1.How to read the Array? Q2.How to copy the content of one Array to another Array?

4 Answers   IBM,


Hello, I want to extend a length of field in my Display file(Subfile). Please suggest the possible steps. Thanks

3 Answers  


Categories