Application Definition Examples

The following examples show how to use some of the APPLDEF parameters.

Example 1


APPLDEF      TSO              DEST(TSO1)                -      
                USERDATA('LOGON &VIGUSER ACCOUNT(&VIGACCT)') - 
                SIMLOGON('&VIGUSER &VIGPSWD')

In this example, the TSO session ID represents a TSO subsystem. When the user selects TSO, CL/SuperSession uses the logical unit name specified in the DEST parameter to establish a session with TSO. Since a virtual terminal pool is not specified with the POOL parameter, the system initiates the session with a CLSDST PASS.

The USERDATA parameter defines a character string to pass to the application when CL/SuperSession establishes the session. To construct the userdata string, CL/SuperSession substitutes values for all variables in the string. In the example, the amp;VIGUSER variable contains the user ID, and &VIGACCT contains the account number, so CL/SuperSession replaces the variables with the proper user ID and account number. When the system passes the session, TSO uses the userdata string to start the logon process.

The SIMLOGON parameter defines a character string to pass back to the controlling gateway when TSO terminates. The &VIGUSER variable contains the user ID, and amp;VIGPSWD contains the password. When the TSO session ends, the user is automatically logged back onto the gateway. If that gateway resolves the USERID data element by USERDATA(0) and the PASSWORD data element by USERDATA(1), the user need not re-enter a user ID and password.

Example 2


APPLDEF     CICS     DEST=CICSRGN1 ALTDEST=CICSRGN2      -
                     DESC='HOTEL RESERVATION SYSTEM'     - 
                        MESSAGE='AVAILABLE  THIS  WEEKEND'

In this example, the CICS® session ID can represent either of two CICS application regions: CICSRGN1 and CICSRGN2. When the user selects CICS, the gateway tries to establish a CLSDST PASS session with the primary destination application (CICSRGN1) defined by the DEST parameter. If that application is not available, the gateway next tries to start a CLSDST PASS session with the alternative destination application (CICRGN2) defined by ALTDEST. CICSRGN2 provides a backup for CICSRGN1.

A CL/SuperSession operator can update the status message dynamically by reissuing the APPLDEF command with a new MESSAGE parameter. The following dialog example, executed by a trigger, allows users to see the current message text (or the end user can issue an I action code on the CL Main Menu for the desired menu item.


)option popup level(1)
)declare
appl  scope(local)
)prologue
if not &sysparm 
  do
  set  appl  (vssinfo('FOREGRID')) 
  viggap(findappl   '',&appl)
 end 
else
viggap(findappl  '',&sysparm)

)attrs
'*' type(output) color(yellow)         display(high)
'<' type(output) color(turquoise)  display(normal)
'>' type(output) color(turquoise)  display(high)

)body  top  input
Message text for session id &vigtoken

> SESSION ID               MESSAGE
<  ----------                ----------------------------------------
<  &vigtoken           &vigmess
)body  bottom
*HIT  ENTER  TO  EXIT         <&sysid
)epilogue 
set appl ''
return

Example 3: An Initialization Sequence


VSM            DEFINE    VIRT3270      -
               KLST0001  THROUGH(10)   -
                  LOGMODE(D4A32782)
*
APPLDEF        SYSIMS    DEST=PRODIMS  -
                         POOL=VIRT3270 -
                         MULTSESS=NO LOGON='\FF\6D\FF\7D\40\40/FOR   SIGNON+
\FF\7D\40\40\11\4E\D6&VIGUSER\11\50\F6&VIGPSWD'

This example shows how you can define virtual sessions and programmed initialization sequences. The POOL parameter identifies the virtual terminal pool established by the VSM command. When a user selects SYSIMS, the gateway establishes a SINGLE session, since POOL is specified and MULTSESS=NO.

The LOGMODE parameter defines a virtual 3270 device.

The LOGON parameter defines an initialization sequence. With this sequence, the gateway discards the IMS greeting and obtains a transaction entry MFS panel, using the IMS /FOR command. The gateway then presents the USERID and PASSWORD data elements to IMS in the proper buffer locations, thereby automating the complete logon process to IMS.


'\FF\6D\FF\7D\40\40/FOR SIGNON+
\FF\7D\40\40\11\4E\D6&VIGUSER\11\50\F6&VIGPSWD'

The hexadecimal FF character is a transmission turnaround indicator. Because no data precedes the \FF, the gateway simply waits for an IMS message. Since more transactions are present in the initialization sequence, the greeting is discarded when received.

The hexadecimal 6D character is the 3270 terminal CLEAR screen order. The \FF marks the end of an intermediate transaction. Thus, the clear key code is sent to IMS/DC, just as if issued by the user. IMS/DC returns a keyboard unlock sequence to the virtual terminal.

The initialization sequence continues by requesting a SIGNON panel with the IMS FOR command. The hexadecimal 7D4040 segment consists of the 3270 AID code representing the Enter key and the cursor address of row 1 and column 1 of the command line. The /FOR command and panel name follow directly behind these control characters. The hexadecimal FF character instructs the gateway to discard the sign-on panel when it is received.

Finally, the initialization sequence supplies the user ID and password to IMS in the specified fields of the SIGNON panel. The hexadecimal 7D4040 represents the 3270 AID code for the Enter key and cursor position. The hexadecimal 114ED6 represents the 3270 SBA (set buffer address) code and screen location for row 12 column 39. The session variable &VIGUSER, which contains the USERID, is presented at this location. The hexadecimal 1150F6 represents the 3270 SBA code and screen location for row 14 column 39. The variable &VIGPSWD, which contains the password, is presented at this location. This will appear to IMS as if the user entered a user ID and password, and then pressed Enter. Because this is the last sequence in the LOGON string, the IMS reply to the sign-on transaction passes directly to the user's terminal.

Example 5

A sample CICS logoff sequence is included in member KLSTERMD of &thilev.SKLSSAMP. The example shows how to perform a normal CICS SIGNOFF instead of a forced logoff for CICS.