Skip to content

CONNECT VIEW

FUNCTION

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

SYNTAX

CONNECT VIEW view-name$
view-name$
the name of a view definition specified in Dictionary-IV.

NOTES

  • After the view completes, execution resumes with the following Script-IV command.

  • When the view is displayed users can perform multi-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:

    VN 4SVCUST
    OPEN VIEW 4SVCUST
    PRINT VIEW 4SVCUST
    KEY INTO CUST-CODE
    WINDOW LINE IS 10
    COLUMN IS 3
    NUMBER LINES ARE 10
    CHARACTERS ARE 60
    BORDER IS "G"
    FUNCTION IS "C"

    can be replaced by the following commands:

    DIM VIEW$[17]
    LET VIEW$[10] = "P"
    CONNECT VIEW "4SVCUST"

    The VIEW$ string array is described below.

  • The view CONNECT component is controlled by the values specified in the VIEW$[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 VIEW$[ALL] string array is described below:

VIEW$[ALL] Passed to view class from a script’s CONNECT VIEW command.
[0] Execution status.
[1] View name [, link-name]: If the view name is not found, create the view using the specified link. If the view name is not found and the link name is not specified, search for a link that uses the view name; if the search is successful, create a view with the same name as the found link.
[2] Selected key. If VIEW$[10]=“P” the value of the KEY INTO clause is returned into VIEW$[2].
[3] Sort number.
[4] Starting key value when the view is first displayed.
[5] Starting key range allowed while in the view.
[6] Ending key range allowed while in the view.
[7] CONNECT message:
SORT n, USING [RANGE FROM TO], SELECT WHEN
[8] Screen name for F9 key.
[9] Cursor mode:
“C” Single character cursor.
“E” Entire field in reverse video. Uses view color bar.
“F” Full row in reverse video. Uses view color bar.
[10] Carriage return:
“F” Field edit.
“S” Single-record maintenance. Press F4 at maintenance options to return.
“s” Single-record maintenance. Return after one record is edited.
“E” Exit and return current key in VIEW$[2].
“P” Simulate PRINT VIEW functionality.
[11] Not used.
[12] Not used.
[13] On/Off indicators (YN). Space character applies defaults.
(1,1) Key change allowed. The default is “Y”.
(2,1) Data change allowed. The default is “Y”.
(3,1) View alterations allowed. The default is “Y”.
(4,1) Leave view window displayed after exit. The default is “N”.
(5,1) Sort change allowed. The default is “Y”.
[14] Application help code (LLHHHHHH).
[15] Reserved for system use.
[16] Command processing mode:
(1,1) “N” Count.
“L” List. Same as a view.
“S” Sum.
“P” Print hardcopy.
“C” Copy.
“M” Move.
“D” Delete.
“c” Change.
(2,1) Verify (Y/N) for C, M, D, or c.
(3,8) Link name for C, M, or D.
OR
(2,1) SUM number of elements.
(3,n) Elements to sum.
(3+n, x) Command description.
OR
(3,n) Change expression.
(3+n, x) Command description.
[17] Reserved for system use.

EXAMPLES

DIM VIEW$[17]
LET VIEW$[10] = "E"
CONNECT VIEW "4SVCUST"

SEE ALSO

CONNECT HELP, CONNECT MENU, CONNECT QUERY, CONNECT REPORT, CONNECT SCREEN, PRINT VIEW. For more information on how to edit and maintain views see the Dictionary-IV Reference Manual.

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