Often it is useful to view two streams at the same time. For example,
you could view the listing of a program in the top window while using
TSO/E TEST or some other debugging facility in the bottom window.
You could also view HELP information or other data in the top window
and enter new commands in the bottom window.
The examples on the
following pages
illustrate how you can use CLISTs to split the display screen horizontally
and vertically. These CLISTs are located in SYS1.ADFMAC1 so you do
not have to create them yourself. The ADFHSPLT CLIST splits the screen
horizontally as shown in Figure 3.
The ADFVSPLT CLIST splits the screen vertically as shown in Figure 5.
Both ADFHSPLT and ADFVSPLT depend on the ADFSETUP CLIST to place
information in the HEADER and EXTRA2 streams. ADFSETUP requires a
partitioned data set of CLISTs that you must allocate to the ddname
of SYSPROC for implicit execution of the other CLISTS. If you use
either ADFHSPLT or ADFVSPLT, execute ADFSETUP once at the beginning
of your terminal session.
Note: If you issue the RESET command during your session, Session
Manager clears the HEADER stream and then redefines it to contain
only that information needed for the default environment. Therefore,
you will need to re-execute the ADFSETUP CLIST to place the CLIST
information in the HEADER stream again.
Figure 1. ADFSETUP CLIST/*********************************************************************/
/* THIS CLIST PLACES DATA IN THE "HEADER" STREAM AND IN THE "EXTRA2" */
/* STREAM FOR THE "ADFHSPLT" AND THE "ADFVSPLT" CLISTS. */
/* IT SHOULD BE EXECUTED ONCE AT THE BEGINNING OF */
/* THE SESSION. THIS CLIST REQUIRES A PDS CLIST DATA SET TO BE */
/* ALLOCATED TO THE DDNAME OF "SYSPROC" FOR IMPLICIT EXECUTION OF */
/* OTHER CLISTS - AS DESCRIBED IN "CLISTS: IMPLEMENTATION AND */
/* REFERENCE". */
/*********************************************************************/
SMPUT /PUT 'TOP ===> BOTTOM=> RIGHT =>LEFT ==>' HEADER I(2)/
SET I=1
DO WHILE &I < (&SYSLTERM-5)
SMPUT /PUT | EXTRA2 I(2);PUT | EXTRA2 I(2); PUT | EXTRA2 I(2)/
SET &I=&I+1;
END
The comments in the ADFHSPLT CLIST (see Figure 2) outline how this CLIST redefines
the screen. Notice also how the LTITLE window is scrolled to the
right and left to display "TOP" or "BOTTOM" in the HEADER
stream. This indicates which window is the current default window
so you can easily control which window Session Manager moves when
you press one of the scroll PF keys. When you execute the ADFHSPLT
CLIST, your display screen looks similar to Figure 3.
Figure 2. ADFHSPLT CLISTPROC 0 LINE()
/*********************************************************************/
/* THIS CLIST SETS UP A "SPLIT - SCREEN" SESSION MANAGER SCREEN */
/* LAYOUT. IT ASSUMES THE IBM - SUPPLIED DEFAULT SCREEN LAYOUT IS */
/* THE CURRENT SCREEN LAYOUT WHEN IT IS INVOKED: */
/* - THE WINDOW "LINE" IS MOVED TO THE ROW SPECIFIED BY "LINE". */
/* - THE WINDOW "CURRENT" IS EXPANDED TO FILL IN THE SPACE CREATED */
/* AND BECOMES THE "BOTTOM" WINDOW. */
/* - THE WINDOW "SPACE" IS DEFINED TO FILL IN THE AREA ABOVE THE */
/* SCROLL AMOUNT VALUE IF NEEDED. */
/* - THE SCREEN AND PF KEYS ARE SAVED BEFORE THE SCREEN IS MODIFIED. */
/*********************************************************************/
IF &LINE = THEN SET &LINE = &EVAL((&SYSLTERM-5)/2)
IF &LINE < 2 | &LINE > &EVAL(&SYSLTERM-3) THEN +
EXIT
SET &TOPS = &LINE -1
SET &BOT = &LINE +1
SET &BOTS = &EVAL(&SYSLTERM-1) - &BOT;
SET &BOTSX = &EVAL(&SYSLTERM-3) - &BOT;
IF &BOTSX > 0 THEN +
SET &WIN = +
DEF.W SPACE &BOT &EVAL(&SYSWTERM-17) &BOTSX 18 P(Y) V(EXTRA2);+
S.A 2 SPACE;
ELSE +
SET &WIN =
SMPUT /SAVE SCREEN;SAVE.PFK;+
SAVE.WIN MAIN;SAVE.WIN LINE;SAVE.WIN CURRENT;+
DEL.WIN MAIN;DEL.WIN LINE;DEL.WIN CURRENT;+
DEFINE.WINDOW MAIN 1 1 &TOPS &EVAL(&SYSWTERM);+
DEFINE.WINDOW LINE &LINE 1 1 &EVAL(&SYSWTERM);+
DEFINE.WINDOW CURRENT &BOT 1 &BOTS &EVAL(&SYSWTERM-18);+
&WIN;+
RES.WIN CURRENT;RES.WIN LINE;RES.WIN MAIN;+
CHANGE.WINDOW MAIN OVERLAP(1) HOLD(0)/
/*********************************************************************/
/* DEFINE PF 3/15 TO RE-INVOKE THIS CLIST, ACCEPTING AS INPUT THE */
/* LINE (ROW) TO PLACE THE SPLIT AT. PRESSING PF 3/15 WITH NO INPUT */
/* WILL RESTORE THE SCREEN AND PF KEYS TO THEIR ORIGINAL STATUS. */
/* */
/* PF 9/21 IS DEFINED TO SWITCH THE DEFAULT WINDOW BETWEEN THE "TOP" */
/* WINDOW AND THE "BOTTOM" WINDOW: THUS SETTING WHICH WINDOW IS */
/* SCROLLED WHEN PF 5/17, 7/19, 8/20, 10/22, 11/23, 12/24 IS PRESSED.*/
/* THE "LTITLE" WINDOW IS MOVED TO DISPLAY THE NAME OF THE WINDOW */
/* THAT IS CURRENTLY THE DEFAULT WINDOW. (THE NAMES WERE PREVIOUSLY */
/* IN THE "HEADER" STREAM). */
/*********************************************************************/
SMPUT /CHANGE.PF 3 'PUT ''RESTORE.SCREEN;RESTORE.PFKS;+
RESTORE.PFKS;'' SMIN;+
PUT ''%ADFHSPLT L(0¢1.)'' TSOIN' SMIN SUB(¢);+
CHANGE.PF 9 'CHANGE TERMINAL DEFAULT(CURRENT);SAVE.PF;+
SCROLL.LEFT LTITLE A(MAX);SCROLL.RIGHT LTITLE A(10);+
CHANGE.PF 9 ''CHANGE.TERMINAL DEFAULT(MAIN);+
RESTORE.PF;SCROLL.LEFT LTITLE A(MAX)'' SMIN' +
SMIN;SCROLL.ABSOLUTE 11 LTITLE/
SMPUT /CHANGE.PF 15 'PUT ''RESTORE.SCREEN;RESTORE.PFKS;+
RESTORE.PFKS;'' SMIN;+
PUT ''%ADFHSPLT L(0¢1.)'' TSOIN' SMIN SUB(¢);+
CHANGE.PF 21 'CHANGE TERMINAL DEFAULT(CURRENT);SAVE.PF;+
SCROLL.LEFT LTITLE A(MAX);SCROLL.RIGHT LTITLE A(10);+
CHANGE.PF 21 ''CHANGE.TERMINAL DEFAULT(MAIN);+
RESTORE.PF;SCROLL.LEFT LTITLE A(MAX)'' SMIN' +
SMIN;SCROLL.ABSOLUTE 11 LTITLE/
Figure 3. Horizontal Split
of the Display Screen
----.----1----.----2----.----3----.----4----.----5----.----6----.----7----.----
|
|
|
|
|
|
|
|
|
|
|
|
SCROLL===>HALF
TOP===>UNLOCKED
=> -
|
The ADFVSPLT CLIST is very similar to the ADFHSPLT CLIST. You
might find this CLIST useful when testing programs or comparing members
of a partitioned data set. For example, you could use the CLIST to
do the following:
- Use the LISTDS command to list the members of a partitioned data
set
- Lock the MAIN window by pressing PF10 (scrolling to the left when
the window is already at the left border merely locks the window)
- Execute the ADFVSPLT CLIST and press PF9 to make the RIGHT window
the default window
- Press PF12 to unlock the RIGHT window and enter the LISTDS command
for the second data set whose members you want to display
- By using PF9 to change the default window to the left side (the
MAIN window), you can use the other PF keys to scroll the windows
and compare the members of the data sets
Figure 4 is the ADFVSPLT CLIST
and Figure 5 illustrates what
the display screen looks like when this CLIST has been executed.
Figure 4. ADFVSPLT CLISTPROC 0 COL()
/*********************************************************************/
/* THIS CLIST SETS UP A "SPLIT - SCREEN" SESSION MANAGER SCREEN */
/* LAYOUT. IT ASSUMES THE IBM - SUPPLIED DEFAULT SCREEN LAYOUT IS */
/* THE CURRENT SCREEN LAYOUT WHEN IT IS INVOKED: */
/* - THE "MAIN" WINDOW IS SPLIT VERTICALLY: */
/* - THE "MAIN" WINDOW IS REDEFINED WITH A NEW WIDTH OF "COL" -1 */
/* AND BECOMES THE "LEFT" WINDOW. */
/* - A NEW WINDOW "SPLIT" IS CREATED TO PROVIDE A VISUAL INDICATION */
/* OF THE SPLIT. IT VIEWS THE "EXTRA2" STREAM IN WHICH VERTICAL */
/* BARS HAVE BEEN PLACED PREVIOUSLY. */
/* - THE WINDOW "RIGHT" IS DEFINED TO FILL IN THE AREA TO THE RIGHT */
/* OF THE "SPLIT" WINDOW. ITS ATTRIBUTES ARE FILLED IN BY */
/* RESTORING A COPY OF THE ATTRIBUTES OF THE "MAIN" ("RIGHT") */
/* WINDOW FROM THE "WINDOW" STACK. */
/* - THE SCREEN AND PF KEYS ARE SAVED BEFORE THE SCREEN IS MODIFIED. */
/*********************************************************************/
IF &COL = THEN SET &COL = &EVAL((&SYSWTERM)/2)
IF &COL < 5 | &COL > &EVAL(&SYSWTERM-5) THEN +
EXIT
SET &LEFTS = &COL - 1
SET &RIGHT = &COL + 2
SET &RIGHTS = &EVAL(&SYSWTERM+1) - &RIGHT;
SMPUT /SAVE.SCREEN;SAVE.PFK;+
SAVE.WIN MAIN;SAVE.WIN MAIN;DELETE.WIN MAIN;+
DEFINE.WIN MAIN 1 1 &EVAL(&SYSLTERM-5) &LEFTS;+
DEFINE.WIN SPLIT 1 &COL &EVAL(&SYSLTERM-5) 2 +
HOLD(0) VIEW(EXTRA2) PROTECT(YES);+
SCROLL.ABSOLUTE 2 SPLIT;+
DEFINE.WIN RIGHT 1 &RIGHT &EVAL(&SYSLTERM-5) &RIGHTS;+
RESTORE.WIN MAIN;RESTORE.WIN RIGHT/
/*********************************************************************/
/* PF 9/21 IS DEFINED TO SWITCH THE DEFAULT WINDOW BETWEEN THE "LEFT"*/
/* WINDOW AND THE "RIGHT" WINDOW: THUS SETTING WHICH WINDOW IS */
/* SCROLLED WHEN PF 5/17, 7/19, 8/20, 10/22, 11/23, 12/24 IS PRESSED.*/
/* THE "LTITLE" WINDOW IS MOVED TO DISPLAY THE NAME OF THE WINDOW */
/* THAT IS CURRENTLY THE DEFAULT WINDOW. (THE NAMES WERE PREVIOUSLY */
/* IN THE "HEADER" STREAM. */
/* */
/* DEFINE PF 3/15 TO RE-INVOKE THIS CLIST, ACCEPTING AS INPUT THE */
/* LINE (ROW) TO PLACE THE SPLIT AT. PRESSING PF 3/15 WITH NO INPUT */
/* WILL RESTORE THE SCREEN AND PF KEYS TO THEIR ORIGINAL STATUS. */
/*********************************************************************/
SMPUT /CHANGE.PF 9 'CHANGE.TERMINAL DEFAULT(RIGHT);SAVE.PF;+
SCROLL.LEFT LTITLE A(MAX);SCROLL.RIGHT LTITLE A(20);+
CHANGE.PF 9 ''CHANGE.TERMINAL DEFAULT(MAIN);RESTORE.PF;+
SCROLL.LEFT LTITLE A(MAX);+
SCROLL.RIGHT LTITLE A(28)'' SMIN' SMIN;+
SCROLL.ABSOLUTE 11 LTITLE;+
SCROLL.RIGHT LTITLE A(28);+
CHANGE.PF 3 'PUT ''RESTORE.SCREEN;RESTORE.PF;+
RESTORE.PF'' SMIN;+
PUT ''%ADFVSPLT COL(0¢1.)'' TSOIN' SMIN SUB(¢)/
SMPUT /CHANGE.PF 21 'CHANGE.TERMINAL DEFAULT(RIGHT);SAVE.PF;+
SCROLL.LEFT LTITLE A(MAX);SCROLL.RIGHT LTITLE A(20);+
CHANGE.PF 21 ''CHANGE.TERMINAL DEFAULT(MAIN);RESTORE.PF;+
SCROLL.LEFT LTITLE A(MAX);+
SCROLL.RIGHT LTITLE A(28)'' SMIN' SMIN;+
SCROLL.ABSOLUTE 11 LTITLE;+
CHANGE.PF 15 'PUT ''RESTORE.SCREEN;RESTORE.PF;+
RESTORE.PF'' SMIN;+
PUT ''%ADFVSPLT COL(0¢1.)'' TSOIN' SMIN SUB(¢)/
Figure 5. Vertical Split
of the Display Screen |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
----.----1----.----2----.----3----.----4----.----5----.----6----.----7----.----
SCROLL==>HALF
LEFT==>UNLOCKED
=> -
Both ADFHSPLT and ADFVSPLT define PF 3/15 as the END key. When
you are ready to go back to your original screen, just press PF3/15.
If at any time you want to switch back to the default screen layout
and PF key definitions, clear the screen by pressing the CLEAR key
and type in the RESET command.