PUT_FIELD

Use the PUT_FIELD statement to place a value into a defined field on a 3270 screen.

If the specified field is not found in the database, the EX_NO_FIELD exception definition script is invoked. By default, the script is abnormally terminated. To handle a failed PUT_FIELD statement in a different way, you need to write an exception handler for this condition, as described in EXCEPTION.

If the 3270 terminal emulation session is in keyboard lock condition (indicating that the host system is busy), when the PUT_FIELD statement is executed, the EX_KEYB_LOCK exception definition script is invoked. By default, the script is abnormally terminated. To handle a failed PUT_FIELD statement in a different way, you need to write an exception handler for this condition, as described in EXCEPTION.

Syntax


This picture shows the syntax of the PUT_FIELD statement.

Examples

PUT_FIELD ( logon.command_line, "H" );
PUT_FIELD ( main_menu.extension_field, extension );

Procedure

To use the 3270 Script window’s Statements menu to define a PUT_FIELD statement, follow this procedure:

  1. From the Welcome window, click on Applications —> 3270 Servers
  2. Selecting the PUT_FIELD statement : Click Statements —> Screen —> Put Field.

    The system displays the Put Field Definition window.

  3. Specifying the field : Type the name of the defined field next to Field, or click Field to display the Field Selection window to select the field.

    In the Field Selection window:

    • Click the button next to System Server if the field exists on a screen that is defined to the 3270 server named system. Scripts and screens defined to the system server can be accessed by all 3270 servers.
    • Click the required screen and field.
    • Click the Detail pushbutton to show the description of the selected field.
  4. Specifying the result variable : Type the input value next to Value, or click Value to display the Term Definition window to select the value.
  5. Adding the statement to the script : Click OK.

    The PUT_FIELD statement is added to the script.