$ScrHide

From m204wiki
Revision as of 22:20, 19 November 2012 by JAL (talk | contribs)
Jump to navigation Jump to search

Hide lines in SCREEN

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $ScrHide function is to be entered.

This callable function adjusts a SCREEN structure so that all fields after a specific line number are hidden (not displayed) on subsequent READ SCREEN statements. This makes it possible to build a screen that contains more lines than would fit on all terminal models and then hide an appropriate number of lines based on terminal model number. The $ScrHide statement can also be used to provide space for the $ScrWide function for Model 5 terminals.

Syntax

[%result =] $ScrHide(scr_name, line_num)

Syntax terms

%result This numeric value indicates the function result. See "Status codes".
scr_name The name of the screen on which fields are to be hidden.
line_num The line number of the first line on the screen to be hidden. Fields on this line number and all subsequent lines are hidden.

Status codes

0 — No errors 1 — SCREEN does not exist or invalid screen name 2 — Invalid line number

Examples

  1. This code fragment hides all lines after line 24 on screen INPUT:

    [%rc =] $scrhide('INPUT', 24)

  2. Using $ScrHide, $ScrWide and $ScrSize you can expand the number and size of 3270 screen lines available to your User Language programs to the maximum that will fit on the terminal type. Here is an example technique for presenting as much information as the user's screen can contain:

    SCREEN USER1 * Line 02: PROMPT '===>' WHITE AT 2 - INPUT COMMAND GREEN AT 7 LEN 40 * Line 03: PROMPT LINE1 AT 2 LEN 77 * Line 04: PROMPT LINE2 AT 2 LEN 77 ... * Line 44: PROMPT LINE42 AT 2 LEN 77 * Line 45: PROMPT LINE43 AT 2 LEN 77 END SCREEN %SCR.LENGTH = 24 %SCR.WIDTH = 80 %SCR.MODEL = $VIEW('MODEL') JUMP TO (MOD0, MOD0, MOD3, MOD4, MOD5) %SCR.MODEL JUMP TO MOD0 MOD3: %SCR.LENGTH = 32 JUMP TO MOD0 MOD4: %SCR.LENGTH = 43 JUMP TO MOD0 MOD5: %SCR.LENGTH = 27 %SCR.WIDTH = 132 MOD0: %MAX.WIDTH = %SCR.WIDTH - 3 %X = $SCRHIDE( 'USER1' , %SCR.LENGTH ) %X = $SCRWIDE( 'USER1' ) %SCROLL.LEN = %SCR.LENGTH - 7 FOR %X FROM 1 TO %SCROLL.LEN + 1 %LINE = 'USER1:LINE' WITH %X %X = $SCRSIZE( %LINE , %SCR.WIDTH ) END FOR

Products authorizing $ScrHide

  • Sirius Functions