SEND CONTROL


The SEND CONTROL option is used to send the control to the terminal without any map or text data. This provides a dynamic way for transmitting control to the terminal.

Syntax -

EXEC CICS SEND CONTROL
     CURSOR(cursor-position)
     ERASE
     RESP(response-variable)
	 PRINT|FREEKB|ALARM|FRSET
END-EXEC.
  • CURSOR(cursor-position) - Optional. It specifies the cursor's position on the terminal after the map is displayed.
  • ERASE - Optional. Clears the screen. It is responsible for the below three tasks -
    • Erases the screen buffer.
    • Erases the screen print buffer.
    • Place the cursor on the upper left corner of the screen.
  • RESP(response-variable) - Optional. It captures the response code of the operation and used to check if the command executed successfully or encountered an error.
  • PRINT - Optional. This option specifies that prints should be initiated at the printer.
  • FREEKB - Optional. This option indicates that the keyboard should be unlocked after the data has been written. If the FREEKB option is not used, the keyboard will remain locked.
  • ALARM - Optional. This option activates the audible alarm feature of the 3270.
  • FRSET - Optional. This option specifies that the modified data tags (MDTs) of all fields should be reset to their unmodified state before any data is written to the buffer.

Short Examples -


Scenario - Clearing the Screen and Unlocking the Keyboard

EXEC CICS SEND CONTROL
     ERASE
     FREEKB
     RESP(RESP-CODE)
END-EXEC.

Explanation -

  • ERASE: Clears the terminal screen.
  • FREEKB: Unlocks the keyboard, enabling user input.
  • RESP(RESP-CODE): Captures the response code for error handling.

Error Conditions -


Eror Condition RESP RESP2 Reason
INVREQ 16 Not set Control information is output to the same partition or LDC while a BMS logical message is active.
RETPAGE 32 Not set Occurs if the SET option is specified and a completed page is ready for return to the application program.
Return control to the application program at the point immediately after the BMS SEND CONTROL command.
TSIOERR 35 Occurs if there is an irrecoverable temporary storage input/output error.
IGREQID 39 Occurs if the prefix specified in the REQID option is different from that established by a previous REQID option.