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 significance of UDATE?

5 Answers   IBM,


1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from database file.

2 Answers  


You have a *USE authority on a Library and *All authority on a file in that Library.Can you change the data in that file?

1 Answers  


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

0 Answers   HCL,


I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic

2 Answers  






what is a rpg?

0 Answers   IBM,


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

0 Answers  


3. Given the DOS Specification below and the following information: • Indicator 50 is off • No records have been written to the subfile What will be the result if the EXFMT operation code is performed on the record format CTLR? A R SUBFL A DESCRIP 101 6 1ODSPATR(UL) A DFT(’NOT FOUND’) A R CTLR SFLCTL(SUBFL) A N50 SFLDSP A SFLDSPCTL A SFLINZ A 67 SFIJEND A SFLSIZ(13) A SFLPAG(12) A ACCOUNTNO 100 S 10 a.) Only AccountNo will display b.) SUBFL will be initialized with 13 blank records c.) An I/O exception error will occur d.) The screen will display 12 records with ‘NOT FOUND’

4 Answers   IBM,


how can you display specific subfile page on the screen in unequal subfile?

0 Answers   IBM,


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

1 Answers  


How do you proceed in case your active AS400 session has got disconnected suddenly, how can you get back to your session ? Is it possible??

1 Answers  


How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program

1 Answers   UST,


Categories