Skip to content

CONNECT SCREEN

FUNCTION

This command enables you to connect to a screen definition specified in Dictionary-IV, display the screen, and initiate single-record maintenance during script execution.

SYNTAX

CONNECT SCREEN screen-name$

screen-name$ the name of a screen definition specified in Dictionary-IV.

NOTES

  • After the screen display is completed, execution resumes with the following Script-IV command.

  • When the screen is displayed users can perform single-record maintenance on the associated file.

  • This command can help reduce the amount of code needed to produce a script. For example, the following lines of code:

    SN 4SCUST
    OPEN SCREEN 4SCUST
    PRINT SCREEN 4SCUST
    INPUT SCREEN 4SCUST

    can be replaced by the following command:

    CONNECT SCREEN "4SCUST"
  • The screen CONNECT component is controlled by the values specified in the SCREEN$[ALL] string array. If the array does not exist, Script-IV will automatically build the array. If the array exists, Script-IV will use the values in the array to control processing.

  • The SCREEN$[ALL] string array is described below:

SCREEN$[ALL] Passed to screen class from a script’s CONNECT SCREEN command.
[0] Execution status
[1] Screen name.
[2] Key of last record edited.
[3] Sort number.
[4] Key value of record to edit.
[5] Not used.
[6] Not used.
[7] CONNECT message:
“AUTO-EXIT” Set SCREEN$[13] = “YY Y”. If SCREEN$[4] = “ “ Put key value from format data area into SCREEN$[4].
[8] View name for F9 key.
[9] Selected field list (Fields to Maintain).
[10] Not used.
[11] Last record read or changed. This is set after each read and after each record is successfully added or changed.
[12] Not used.
[13] On/Off indicators (YN). Space character applies defaults.
(1,1) Exit screen after editing the first record. The default is “N”.
(2,1) Skip maintenance mode window. The default is “N”.
(3,1) Auto key range for view. The default is “N”.
(4,1) Skip printing mode. The default is “N”.
(5,1) Sort change allowed. The default is “Y”.
(6,1) Print screen description in window title. Valid values are:
“ “ Do not print title.
“C “ Center title.
“R “ Right-justify title.
“L” Left-justify title.
The default is “Y”.
[14] Application help code (LLHHHHHH).
[15] Maintenance modes.
“ “ All modes are available.
“A” Add.
“C” Change.
“D” Delete.
“I” Inquire.
“F” Logical screen entry. In this mode records cannot be added, changed, or deleted.
If SCREEN$[15]=“F” Set SCREEN$[13]=“YY Y”
Modes can be used in any combination, except for the “F” mode. For example, “IC” starts in inquiry mode and enables only change and inquiry.
An attempt is made to open the file and read it using the key value provided in SCREEN$[4]. If the file OPEN and READ are successful the data read from the record is supplied as the default data for screen entry, otherwise the format defaults are applied. The screen terminates after the last field is entered.
[16] Window disposition on exit:
“N” Delete screen window before exit. This is the default.
“Y” Do not delete screen window.
“R” Do not delete screen window, read and print the last record entered before the F9 key was pressed to view. Do not clear last record on exit.
“r” Do not delete screen window, read and print the last record before the F9 key was pressed to view.

EXAMPLES

CONNECT SCREEN "4SCUST"

SEE ALSO

CONNECT HELP, CONNECT MENU, CONNECT QUERY, CONNECT REPORT, CONNECT VIEW. For more information on how to edit and maintain a screen see the information on screen definition maintenance in the Dictionary-IV Developer Guide.

From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF