CICS-Getmain

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.

Cool..

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.

Linkage section.

01  DWS-work-area.

   02 fild1  pic x(100).

   02 fild2 pic x(200).

EXEC CICS GETMAIN

       SET(Address of DWS-Area)

       FLENGTH(300)

       INITIMG(INIT)

END-EXEC

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)
Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.