Hi Everyone
I see a lot codes(to load a data table) as below in our system:
1. First, load the program which is coded in assembly language to Define Constant(DC Instruction) i.e. actually allocate
some main storage space for storing MY-RECORD later(in step 2):
EXEC CICS LOAD
PROGRAM(WS-MYPROG)
SET(ADDRESS OF MY-RECORD)
END-EXEC.
Note: the above codes is to load a data table!
2. Second, read the record from the file/dataset into MY-RECORD:
EXEC CICS READ
DATASET (MY-FILE-NAME)
INTO (MY-RECORD)
RIDFLD (MY-RECORD-KEY)
LENGTH (MY-LENGTH)
END-EXEC.
My question is, for the above process why bother to use LOAD command to load a program/WS-MYPROG to allocate the storage
space, why not directly use GETMAIN to achieve the same? is there additional benefit other than Storage allocation by using
LOAD instead of GETMAIN?
Thanks, Roy