This general macro is a combination of the control program macros GETSC and
GETCC. This macro obtains an available block of small storage and an
available small file storage address from the short or long term pool of small
storage records indicated by the specified record id.
The address and size of the storage block is placed in the core block
reference word (CBRW) of the specified entry control block (ECB) data
level.
The address of the file record is inserted into the file
address reference word (FARW) of the specified ECB data level.
- Note:
- This macro is provided for backward compatibility only. New programs
should be written using the GETFC macro (see GETFC-Get File Pool Address and Storage Block).
Format
Notes:
- dummy
- label
- A symbolic name can be assigned to the macro statement.
- Dx
- This parameter is a valid ECB level D0 thru DF.
- dummy
- This parameter no longer has meaning. It is required to preserve
the position of the parameter following. It can be coded as S or L, or
indicated with commas.
- record_id
- A valid record ID whose characteristics will be used to determine whether
a long term, short term or duplicate record address is returned.
Entry Requirements
- R9 must contain the address of the ECB being processed.
- The ECB must not be holding a core block on the specified data
level.
Return Conditions
- Control is returned to the next sequential instruction.
- The content of R15 is unknown.
- R14 contains the address of the core block.
- The address and size of the block assigned is placed in the CBRW for the
specified data level.
- A record address is placed into the specified file address reference
word.
- The contents of the remaining registers and the condition code are
preserved across this macro.
Programming Considerations
- This macro can be executed on any I-stream.
- Only one block of storage may be obtained at a time through this
macro. Separate requests must be made for each block.
- Only one record address may be obtained at a time through this
macro. Separate requests must be made for each record address.
- A check is made by the control program to determine if the ECB requesting
a block is already holding one for the specified data level. If a block
is already held, control is transferred to the system error routine.
- Storage blocks held by an operational program should be released as soon
as possible by the operational program.
- All file storage record addresses must ultimately be released by a RELFC
macro.
- No record address may be released twice.
- The GETSC macro may result in the equivalent of a WAITC.
- File pool addresses that are acquired in a global transaction (that is,
after a TXBGC macro call but before a TXCMC or TXRBC macro call) are released
if the transaction is rolled back using a TXRBC macro call. However,
the core block remains attached to the ECB.
Examples
GCFSC D0,L,OM
The address and size of a storage block of type OM is put into the core
block reference word for data level D0. Whether the block is from the
long term pool or the short term pool depends on the definition of the OM
record returned. The L is merely a placeholder and has no other
meaning.