>>-+--------+--$FREMAIN--+-----------+--,LV--=--+-value----+---->
'-symbol-' '-type-code-' '-(--R0--)-'
>--+-------------------------------------+---------------------->
'-,SP--=--absexp--,A--=--+-addrx----+-'
'-(--R1--)-'
>--+------------------------+--+--------------------+----------->
| .-1---------. | | .-SAVE-. |
'-,KEY--=--+-key-value-+-' '-,REGS--=--+-USE--+-'
+-PSW-------+
'-TCB-------'
>--+----------------------+--+---------------------------+------>
| .-NO------. | '-,OKRET--=--+-label------+-'
'-,TCB--=--+-YES-----+-' '-(--R--n--)-'
+-JOBSTEP-+
+-HIGH----+
'-CURRENT-'
>--+---------------------------+-------------------------------><
'-,ERRET--=--+-label------+-'
'-(--R--n--)-'
- type-code
- Identifies the type of GETMAIN/FREEMAIN request. You can only
specify an unconditional FREEMAIN request.
Note: If the area of
storage referred to has not been obtained through MVS GETMAIN
or $GETMAIN services before this point, your subsystem will abend.
The way to specify requests is as follows:
R or
RU or U – An unconditional FREEMAIN request.
- LV=
- Specifies the length of the area to be obtained or freed. This
value is loaded into register 0. When this value is coded by way
of register format, the subpool may be specified in the high order
byte of the register.
- SP=
- Identifies the subpool number. Subpool zero is the default if
no subpool is specified or the subpool is not specified in the high
order byte of the LV= parameter. This parameter must be specified
if you want to free an entire subpool. (In that case, do not code the A= parameter.)
- A=
- Specifies the starting address of the storage to be freed. This
is done either by loading the address into register 1 and coding R1
as the value of A=, or by specifying the address itself. This address
is loaded into register 1. This parameter is required unless you need
to free an entire subpool, in which case you specify the SP= parameter
and not the A= parameter. This keyword applies to the JES2 main task
environment.
For the user environment, specifies the address of
the TCB associated with the storage to be freed; this parameter is
required for this environment.
- KEY=
- Specifies the key of the storage you want to free. The default
is “1”. Specifying “TCB” indicates to use the current TCB. This keyword
applies to the user environment. Specifying “PSW” is valid for only
the user environment.
- REGS=
- Specifies whether (SAVE) or not (USE) to save the contents of
the caller's registers. This keyword is valid only in the user environment.
REGS=SAVE is the default.
- TCB=
- Indicates which TCB is associated with the storage that is to
be freed.
- YES
- Specifies that the TCB to be used has its address in the first
word of the storage to be freed.
- NO
- Specifies that the TCB to be used is the jobstep TCB. If there
is no jobstep TCB, then the current TCB is used. This is the default.
- JOBSTEP
- Specifies that the jobstep TCB is to be used.
- HIGH
- Specifies that the highest TCB In the address space (whose address
is in ASXBFTCB) is to be used.
- CURRENT
- Specifies that the current TCB is to be used.
- OKRET=
- Specifies a label or a register containing the address of the
routine that receives control if $FREMAIN processing was successful.
- ERRET=
- Specifies a label or a register containing the address of the
routine that receives control if an error occurs during $FREMAIN processing.