z/OS Communications Server: SNA Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Orderly closing of a program operator

z/OS Communications Server: SNA Programming
SC27-3674-00

When a program operator is about to be closed, unreceived VTAM® messages can still be queued for it. Issuing the CLOSE macroinstruction results in a return code (76), which indicates there are messages waiting. At this point, before a second CLOSE macroinstruction is issued, the program operator can issue only RCVCMD macroinstructions or SENDCMD macroinstructions with a REPLY command. This permits the program operator to receive the messages that are still waiting and to answer any that require a reply.

When all the messages have been received, a return code for a RCVCMD macroinstruction indicates that there are no more messages waiting. A second CLOSE macroinstruction then completes normally. Because VTAM does not queue these RCVCMD macroinstructions, it is recommended that they be issued with NQ specified in the OPTCD operand. VTAM accepts the RCVCMD macroinstruction with the Q option; however, when there are no messages remaining on the queue, the RCVCMD macroinstruction completes with (RTNCD,FDB2)=(X'14',X'70'). If NQ is specified, the request completes with (RTNCD,FDB2)=(X'00',X'06') when there are no more messages queued. Alternatively, a program operator can issue a second CLOSE macroinstruction without receiving the queued messages. The second CLOSE causes the outstanding messages that do not request a reply to be discarded. Messages that require a reply and have not been received or replied to are sent to the system console.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014