|
Local Data Area, Group Data Area and Program Initialization Parameter Data Area in AS400 |
Local Data Area
A local data area is created for each job in the system. The system creates a local data area *LDA of type *CHAR and length 1024 which is initially set as blanks.
When we submit the job then the value of the *LDA is copied from the submitting job to the submitted job.
We can access the local data area of the job by using *LDA with the DTAARA keyword on the commands RTVDTAARA, DSPDTAARA, CHGDTAARA.
We cannot create, delete, or allocate a local data area.
No library is associated with the local data area.
We can use *LDA to pass information between programs or procedures without using a parameter list.
We can save data in *LDA without the overhead of creating and deleting a data area by ourselves.
DSPDTAARA *LDA
Display Data Area
System:
Data area . . . . . . . : *LDA
Type . . . . . . . . . : *CHAR
Length . . . . . . . . : 1024
Text . . . . . . . . . : *LDA for Job 411434/EASYCLASS/QPAD204805
Value
Offset *...+....1....+....2....+....3....+....4....+....5
0 ' '
50 ' '
100 ' '
150 ' '
200 ' '
250 ' '
300 ' '
350 ' '
400 ' '
Group Data Area
The system creates a group data area when an interactive job becomes a group job using the Change group attributes command (CHGGRPA).
Only one group data area can exist for a group. The group data area is deleted when the last job in the group is ended with the ENDJOB, SIGNOFF, or ENDGRPJOB command, or with an abnormal end, or when the job is no longer part of the group job
A group data area has a length of 512 and type *CHAR and is initially set as blanks.
We can use a group data area from within a group job by specifying *GDA for the DTAARA parameter on the CHGDTAARA, RTVDTAARA, and DSPDTAARA commands.
A group data area is accessed from all the jobs in the group.
We cannot create, delete, or allocate a group data area.
No library is associated with a group data area.
Used CHGGRPA GRPJOB(TEST) command to make the interactive job part of a group job TEST and then *GDA data area gets created and can be displayed using DSPDTAARA *GDA command.
Display Data Area
System:
Data area . . . . . . . : *GDA
Type . . . . . . . . . : *CHAR
Length . . . . . . . . : 512
Text . . . . . . . . . : *GDA for Job 411434/EASYCLASS/QPAD204805
Value
Offset *...+....1....+....2....+....3....+....4....+....5
0 ' '
50 ' '
100 ' '
150 ' '
200 ' '
250 ' '
300 ' '
350 ' '
400 ' '
Program Initialization Parameter Data Area
The PIP data area is created for each prestart job when the job is started.
The object sub-type of the Program Initialization Parameter Data Area is different from a regular data area.
The Program Initialization Parameter Data Area can only be referred to by the special value name *PDA.
The size of the Program Initialization Parameter Data Area is 2000 bytes
RTVDTAARA, CHGDTAARA, and DSPDTAARA CL commands can be used with *PDA
Related Post
Data area in AS400
Remote Data Area in AS400