IBM Support

QMGTOOLS: Virtual Terminal program

Troubleshooting


Problem

Emulates a virtual terminal that can perform keystrokes as if it were a user.

Diagnosing The Problem

The MustGather tools library contains some programs to automate functions such as dumping AA macros to ease data collection.

Resolving The Problem


The MustGather tools library contains programs to automate functions such as dumping AA macros, etc to ease some data collections and functions.

Installing

If the QMGTOOLS toolkit has not yet been installed, you should refer to the following document for information on how to download and install QMGTOOLS toolkit on your IBM i server.

http://www-01.ibm.com/support/docview.wss?uid=nas8N1011297


Virtual Terminal menu


1) To access the Virtual Terminal menu, choose the Misc Tools option (in this case, it is option 9) from the main QMGTOOLS menu. To get to the main menu, type GO QMGTOOLS/MG.








2) There are 2 menu option, VTMCMD - Virtual terminal command and VTMAACMD - Virtual terminal SST functions





VTMCMD option

  • -



    VTMCMD - This is the main program to open up a virtual device and run commands.





    Function*NEW - create a new 5250 session
    *RESUME - resume a 5250 session that was not closed
    *CLOSE - close the 5250 session that was opened
    Signon User ID/passThe OS signon when the 5250 session is opened. This is only required if the function is *NEW
    Virtual Device*AUTO - auto select a virtual device
    virtual device name - enter the name of the virtual device to select
    Command 1- A command to be run after the signon completes or *FKEY to not run a command but rather hit an F key or Enter key, etc.
    Function key 1What function to press after command 1

    *NO - no function key
    F1-F24 - function keys
    ENT - enter key
    PGU - page up
    PGD - page down
    Wait for input lineWait for an input field before typing in the command
    Prompt positionA screen can have multiple input fields, which input field to type in the command.
    Chain command Because there can be multiple input fields on a screen, chain means that continue to the next command before performing an action
    Command 2 - Command 4Same definitions as above
    Session data areaData area to store the session information such as session handle, etc.
    DataqData queue for the virtual terminal's send/receive API to interact with
    Output fileOutput file to store the display data
    Output libraryOutput library for the output file

    Example usage :

    In this example, I signed on as user NNGUYEN, ran the DSPNETA, press ENTER, and end. Note that after this command completes, the session is still active. You can either *RESUME to do additional functions, like F3 to back out or *CLOSE to close the session.

    (VTMCMD)

    Type choices, press Enter.

    Function . . . . . . . . . . . . > *NEW *NEW, *RESUME, *CLOSE
    Signon user ID . . . . . . . . . > NNGUYEN Character value
    Signon user pass . . . . . . . . > Character value
    Virtual device . . . . . . . . . *AUTO Name
    Command 1 . . . . . . . . . . . > DSPNETA





    ...
    Function key 1 . . . . . . . . . > ENT ENT, F1, F2, F3, F4, F5...
    Wait for input line . . . . . . Y Y, N
    Prompt position . . . . . . . 001 Name, 001, 002, 003, 004...
    Chain command . . . . . . . . N Name, N



VTMAACMD option
  • -



    VTMAACMD - Virtual terminal setup for SST AA functions. Allows one to save AA macros either with or without user credentials to be run in sequence.






    Function*START - start the AA macros
    *SETUP - setup AA macros, information is stored in a data area that will be retrieved later
    *RMVUSR - remove saved credentials from AA macro setup
    *DLTDTAARA - delete data area containing the saved AA macros
    Predefined macrosLeave as *CUSTOM for now
    Log fileIf using *START, this is the file to store the output from the 5250 session
    LibraryIf using *START, this is the library for the log file
    Clear firstIf using *START, clear the log file first before starting
    Output fileIf using *START, this is the output file to contain the AA dumps
    Output libraryIf using *START, this is the library for the output file
    Clear firstIf using *START, clear the output file first
    Data area prefixFor *SETUP, this is the data area that is created that stores the SST macros and/or user credentials (note that user credentials are stored encrypted).

    For *START, this is the data area that contained the AA macros

    For *RMVUSR, this is the data area to remove the encrypted user credentials

    For *DTLDTAARA, this is the data area to delete off the system

    Data area are stored in the QMGTOOLS library
    Submit jobSubmit the job or not


    If choosing *SETUP, the next screen will appear.



    For Signon and SST user, leave *NONE if you want the user to enter the credentials every time they run the AA stored macros. Enter credentials to run this as a trap via a CL program. Note that user credentials are stored encrypted in the data area.

    Virtual device - if the user wishes to user a named device or leave *AUTO to auto select device
    Data area prefix - this will be the data area to store the information


    The next screen will allow you to put in the macros and options.



    Up to 20 macros can be entered.

    Macro 1-20 - the macro
    Options - the options for the macro
    Delay - delay for xxx seconds before running the macro. The above example will run TASKINFO -ALL F A -TF 2 in the first round, delay for 30 seconds, and run TASKINFO -ALL F A -TF 2 the second round.

    F6 to update the entries.

    After this is done, the user can run the custom defined AA macros with command

    QMGTOOLS/VTMAACMD FUNCTION(*START)
    LOGFILE(DISPLAY QTILIB Y)
    OUTPUT(SSTDUMPS QTILIB Y)
    DTAPRF(DAGBO)

    Where DTAPRF(DAGBO) is the data area that stored the AA macros.

    If user credentials were entered, the command will run. If user credentials were not entered, a screen like this will show up asking for credentials.


[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Document Information

Modified date:
18 December 2019

UID

nas8N1019952