This is very important in view of CICS. Since many have a doubt that we already have a lot of storage, so why need to get dynamic memory.
I will give an example why we need this. Getmain helps to get extra virtual storage to faster processing.
See the example code:
Working storage section.
77 INIT pic x value low-value.
02 fild1 pic x(100).
02 fild2 pic x(200).
EXEC CICS GETMAIN
SET(Address of DWS-Area)
After executing this command, we get 300 bytes of virtual storage. This will be initialized with low values.
Points to remember:
- FLENGTH is recommanded option
- The expected errors are LENGERR and NOSTG
- This is one of the performance improvement criteria
- CICS always gets storage from DSA(Dynamic storage area)