Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Controlling FHS applications from nested S procedures

&pagelevel(5)&pagelevel

The assignments of S variable streams are batched in exactly the same way in nested
S procedures as for system files (SYSDTA, SYSOUT,..). The operand value SYSTEM-FILE-CONTEXT=*STD or *OWN should therefore be set in the SET-PROCEDURE-OPTIONS command if the user wishes the stream assignments also to be processed in batches.

In TPR mode, FHS saves its display environment to agree with the S variable assignments in the TRANSMIT-BY-STREAM command. At the time the assignment is made, FHS initializes a context specific to the variable stream, which is automatically used for every FHS operation on that variable stream. This continues until the assignment ends, e.g. when *DUMMY or another server is assigned to that variable stream - either explicitly or implicitly when the procedure ends (in accordance with the SYSTEM-FILE-CONTEXT assignment).

This mechanism includes the possibility of nested procedures being coded independently, with no overlaying of display commands in different FHS contexts.

In order to ensure independence from the calling procedure, the variable SYSFHS-CONTROL.REFRESH must be assigned the value *YES, so that an operating panel is output when the procedure has been called.

Example

In the procedure P1, the variable stream S1 is assigned to FHS; the operating panel D1 is displayed in procedure P1. P1 calls procedure P2; the variable stream S2 in P2 is also assigned to FHS; P2 displays operating panel D2. D2 completely overwrites D1.

Proc P1 :  assign   S1 -----> FHS 
           displays D1 
           calls    P2 
           pop-up   D11 
Proc P2 :  assign   S2 -----> FHS 
           displays D2 
           exit 

After P2 has ended, FHS returns to the display environment for S1. To effect this, the “pop-up menu” on the current screen (with or without branching, e.g. operating panel D11) is then implicitly reconstructed on the current operating panel for P1 (D1).

Operating panel D2 has been deleted and, the next time that P1 uses a display, operating panel D1 will be reconstructed.

Note

Variables which are to be displayed in an operating panel must be visible in the current S procedure (see section “Scope of variables”).