Use the SET_CURSOR statement to explicitly position the cursor on a 3270 screen.

Use this statement when you plan to execute and debug your 3270 server script using the Blueworx Voice Response virtual host support, described in the Blueworx Voice Response for AIX: Designing and Managing State Table Applications information.

The SET_CURSOR statement is not available from the Statements menu. Use the syntax described below to type the statement into your script.

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 SET_CURSOR statement in a different way, you need to write an exception handler for this condition, as described in EXCEPTION.


This picture shows the syntax of the SET_CURSOR statement.


SET_CURSOR ( logon.command_line );


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

  1. From the Welcome window, click on Applications —> 3270 Servers
  2. Selecting the SET_ CURSOR statement: Click Statements —> Screen —> Set_Cursor.

    The system displays the Set_Cursor Definition window.

  3. Selecting the parameter by Field Position : In the Set Cursor by field, click Field Position.
  4. 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.
  5. Selecting the parameter by Field Position: In the Set Cursor by field, click Row/Column Position.
  6. Click Row... and click a Term Type and term from the Term Definition window.
  7. Click Column... and click a Term Type and term from the Term Definition window.
  8. Adding the statement to the script: Click OK.

    The SET_CURSOR statement is added to the script.