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
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 |
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 |
what is edit word and edit code
please guys help me,I need to write a program that shows more than one way to display a subfile. Both views are of the same file but sorted differently and show different fields of the same file when the user presses a function key. send me code
1.How you will find the program is batch or online in cl pgm? 2.How you will end the batch pgm when the job runs? write an logic? 3.In wich command the option *drop is used?
without logical file we cannot access the data in physical file.but we specify physical file in the program(ie:- Ffile IF E k disk).how can it be accessed?
Need a sql query: retrive all duplicate records in table
how do I declare a table or array in rpg iv?
1.What is the Maximum field length we can declare in RLU?? 2. What is the difference if your designing RLU using DDS and using the option 19 for the RLU??
what is *place and *auto keyword in prtf ?plz explain
wat is curser?? and its types???
What is the OPEN and CLOSE accesspath?
how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE
A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?