Can I use numbers to activate sessions from the TPX menu?

Document ID : KB000023771
Last Modified Date : 03/05/2018
Show Technical Document Details
Introduction:
How to implement session numbers on CA TPX menu?  
For example, if TSO is the third session in my menu is there a way to enter only a '3' to start TSO?
Question:

Can I use numbers to activate sessions from the TPX menu?

Environment:
CA TPX for z/OS
    Answer:

    This can be achieved by using modified versions of panels TEN0041 and TEN0010 as well as a customized TPX Command exit, TPXUCMND.

    Samples are included with TPX 5.4 Published Solution SO01585  - TITLE: CA TPX MIGRATION - NEW SAMPLES

    • panel TEN0041
    • panel TEN0010
    • user Command exit TPXUSES#

    The enhancement to the panels uses the CA TPX Internal row number variable as session numbers, while the User Command Exit is used to interpret row numbers to activate the application session selected. 

    To implement session numbers on the CA TPX main menu:

    1. Place a copy of CB0VSRC members TEN0041 & TEN0010 into a library concatenated ahead of the delivered panel libraries (CB0VP*) that you are using in your TPX proc PANELS DD statement.
      • If you use other languages than 'EN' you must change your Txx0041 and Txx0010 panels according to the changes in TEN0041 and TEN0010.
    2. Assemble CB0VSRC member TPXUSES# and link as TPXUCMND.  Place this executable member in a library concatenated ahead of the delivered CB0VLOAD libraries.

    This should result in a TPX menu that looks similar to this where you can specify the session number on the command line:

                          TPX MENU FOR      USER001            Panelid  - TEN0041 
                                                               Terminal - 
    Cmdkey=PF22       Jump=PF23      Menu=PF24                 Model    - 
    Print=NONE        Cmdchar=#                                System   - 
                                                                                  
        # Sessid      Sesskey       Session Description            Status         
                                                                                  
     _ 01 CICS1       PF            CICS ABC                         O/P          
     _ 02 CICS2       PF            CICS XYZ                         N/A        
     _ 03 TSO1        PF            TSO1                   
     _ 04 TSO2        PF            TSO2
     ...
    Command ===> 3                                                            
    PF1=Help  PF7/19=Up  PF8/20=Down  PF10/22=Left  PF11/23=Right  H =Cmd Help

       

      Additional Information:

      A) You can also find these samples as part of our CA VMAN to CA TPX conversion package. This code was developed to help customers converting from CA VMAN to CA TPX. In CA VMAN it was possible to start a session by its number on the menu.

      Use members from yourHLQ.TPX.Rxxx.CAI.V2TCNTL. (This is created by UNZIPJCL in ISHELL from the pax.z file.)  This data set contains 4 members:

      • Modified TPX menu panels TEN0041 and TEN0010  
      • TPXUCMND exit code - The attached TPXUCMND contains the code to work with the modified panels.
      • CONVERT - You will not use this JCL unless you are actually converting VMAN data to TPX.

      B) You can find JCL to assemble user exits in CB0VSRC(ASMUXIT).  See  How does one implement a CA-TPX user exit?  Document ID : KB000025908
      https://comm.support.ca.com/kb/how-does-one-implement-a-catpx-user-exit/kb000025908