FREEMAIN64
Release storage that was acquired by using a GETMAIN or GETMAIN64 request. This command is for use only in non-Language Environment (LE) AMODE(64) assembler language application programs.
Description
- Main storage that was acquired by a GETMAIN or GETMAIN64 command issued by the application.
- Main storage that was acquired by a LOAD command for a program, map, or table that is defined with RELOAD=YES.
- The GETMAIN or GETMAIN64 command is specified the SHARED option. The storage remains allocated until another task issues a FREEMAIN or FREEMAIN64 request to release it.
- The program is defined with RELOAD=YES. The storage remains allocated until another task issues a FREEMAIN or FREEMAIN64 request to release it.
- The program is defined with RELOAD=NO but was loaded with the HOLD option. The program remains available until it is released by another task.
You can release CICS-key storage from a program only if it is being executed in CICS key. If the storage was obtained from CICS-key storage, and the program that issues the FREEMAIN64 request is in user-key, an INVREQ condition occurs with a RESP2 value of 2.
Options
- DATA(data-area64)
- Specifies
the data area of main storage to be released.
In assembler language, data-area64 must be a relocatable expression that is a data reference.
The length of storage released is the length that was obtained by the original request and not necessarily the length of the data area.
- DATAPOINTER(ptr-value64)
- Specifies
the address of the main storage to be released, as a 64-bit pointer
reference. This storage can be storage that was acquired by a previous
GETMAIN or GETMAIN64 request. For example, a 64-bit pointer reference
to an area of 31-bit storage can be specified.
The length of storage released is the length that was obtained by the original request.
Conditions
- 16 INVREQ
- RESP2
values:
- 1
- The storage specified by the DATA or DATAPOINTER parameter is not storage acquired by a GETMAIN or GETMAIN64 command.
- 2
- The storage area specified by the DATA or DATAPOINTER parameter is in CICS-key storage, and the program issuing the FREEMAIN64 command is in user-key.
Examples: Assembler
WORKAREA DS CL100
.
.
EXEC CICS GETMAIN64 SET(9) FLENGTH(1048576)
USING WORKAREA,9
EXEC CICS FREEMAIN64 DATA(WORKAREA)
WORKAREA DS CL100
.
EXEC CICS GETMAIN SET(9) LENGTH(100)
USING WORKAREA,9
.
.
DROP 9
.
EXEC CICS FREEMAIN64 DATAPOINTER(9)