FREE CHILD

The EXEC CICS FREE CHILD command frees a specified child token which has been previously allocated by an EXEC CICS RUN TRANSID command. If a parent task no longer requires the response of a child task, then using the FREE CHILD command will free the resources associated with that child task when it completes, rather than waiting for them to be fetched.

FREE CHILD

Read syntax diagramSkip visual syntax diagramFREECHILD( data-value)

Conditions: INVREQ

This command is threadsafe.

Description

FREE CHILD is used by a parent task to free a child token allocated by a previous RUN TRANSID command. If the associated child task has already completed, then the memory object associated with the token is freed immediately, and CICS will also free any child channel (providing it has not been fetched using an EXEC CICS FETCH command).

If the child task has not completed, the memory object will be freed when the child completes, along with any child channel. After this command is issued, any subsequent attempt to reference the token with the FETCH CHILD command will fail with INVREQ, nor will the token be returned by any subsequent FETCH ANY commands.

CICS implicitly frees all child tokens created by RUN TRANSID when the parent task terminates.

Options

CHILD(data-value)
Specifies the child token to be freed. The child token will have been returned from the RUN TRANSID command.

Conditions

16 INVREQ
RESP2 values:
50
The data that is specified in CHILD is not a valid child token, or the child task has already been freed by a FREE CHILD command.