Unattended Message Filters (VTAM)


Performance Test for VTAM’s Unattended Message Filtering function creates new scripts by taking existing scripts and removing certain messages. This function determines which messages to include and which to exclude. You can use this function to:

  • Simplify testing by producing scripts that contain a single message allowing you to test one message at a time
  • Remove messages that contain confidential data
  • Reduce script size by eliminating messages of no interest.

To filter a script, choose the messages to include or exclude by describing the screens in those messages. You do not have to describe the screens exactly, and you do not have to describe every screen. Often, you can describe just the first and last screens of a message, and Performance Test includes or excludes everything in between.

In addition to filtering based on screen descriptions, you can filter based on the user input contained in the script, such as pressed function keys and typed data. For example, If you know that a message starts when the user types PAYR and presses Enter, you can have Performance Test start including screens from the script when those conditions are met.

The message filter function can also filter unformatted scripts. These types of scripts are usually produced for sessions involving LU0 devices, such as financial terminals. In these cases, there are no recorded screens. You choose the start and end of the messages by describing the content of the unformatted data streams.

How the message filter works

The message filter program (EHSFLTR) starts with a source script data set containing already-recorded scripts. It processes this data set and produces a target script data set that contains the new scripts. You can select a single member of a source data set, a list of members, or all members in the data set for processing.

Tell Performance Test how to process the scripts by supplying:

  • A list of the messages to be included or excluded in the filter process
  • A small REXX exit program for each message (you can either use interactive panels to create the program or write your own).

The REXX exit program examines screen images in the scripts to decide if they match the list of “filter” messages. Performance Test for VTAM calls each exit for every input and output contained in the source script, and then passes information on the current screen contents to your exit program. The exit then decides whether the current screen is a match for your filter message.

Performance Test uses the results of your exit program to decide if the series of inputs and outputs should be included or excluded from your target script data set.

A description of an example message filtering batch job is provided in Sample Message Filtering Job.

REXX exit processing

Every time Performance Test sees an <INPUT> or <OUTPUT> group of script tags, it calls your exit programs, one at a time, in the same order as you listed them in the SYSIN data. Each exit looks at every piece of <INPUT> and <OUTPUT> data.

You supply the exit program with several REXX variables that it uses to decide if the current screen (or input) matches something of interest. REXX variables are special names that contain data from the Performance Test script.

You can type the variable names in lowercase or uppercase. However, the case of the data contained in the variables may be important.

Your exit program determines whether the current screen or input matches one of your messages by setting the HS_MATCH variable. If the current screen or input is a match, set HS_MATCH = 1. If not, set HS_MATCH = 0.

After all of your exit programs have run for a particular screen or user input, Performance Test looks at each HS_MATCH value set by each of your exits (the INCLUDE and EXCLUDE statements). It stops as soon as HS_MATCH = 1 is found. Performance Test starts with the bottom exit in your list and works towards the top exit.

If HS_MATCH = 1 is not found, Performance Test includes the screen or user input by default and copies it to your target script data set. You can change this default to exclude rather than include by changing it to “CONTROL DEFAULT=EXCLUDE”.

If HS_MATCH = 1 is found, Performance Test includes or excludes the screen or user input, based on whether an INCLUDE or EXCLUDE exit is set on HS_MATCH.

If you supply more than one exit, the results from each exit (to include or exclude a screen) may conflict. One exit might say INCLUDE a screen while another exit might say EXCLUDE. Performance Test resolves these conflicts with this rule: the exit closest to the bottom that decides a screen is a match is the one that is used. For an EXCLUDE exit, the screen is not copied to the target script data set. For an INCLUDE exit, the screen is copied to the target script data set.

Deciding what screens are in a message

You have probably already thought of a message to focus on from your collection of scripts, perhaps to simplify testing you are about to perform. For example, you would like to produce a new set of scripts that contain only the single message you have in mind.

After you have located the script data set containing those scripts, the next step is to decide what features in those scripts mark the start and end of your message.

Here are some guidelines for identifying the start of your message:

  • If your message is always started with a unique command typed on the screen, you can use an HS_INPUT.n variable in your REXX exit program to test for the command. When you see the command, set HS_MATCH = 1.
  • If your message is always started by typing a selection value from a menu, you can look for that value in an HS_INPUT.n variable while also checking that the screen contents (a title, for example) are what you expect (with an HS_OUTPUT.n variable).
  • If your message is started by placing your cursor on a menu item and pressing Enter or a PF key, you can test both of those items in your exit. Test the cursor location with the HS_ROW and HS_COLUMN variables and test the key pressed with HS_KEY. Also check that the screen contents (a title, for example) are what you expect (with an HS_OUTPUT.n variable).
  • If your message is started by pressing a PF key, test the HS_KEY variable in your exit.

Here are some guidelines for identifying the end of your message:

  • If your message always includes screens that have a unique title or identification label, you can look for that set of characters in your exit with an HS_OUTPUT.n variable. As soon as you do not see that special set of characters, you can set HS_MATCH = 0 as the signal to Performance Test that the message is over.
  • If your message always includes screens that have one of several identification labels, you can put code in your exit that looks for any of those labels. Your exit contains a list of the possible labels that are part of your message. You can use a REXX “DO loop” to see if the current screen contains any of those labels. If your “DO loop” never finds a match, you know that your message has ended and you let Performance Test know by setting HS_MATCH = 0.
  • If your message ends when the user presses a unique PF key, you can test for that key (with the HS_KEY variable) in your exit.

The most important part about deciding where your message starts and ends is knowing what the screens look like in your message. The technique that you decide to use depends on the nature and appearance of your message’s screens. You can use Performance Test’s session demo from ISPF to review the screens in your scripts. Session demo helps you visualize the screen features that are good test items in your REXX exit programs.

There are two ways to filter Performance Test messages. Use interactive forms to guide you through the process, or write your own REXX exit program. Whichever method you choose, the message filter works in the same way.

Interactive message filtering

With interactive message filtering, you fill in forms that help you write a REXX exit program that filters the messages (see previous sections). It also gives you the option of running in foreground or background mode.

  1. To access message filtering, select Script Processors from the Main Menu. Then select option 9 Message Filtering on the Script Processors screen and press Enter. The Message Filtering * Primary Options screen appears.
    Message Filtering * Primary Options screen

                              .  --------------------- Message Filtering * Primary Options --------------------- .
                              .  Option ===>                                                                     .
                              .                                                                                  .
                              .  Enter Filter dataset name and select option, then press ENTER                   .
                              .                                                                                  .
                              .     Filter dataset . . 'PMIJSS0.HIPER.VTAM.SCRIPTS'                              .
                              .                                                                                  .
                              .   1 Generate Message Filtering REXX exit for   Formatted Scripts                 .
                              .   2 Generate Message Filtering REXX exit for Unformatted Scripts                 .
                              .   3 Execute Message Filtering                                                    .
                              .   4 Override Defaults                                                            .
  2. Enter the name of a PDS to hold the filters in the Filter dataset field.
  3. Select the option you wish to use, and press Enter. If the data set name you have entered does not exist, the Allocate Filter Dataset screen appears. The filter data set is the data set that will contain the REXX exit programs you will use to filter your scripts.
    Allocate Filter Dataset screen

                              .  --------------------- Message Filtering * Primary Options --------------------- .
                              .  Option ===>                                                                     .
                              .                                                                                  .
                              .  Ent +----------------------- ALLOCATE FILTER DATASET ------------------------+  .
                              .      |                                                                        |  .
                              .      | Command ===>                                                           |  .
                              .      |                                                                        |  .
                              .   1  | Press Enter to allocate the dataset,  END to exit                      |  .
                              .   2  |                                                                        |  .
                              .   3  | Data Set Name . . . : 'PMIJSS0.JMS.SAMPLE.FILTERS'                     |  .
                              .   4  |                                                                        |  .
                              .      | Volume Serial . . . .                                                  |  .
                              .      | Space Units . . . . . TRKS             (TRKS or CYLS)                  |  .
                              .      | Primary Quantity. . . 5                (In above units)                |  .
                              .      | Secondary Quantity. . 5                (In above units)                |  .
                              .      | Directory Blocks. . . 20               (Zero for sequential data set)  |  .
                              .      | Record Format . . . . FB                                               |  .
                              .      | Record Length . . . . 80                                               |  .
                              .      | Block Size. . . . . . 6160                                             |  .
                              .      |                                                                        |  .
                              .      |                                                                        |  .
                              .      +------------------------------------------------------------------------+  .
  4. Enter the volume serial, space units, primary and secondary quantities, directory blocks, record format, record length, and block size.
  5. Press Enter to allocate the data set, or use END to exit this screen without saving the information.

    Warning

    Important

    Specifications (the information you type or select on the various message filtering forms) are contained in a control script located in a member with the same name as your message/transaction, prefixed by a # sign. For example, if your message/transaction is named test1, the control script for this data set is named #test1.

    These scripts are created when you use the GO primary command to create the REXX exit program that will filter your scripts. If this control script already exists, Performance Test reads it when you enter the Message/Transaction name you supply in the next step, and will display the specifications on all subsequent screens for you to view or change.

    The Message Filter Primary Options screen reappears.

  6. Type one of the following option numbers on the Option line and press Enter:

Generate message filtering REXX exit for formatted scripts

Type 1 on the Option line of the Message Filtering * Primary Options screen and press Enter to filter formatted scripts. The Describe Start of Message for Formatted Scripts screen appears.

Describe Start of Message for Formatted Scripts

Use this screen to specify how the formatted script messages you are looking for begin.

Describe Start of Message for Formatted Scripts screen

                          .  ---------------- Describe Start of Message for Formatted Scripts--------------- .
                          .  Command ===>                                                                    .
                          .                                                                                  .
                          .  Describe the first screen of the transaction or message.                        .
                          .  When completed, enter OK to proceed to the End of Message procedure             .
                          .  Other commands: DEFAULT, RESET, EDIT, CANCEL and GO(generate the REXX exit)     .
                          .                                                                                  .
                          .  Name for Message/Transaction:                                                   .
                          .         Filter dataset . . 'PMIJSS0.JMS.SAMPLE.FILTERS'                          .
                          .         Message or Transaction name . .          Replace . .   (Y,N)             .
                          .         Description:                                                             .
                          .                                                                                  .
                          .  Output:             Edit more than two output lines?  N (Y,N)                   .
                          .  AND/OR    EQ/NE    Row  Col   Output Text                                       .
                          .                                                                                  .
                          .                                                                                  .
                          .                                                                                  .
                          .                                                                                  .
                          .  Input:              Edit more than two input lines?   N (Y,N)                   .
                          .  AND   EQ  Input Cursor Field                                                    .
                          .  /OR  /NE   Key  Row Col  No   Input Text                                        .
  1. Enter the Message/Transaction Filter dataset member name. This field accepts a maximum of seven characters.
  2. Specify whether to Replace an output script member of the same name. Enter Y to replace the member or N to keep the member.
  3. Enter an optional Description that is written into the script.
  4. Specify whether to edit more than two output lines.
    • Enter N to use only the two lines that appear on this screen.
    • Enter Y if you have more than two Boolean operations to perform. When you press Enter, a multi-line screen appears where you can enter more than two Boolean operations.
  5. Enter your output:
    • Enter your AND/OR boolean operator.
    • Enter EQ to filter script text that is the same as the entered text or NE to filter script text that is not the same as the entered text.
    • Enter the row and column location of the output text. Shortcuts are R for right, and B for bottom.
    • Enter the Output Text you want to match. This field accepts characters and hex (‘....’x). Leading and trailing blanks are removed unless used within quotes (‘).
  6. Enter your input:
    • Enter your AND/OR boolean operator.
    • Enter EQ to filter script text that is the same as the entered text or NE to filter script text that is not the same as the entered text.
    • Enter the Input Key (valid 3270 attention keys).
    • Enter the Cursor Row,Col location of the input text. Valid 3270 input cursor numbers begin at 0.
    • Enter the Input Field Number. Non-numeric is any wildcard. Field numbers begin at 1.
    • Enter the Input Text you want to match. This field accepts characters and hex (‘....’x). Leading and trailing blanks are removed unless used within quotes (‘).
  7. Perform one of the following actions to continue:
    • Press Enter to verify the fields and remain on the current screen.
    • Type OK on the command line and press Enter to advance to the Describe End of Message for Formatted Scripts screen.
    • Type GO and press Enter to create the REXX exit program and control script. The Start of Message screen appears.
    • Type Default and press Enter to advance to the Override Defaults screen.
    • Type Edit and press Enter to invoke the ISPF editor for the specified REXX exit program.
    • Type Reset and press Enter to reset the ISPF variables.
    • Type Cancel and press Enter to exit this screen and return to the Message Filtering * Primary Options screen without saving your changes.
    • Press END to return to the previous screen.

Describe End of Message for Formatted Scripts

Use this screen to specify how the formatted script messages you are looking for end.

Describe End of Message for Formatted Scripts screen

                          .  ----------------- Describe End of Message for Formatted Scripts---------------- .
                          .  Command ===>                                                                    .
                          .                                                                                  .
                          .  Describe the last screen of the transaction or message.                         .
                          .  When completed, enter GO to generate the REXX exit                              .
                          .  Other commands: DEFAULT, RESET, EDIT, CANCEL and END(Start of Message)          .
                          .                                                                                  .
                          .  Name for Message/Transaction:                                                   .
                          .         Filter dataset . . 'PMIJSS0.JMS.SAMPLE.FILTERS'                          .
                          .         Message or Transaction name . . SAMP     Replace . . Y                   .
                          .         Description:                                                             .
                          .                                                                                  .
                          .  Input:              Edit more than two input lines?    N (Y,N)                  .
                          .  AND   EQ  Input Cursor Field                                                    .
                          .  /OR  /NE   Key  Row Col  No   Input Text                                        .
                          .                                                                                  .
                          .                                                                                  .
                          .                                                                                  .
                          .                                                                                  .
                          .  Output:             Edit more than two output lines?   N (Y,N)                  .
                          .  AND/OR    EQ/NE    Row  Col   Output Text                                       .

The fields on this screen are the same as those on the Describe Start of Message for Formatted Scripts.

  1. See Describe Start of Message for Formatted Scripts for the steps to follow to fill in this screen.
  2. After you have entered all of the information you need on this screen, type GO on the command line and press Enter. Performance Test runs the JCL to create the REXX exit program, and returns messages similar to those below.
    13:50:55 SPGMF035 WRITING CONTROL INFO: 'USER25.SES.FILTERS(#TEST1)'
    13:50:56 SPGMF036 CONTROL INFO WRITE COMPLETE
    13:50:56 SPGMF030 BEGINNING MESSAGE FILTER CREATION PROCESS
    13:50:56 SPGMF031 WRITING REXX EXIT: 'USER25.SES.FILTERS(TEST1)'
    13:50:57 SPGMF034 REXX EXIT WRITE COMPLETE
    13:50:57 SPGMF035 REXX EXIT CREATION FINISHED.
    13:50:57 RETURN CODE = 0
    ***
  3. After these messages appear, press Enter. The previous screen appears and the message “REXX exit created” appears on the screen.
  4. Press End until you return to the primary message filtering screen. At this point, you can create additional REXX exit programs by repeating this process, or choose option 3 Execute Message Filtering to run the REXX exit program you just created (see Message Filtering Execution).

    Warning

    Important

    The DEFAULT, RESET, EDIT, CANCEL, AND END primary commands work the same as those on the Describe Start of Message for Formatted Scripts. See step 7 for details.

Generate Message Filtering REXX exit for unformatted scripts

Type 2 on the Option line of the Message Filtering * Primary Options screen and press Enter to filter unformatted scripts. The Describe Start of Message for Unformatted Scripts screen appears.

Describe Start of Message for Unformatted Scripts

Use this screen to specify how the unformatted script messages you are looking for begin.

Describe Start of Message for Unformatted Scripts screen

                          .  --------------- Describe Start of Message for Unformatted Scripts-------------- .
                          .  Command ===>                                                                    .
                          .                                                                                  .
                          .  Describe the first screen of the transaction or message.                        .
                          .  When completed, enter OK to proceed to the End of Message procedure             .
                          .  Other commands: DEFAULT, RESET, EDIT, CANCEL and GO(generate the REXX exit)     .
                          .                                                                                  .
                          .  Name for Message/Transaction:                                                   .
                          .         Filter dataset . . 'PMIJSS0.JMS.SAMPLE.FILTERS'                          .
                          .         Message or Transaction name . .          Replace . .   (Y,N)             .
                          .         Description:                                                             .
                          .                                                                                  .
                          .  Output:             Edit more than two output lines?  N (Y,N)                   .
                          .  AND/OR    EQ/NE    Offset  Output Text                                          .
                          .                                                                                  .
                          .                                                                                  .
                          .                                                                                  .
                          .                                                                                  .
                          .  Input:              Edit more than two input lines?   N (Y,N)                   .
                          .  AND/OR    EQ/NE    Offset  Input Text                                           .
  1. Enter the Message/Transaction Filter dataset member name. This field accepts a maximum of seven characters.
  2. Specify whether to Replace an output script member of the same name. Enter Y to replace the member or N to keep the member.
  3. Enter an optional Description that is written into the script.
  4. Specify whether to edit more than two output lines.
    • Enter N to use only the two lines that appear on this screen.
    • Enter Y if you have more than two Boolean operations to perform. When you press Enter, a multi-line screen appears where you can enter more than two Boolean operations.
  5. Enter your input and output:
    • Enter your AND/OR boolean operator.
    • Enter EQ to filter script text that is the same as the entered text or NE to filter script text that is not the same as the entered text.
    • Enter the start position (Offset) of the target text, with numbering beginning at 1. Use a blank space as a wildcard, indicating any offset.
    • Enter the Input Text and Output Text you want to match. This field accepts characters and hex (‘....’x). Leading and trailing blanks are removed unless used within quotes (‘).
  6. Perform one of the following actions to continue:
    • Press Enter to verify the fields and remain on the current screen.
    • Type OK on the command line and press Enter to advance to the Describe End of Message for Unformatted Scripts screen.
    • Type GO and press Enter to create the REXX exit program and control script. The Start of Message screen appears.
    • Type Default and press Enter to advance to the override Defaults screen.
    • Type Edit and press Enter to invoke the ISPF editor for the specified REXX exit program.
    • Type Reset and press Enter to reset the ISPF variables.
    • Type Cancel and press Enter to exit this screen and return to the Message Filtering * Primary Options screen without saving your changes.
    • Press END to return to the previous screen.

Describe End of Message for Unformatted Scripts

Use this screen to specify how the formatted script messages you are looking for end.

Describe End of Message for Unformatted Scripts screen

                          .  --------------- Describe End of Message for Unformatted Scripts --------------- .
                          .  Command ===>                                                                    .
                          .                                                                                  .
                          .  Describe the last screen of the transaction or message.                         .
                          .  When completed, enter GO to generate the REXX exit                              .
                          .  Other commands: DEFAULT, RESET, EDIT, CANCEL and END(Start of Message)          .
                          .                                                                                  .
                          .  Name for Message/Transaction:                                                   .
                          .         Filter dataset . . 'PMIJSS0.JMS.SAMPLE.FILTERS'                          .
                          .         Message or Transaction name . . SAMP     Replace . . N                   .
                          .         Description:                                                             .
                          .                                                                                  .
                          .  Input:              Edit more than two input lines?    N (Y,N)                  .
                          .  AND/OR    EQ/NE    Offset  Input Text                                           .
                          .                                                                                  .
                          .                                                                                  .
                          .                                                                                  .
                          .                                                                                  .
                          .  Output:             Edit more than two output lines?   N (Y,N)                  .
                          .  AND/OR    EQ/NE    Offset  Output Text                                          .

The fields on this screen are the same as those on the Describe Start of Message for Unformatted Scripts screen.

  1. See Describe Start of Message for Unformatted Scripts for the steps to follow to fill in this screen. Then proceed to the next step.
  2. Type GO on the command line and press Enter. Performance Test runs the JCL to create the REXX exit program, and returns a message similar to the one below. 

    13:50:55 SPGMF035 WRITING CONTROL INFO: 'USER25.SES.FILTERS(#TEST1)'
    13:50:56 SPGMF036 CONTROL INFO WRITE COMPLETE
    13:50:56 SPGMF030 BEGINNING MESSAGE FILTER CREATION PROCESS
    13:50:56 SPGMF031 WRITING REXX EXIT: 'USER25.SES.FILTERS(TEST1)'
    13:50:57 SPGMF034 REXX EXIT WRITE COMPLETE
    13:50:57 SPGMF035 REXX EXIT CREATION FINISHED.
    13:50:57 RETURN CODE = 0
    ***
  3. After these messages appear, press Enter. The previous screen appears and the message “REXX exit created” appears on the screen.
  4. Press End until you return to the primary message filtering screen. At this point, you can create additional REXX exit programs by repeating this process, or choose option 3 Execute Message Filtering to run the REXX exit program you just created (see Message Filtering Execution).

    Warning

    Important

    The DEFAULT, RESET, EDIT, CANCEL, and END primary commands work the same as those on the Describe Start of Message for Formatted Scripts. See step 7 for details.

Message Filtering Execution

  1. Type 3 Execute Message Filtering on the Option line of the Message Filtering * Primary Options screen and press Enter to run the REXX exit program created from the information you entered in earlier screens. The Message Filtering * Execution screen appears.
    Message Filtering Execution screen 1

                              .  ------------------------ Message Filtering * Execution ------------------------ .
                              .  Command ===>                                                                    .
                              .                                                                                  .
                              .     blank Continue                                                               .
                              .                                                                                  .
                              .  Type the names of the script data sets below, then press Enter key              .
                              .  Do not specify the script/member name                                           .
                              .                                                                                  .
                              .  Input Script Data Set:                                                          .
                              .     Project . . .                                                                .
                              .     Group . . . .                                                                .
                              .     Type  . . . .                                                                .
                              .                                                                                  .
                              .  Other Partitioned Data Set:                                                     .
                              .     Data Set Name . . . 'PMIJSS0.JMS.SCRIPTS'                                    .
                              .                                                                                  .
                              .  Output Script Data Set:                                                         .
                              .     Project . . .                                                                .
                              .     Group . . . .                                                                .
                              .     Type  . . . .                                                                .
                              .  Other Partitioned Data Set:                                                     .
                              .     Data Set Name . . . 'PMIJSS0.HIPER.VTAM.SCRIPTS.OUTPUT'                      .
  2. Enter the name of the PDS containing the recorded scripts to be processed, and the name of the PDS to use for storing the output scripts created by message filtering. Do not enter script or member names on this screen, only file names.The input PDS and the output PDS can be the same file, but must already exist, and must be PDSs. If you enter an invalid PDS, an error message appears when you press Enter. Press PF1 for a more detailed explanation of the error, including which PDS is invalid.
  3. Press Enter to continue. The following figure appears.
    Message Filtering Execution screen 2

                              .  ------------------ Hiperstation Message Filtering * Execution ----------------- .
                              .  Option ===>                                                                     .
                              .                                                                                  .
                              .     F  Initiate Processing In Foreground.                                        .
                              .     B  Initiate Processing In Background.                                        .
                              .                                                                                  .
                              .   CONTROL DEFAULT  . . . . INCLUDE                                               .
                              .           REPLACE  . . . . NO                                                    .
                              .           COMMENT  . . . . NO                                                    .
                              .                                                                                  .
                              .   Report File ...  *                                                             .
                              .                                                                                  .
                              .   Input Script Data Set:  'PMIJSS0.JMS.SCRIPTS'                                  .
                              .   Output Script Data Set: 'PMIJSS0.HIPER.VTAM.SCRIPTS.OUTPUT'                    .
                              .                                                                                  .
                              .   Select the Scripts to be processed (* for entire Dataset)                      .
                              .                                                                                  .
                              .                                                                                  .
                              .   Message filters                                                                .
                              .            TYPE      NAME      PARM                                              .

    If you entered the same data set name for both the input and output script data sets and did not change the REPLACE field to YES, an error message appears when you select either F (process the scripts in TSO foreground) or B (process the scripts in TSO background) and press Enter. The error message, OUTPUT SCRIPT EXISTS, can be cleared by:

    • Returning to the original execution screen (Message Filtering * Execution) and changing one of the data set names to another data set that exists and is a PDS,
      OR
    • Changing the REPLACE field to YES. The original input script data set is then overwritten by the output script data set.
  4. Enter the Control Default information. This setting controls the first step in message filtering — either to include everything in the script or to exclude everything in the script.

    • INCLUDE retains all of the information from the original script.
    • EXCLUDE discards all of the information in the original script.

    See Message filters below if you want to retain or exclude only a portion of the information from the original script.

  5. Enter the Control Replace information. Y replaces existing scripts with the same name in the target data set. N keeps existing scripts with the same name.
  6. Enter the Control Comments information. Y converts screens and inputs into comments within your scripts. N removes screens and inputs while leaving a single comment line.
  7. Enter the Report File name. This data set must be preallocated. Enter an * to use SYSOUT or terminal.
  8. Enter the Input Script and Output Script data set names from the input PDS to process. Enter * to process all members in the PDS.
  9. Type INCLUDE or EXCLUDE in the Message Filters TYPE column.
    You will always use the INCLUDE Message filter with the EXCLUDE Default parameter. You will always use the EXCLUDE Message filter with the INCLUDE Default parameter. If you use INCLUDE for both, or EXCLUDE for both, they will cancel each other out, and filtering will either include everything in the original script or nothing.
    For example, if you want a new script to include only the information that matches the filter, specify EXCLUDE in the Default parameter (to exclude everything) and specify INCLUDE in Message filters to include the information set by the filter. The end result is that only the information from the INCLUDE filter is included in the new script — nothing from the original script is included.
    If you want a new script to include everything except what matches the filter, specify INCLUDE in the Default parameter (to include everything) and specify EXCLUDE in Message filters to exclude the information set by the filter. The end result is that everything from the original script is included except the information set in the EXCLUDE filter.
  10. Type the REXX program name in the Message Filters NAME column. See Example 2: Find Only Output Screens for a sample REXX program.
  11. Fill in the PARM column with any constant data needed by your REXX program.
  12. Type either an F (foreground) or B (background) on the option line and press Enter to generate the REXX program.

    • In foreground execution, the message filtering program EHSFLTR generates a summary report and messages that appear on your screen during execution.
    • In background execution, the Message Filtering Background Execution screen appears (Message Filtering Background Execution).

    Message Filtering Background Execution screen

                              .  ------------ Hiperstation Message Filtering * Background Execution ------------ .
                              .  Command ===>                                                                    .
                              .                                                                                  .
                              .        Go  To generate and display the JCL                                       .
                              .        End To Exit without submitting                                            .
                              .                                                                                  .
                              .  Specify jobcard information:                                                    .
                              .    //                                                                            .
                              .    //                                                                            .
                              .    //                                                                            .
                              .    //                                                                            .
                              .                                                                                  .
                              .  Sysout Class For Output Messages . . . *                                        .
  13. Enter the JCL jobcard information to use for the background message filtering job on this screen.
  14. Enter the Sysout Class for Output Messages. The message filtering program EHSFLTR generates a summary report and some messages. This field specifies the SYSOUT class to store these outputs. These outputs appear on the user’s screen during foreground execution.
  15. Type GO on the option line to build and display the JCL for execution.

Override Defaults

To override defaults set for message filtering, specify option 4 Override Defaults on the Option line of the Message Filtering Primary Option screen. You can also access these defaults by typing DEFAULT on the command line of any message filtering screen and pressing Enter. The Override Defaults screen appears.

Override Defaults screen with sample settings

                          .  ------------------------------ Override Defaults ------------------------------ .
                          .  Command ===>                                                                    .
                          .                                                                                  .
                          .  Review and modify the defaults that determine which inputs and outputs will be  .
                          .  included in your filtered message.  Press PF3 to save and exit.                 .
                          .  Type RESET to restore default values.                                           .
                          .  Press PF1 for an explanation of the settings.                                   .
                          .                                                                                  .
                          .  Filter Definition Default Values:                                               .
                          .  Start of message is described by outputs only                                   .
                          .  Start of message is described by inputs only                                    .
                          .  Start of message is described by outputs and inputs                             .
                          .                                                                                  .
                          .  End of message is described by outputs only                                     .
                          .  End of message is described by inputs only                                      .
                          .  End of message is described by inputs and outputs                               .
                          .                                                                                  .
                          .  Output text is Case Sensitive                                                   .
                          .  Output text attribute sensitive                                                 .
                          .  Input text is Case Sensitive                                                    .

In REXX exit processing, there are three important values — HS_EXITTYPE, HS_MATCH, and HS_WHICH. Performance Test assumes that a series starts with an input and a series finishes with an output. The default value of HS_WHICH is set to follow these rules.You can override this value by entering either CURRENT, PREVIOUS, or, NEXT. These values are dependent on the values for HS_EXITTYPE shown below.

For:

Enter:

Start of message is described by outputs only

PREVIOUS

Start of message is described by inputs only

CURRENT

Start of message is described by outputs and inputs

CURRENT

End of message is described by outputs only

CURRENT

End of message is described by inputs only

PREVIOUS

End of message is described by outputs and inputs

CURRENT

In addition to HS_EXITTYPE, HS_MATCH, and HS_WHICH, you can also override defaults for:

For:

Enter:

Output text is case sensitive

Y or N (Default is Y)

Output text is attribute sensitive

Y or N (Default is Y)

Input text is case sensitive

Y or N (Default is N)

HS_EXITTYPE is assigned based on how you describe start of message and the end of message. This value is fixed (you cannot change these values) as shown below:

For:

Enter:

Start of message is described by outputs only

OUTPUT

Start of message is described by inputs only

INPUT

Start of message is described by outputs and inputs

INPUT

End of message is described by outputs only

OUTPUT

End of message is described by inputs only

INPUT

End of message is described by outputs and inputs

OUTPUT

HS_MATCH=1 for start of message and HS_MATCH=0 for end of message, based on how you described the start and end of messages.

Manual message filtering - coding examples

REXX has powerful features that save you time and effort. This section provides examples of REXX exit programs for use by the Message Filtering Utility. These examples demonstrate some REXX coding techniques that can help you write your own exits.

For a complete description of the REXX language, see the IBM REXX documentation.

Success

Tip

  • REXX provides the TRACE statement to help you understand and debug your exit programs. To see information about your exits and the data they are manipulating, add a TRACE R statement to the beginning of your exit programs.
  • You cannot call any other routines from within your exit program. In addition, you cannot put any labels (name followed by a colon) in your exit program. The REXX INTERPRET statement runs your exit statement. For details, see the description of the INTERPRET statement in the REXX documentation.
  • Your exit program is not called as a subroutine. You do not need to issue a PARSE ARG statement in your exit program to access the variables provided by Performance Test.
  • You cannot have a label or a PROCEDURE statement within your exit.
  • Continue lines within your exit by using the REXX continuation character, which is a comma (,). If you want to continue lines, the comma must be the last non-blank character on the line. You cannot put any comments (/* … */) after the comma if you want the comma interpreted as the continuation character.

    Warning

    Important

    This convention differs from normal REXX code.

Example 1: Find all screens with a common eyecatcher

We want to find all screens in our scripts that have a certain “eyecatcher” (a set of characters that help you recognize a screen) on the top left corner. The example shown in the following figure looks for the eye catcher: EDIT.

Look for a Common Eyecatcher

/* Hiperstation 3270 filter: All screens with the eye catcher ’EDIT’ */

if hs_exittype = ’OUTPUT’ then do
   if SUBSTR(hs_output.1,1,4) = ’EDIT’ then
      hs_match = 1
end
else
   hs_match = 0

Example 2: Find only output screens

The code in the following figure finds only output screens that contain PLAF on the first line. Then set Default to EXCLUDE and set the filter type to INCLUDE. To include all messages except output screens that contain PLAT on the first line, use the same filter, but set Default to INCLUDE and the filter type to EXCLUDE.

See Message Filtering Execution Screen 2 and the description of the Default and Message Filters field definitions for detailed information on how to use the Default parameter and the INCLUDE and EXCLUDE filters.

Find only output screens that contain PLAF on the first line

IF (hs_exittype = 'OUTPUT') & (POS('PLAF',hs_output.1) > 0) THEN
   hs_match = 1
ELSE
   hs_match = 0

Example 3: Find all screens from a list

The code in the following figure finds all screens in our scripts that have an eye catcher on row 24 that matches a list of known words.

Look for a set of screens

/* Hiperstation 3270 filter: All screens in a list */

mine.0 = 5
mine.1 = ’ISD011’
mine.2 = ’ISD023’
mine.3 = ’ISD042’
mine.4 = ’ISD043’
mine.5 = ’ISD049’

if hs_exittype = ’OUTPUT’ then do
   hs_match = 0
   do i = 1 to mine.0 while hs_match = 0
      eyecatcher = mine.i
      if SUBSTR(hs_output.24,1,6) = eyecatcher then
         hs_match = 1
   end
end
else
   hs_match = 0

Example 4: Convert a script to inputs only

The following figure converts a script from its standard form of inputs and outputs into a new script containing only inputs. An “inputs only” script is useful for stress testing if you are not concerned with data comparisons at playback time. Eliminating the outputs saves space in the script data set.

Convert to Inputs only

/* Hiperstation 3270 filter: Inputs only */

if hs_exittype = ’INPUT’ then
   hs_match = 1
else do
   hs_match = 0
   hs_which = ’Previous’
end

Example 5: Check for a combination of screen items

The following figure keeps a message that starts with a screen containing several specific eye catchers. This ensures that we do not get any screens that look similar but are not exactly right.

Look at several areas on the screen

/* Hiperstation 3270 filter: Look at several areas on the screen */

if hs_exittype = ’OUTPUT’ then do
   row_count    = hs_output.0            /* Number of rows on screen */
   col_count    = length(hs_output.1)    /* Number of cols on screen */

   upper_left   = substr(hs_output.1,2,4)                   /*  2: 5 */
   upper_right  = substr(hs_output.1,col_count-3,3)         /* 77:79 */
   lower_left   = substr(hs_output.row_count,2,6)           /*  2: 7 */
   lower_right  = substr(hs_output.row_count,col_count-7,8) /* 73:80 */

   if upper_left  = ’EDIT’      &,
      upper_right = ’072’       &,
      lower_left  = ’******’    &,
      lower_right = ’********’
   then
      hs_match = 1
end
else
   hs_match = 0

Message filter REXX variables

This section describes the message filter REXX variables available for exit programs.

Warning

Important

The variable names are not case sensitive. You can type them in lowercase or uppercase.

HS_MATCH

HS_MATACH defines whether screens (and inputs) are part of the messages that you want to filter. When your exit is called the first time for a particular script, HS_MATCH contains the value 0. Before your exit returns, you set HS_MATCH to a value of 1 if the current input or output is a match for your message. You set it to a value of 0 if the current input or output does not match your message. If your exit cannot tell if the current input or output matches your message, leave HS_MATCH set at its value on entry.

On each subsequent entry to your REXX exit program, HS_MATCH contains the last value (0 or 1) set by you.

The value of HS_MATCH, by itself, does not indicate inclusion or exclusion. This value indicates only whether an input or output matches a message that you want to process further. Deciding what to do with a matching message depends on whether your exit is named on an INCLUDE or EXCLUDE statement. Performance Test tries to create a script that can be played back successfully. By default, Performance Test starts a series with an input and finishes a series with an output.

  • If you start a series (HS_MATCH = 1) on an input, that input is the first in your series.
  • If you start a series (HS_MATCH = 1) on an output, the previous input (or output) is the first in your series.
  • If you finish a series (HS_MATCH = 0) on an output, that output is the last in your series.
  • If you finish a series (HS_MATCH = 0) on an input, the previous output (or input) is the last in your series.

Performance Test takes these default actions in an attempt to group an entire message, which is defined as an initial input, any number of intervening outputs and inputs, and then a final output.

The value of HS_MATCH is the indication that a series of inputs and outputs is starting or finishing. The details of whether the current or previous input or output is part of that series is handled as described above. There might be some circumstances where you want a series of inputs and outputs to follow a different behavior than the default. You can change the default action for a series of inputs and outputs by setting the HS_WHICH variable in your exit, as described below.

HS_WHICH

HS_WHICH is set by your exit if you want to change the default behavior of Performance Test when starting or finishing a series of inputs and outputs. HS_WHICH is the null string when passed to your exit. You can set HS_WHICH to a value of “Previous”, “Current”, or “Next” to change the default action that Performance Test takes when you are starting or finishing a series of inputs and outputs.

HS_WHICH = “Previous” makes the previous input or output a part of the series. HS_WHICH = “Current” makes the current input or output a part of the series. HS_WHICH = “Next” makes the next input or output a part of the series.

  • If you start a series (HS_MATCH = 1) on an input, HS_WHICH = "Current" is the default action.
  • If you start a series (HS_MATCH = 1) on an output, HS_WHICH = "Previous" is the default action.
  • If you finish a series (HS_MATCH = 0) on an output, HS_WHICH = "Current" is the default action.
  • If you finish a series (HS_MATCH = 0) on an input, HS_WHICH = "Previous" is the default action.

You need to supply only the first character for the HS_WHICH value in either lowercase or uppercase (HS_WHICH = “C”, etc.). If you want Performance Test to use its default action, leave the HS_WHICH variable set to the null string.

HS_EXITTYPE

Contains either the word INPUT or the word OUTPUT, in uppercase. If HS_EXITTYPE is INPUT, then your exit is being called because Performance Test saw an <INPUT> group in the current script. If HS_EXITTYPE is OUTPUT, then your exit is being called because Performance Test saw an <OUTPUT> group in the current script.

HS_KEY

Contains the name of the key the user pressed that caused the <INPUT>. HS_KEY contains one of the following values, in uppercase: ENTER, PF1, …, PF24, PA1, PA2, PA3, CLEAR.

If HS_EXITTYPE is INPUT, then HS_KEY is for the current <INPUT>.

If HS_EXITTYPE is OUTPUT, then HS_KEY is for the previous <INPUT>. If there has been no previous <INPUT> in the script, HS_KEY is set to the null string (a string length of 0, for example, HS_KEY = ‘’).

If the script is unformatted, HS_KEY is the null string.

HS_ROW

Contains the row number where the terminal cursor is located. For the cursor location, this row number begins at 0.

If HS_EXITTYPE is INPUT, then HS_ROW is for the current <INPUT>.

If HS_EXITTYPE is OUTPUT, then HS_ROW is for the previous <INPUT>. If there has been no previous <INPUT> in the script, HS_ROW is set to the null string.

If the script is unformatted, HS_ROW is the null string.

HS_COLUMN

Contains the column number where the terminal cursor is located. For the cursor location, this column number begins at 0.

If HS_EXITTYPE is INPUT, then HS_COLUMN is for the current <INPUT>.

If HS_EXITTYPE is OUTPUT, then HS_COLUMN is for the previous <INPUT>. If there has been no previous <INPUT> in the script, HS_COLUMN is set to the null string.

If the script is unformatted, HS_COLUMN is the null string.

HS_INPUT.0

Contains the number of the last input field on the screen that the user changed. This value can be from 0 to the total number of input fields on the screen (not necessarily the number of fields on the screen that the user changed). For example, if the screen contains 20 input fields and the user typed in two fields, numbered 5 and 10, then HS_INPUT.0 is set to 10.

If HS_EXITTYPE is INPUT, then HS_INPUT.0 is for the current <INPUT>.

If HS_EXITTYPE is OUTPUT, then HS_INPUT.0 is for the previous <INPUT>. If there has been no previous <INPUT> in the script, HS_INPUT.0 is set to 0.

If the script is unformatted, HS_INPUT.0 is set to 0.

HS_INPUT.n

Contains the data the user typed in input field number “n” on the screen. The data the user typed can be a mixture of lowercase and uppercase.

The part of the variable name after the dot can be from 1 to the number of the last input field on the screen. These variable names are HS_INPUT.1, HS_INPUT.2, and so forth. Each variable name represents a different input field on the screen.

If the user did not change any data in the input field, the value is the null string. If the user cleared the input field with the Erase to End-of-Field (Erase EOF) key, the value is the null string.

If HS_EXITTYPE is INPUT, then HS_INPUT.n is for the current <INPUT>.

If HS_EXITTYPE is OUTPUT, then HS_INPUT.n is for the previous <INPUT>. If there has been no previous <INPUT> in the script, HS_INPUT.n is the null string.

If the script is unformatted, HS_INPUT.n is the null string.

HS_OUTPUT.0

Contains the number of rows on the screen. For example, with a Model 2 terminal that contains 24 rows and 80 columns, HS_OUTPUT.0 is 24.

If HS_EXITTYPE is OUTPUT, then HS_OUTPUT.0 is for the current <OUTPUT>.

If HS_EXITTYPE is INPUT, then HS_OUTPUT.0 is for the previous <OUTPUT>. If there has been no previous <OUTPUT> in the script, HS_OUTPUT.0 is set to 0.

If the script is unformatted, HS_OUTPUT.0 is set to 0.

HS_OUTPUT.n

Contains the content of row number “n” on the screen. The data in this variable can be a mixture of lowercase, uppercase, special characters, blanks (‘40’x), nulls (‘00’x), and 3270 field attribute bytes.

If a byte is ‘02’x, it represents a 3270 field attribute value of ‘00’x. It is shown as ‘02’x rather than ‘00’x so you can distinguish between a null character and a zero-valued attribute byte.

All attribute bytes have their upper two bits set to 0 (bits 0 and 1). Therefore, a byte might be an attribute if its value is less than ‘40’x, but not ‘00’x. Some characters that are not attribute bytes can appear in the screen image with a value less than ‘40’x, such as the SUB character (‘3F’x).

The part of the variable name after the dot can be from 1 to the value in the HS_OUTPUT.0 variable. These variable names are HS_OUTPUT.1, HS_OUTPUT.2, etc. Each variable name represents a different row on the screen.

If HS_EXITTYPE is OUTPUT, then HS_OUTPUT.n is for the current <OUTPUT>.

If HS_EXITTYPE is INPUT, then HS_OUTPUT.n is for the previous <OUTPUT>. If there has been no previous <OUTPUT> in the script, HS_OUTPUT.n is the null string.

If the script is unformatted, HS_OUTPUT.n is the null string.

HS_PARM

Contains the value supplied on the INCLUDE or EXCLUDE statement with the PARM keyword. This value can contain any characters other than blanks (‘40’x), commas (‘6B’x), and parentheses (‘4D’x and ‘5D’x).

HS_SCRIPT

Contains the name, in uppercase, of the script currently being processed.

HS_FORMAT

Contains the value 1 if the script is formatted or the value 0 if the script is unformatted (contains the <HEX> tag).

If HS_FORMAT is 1, then HS_INPUT.n and HS_OUTPUT.n contain relevant values and HS_INPUT_STREAM and HS_OUTPUT_STREAM are set to the null string.

If HS_FORMAT is 0, then HS_INPUT.n and HS_OUTPUT.n do not contain relevant values but HS_INPUT_STREAM and HS_OUTPUT_STREAM do.

HS_INPUT_SEQUENCE

Contains a number that shows how many <INPUT> groups have been seen in the script so far. This value starts at 0. This value is not necessarily the same as the value on the <INPUT> tag.

HS_OUTPUT_SEQUENCE

Contains a number that shows how many <OUTPUT> groups have been seen in the script so far. This value starts at 0. This value is not necessarily the same as the value on the <OUTPUT> tag.

HS_INPUT_STREAM

Contains the contents of the unformatted data stream for the most recent <INPUT>. The value is the true binary contents of the <HEX> tag, not the human readable translation. For example, you might test its contents like this:

if hs_input_stream = ’610101’x then ...If the script is formatted, HS_FORMAT is set to 1 and HS_INPUT_STREAM is the null string.

HS_OUTPUT_STREAM

Contains the contents of the unformatted data stream for the most recent <OUTPUT>. The value is the true binary contents of the <HEX> tag, not the human readable translation. For example, you might test its contents like this:

if hs_output_stream = ’610101’x then ...If the script is formatted, HS_FORMAT is set to 1 and HS_OUTPUT_STREAM is the null string.

Message Filter Statements

Following is a complete list of the statements you can choose as the SYSIN input to the filter program.

Syntax Rules

The syntax rules for message filter statements are:

  • Enter statements beginning in any column.
  • If an asterisk (*) is the first non-blank character in a statement, that statement is a comment and is not interpreted.
  • You can continue statements, including comment statements, on subsequent lines by supplying a comma as the last non-blank character on the line.
  • Any place you can use a blank, you can also use a comma instead.
  • The statement name must be separated from the first keyword by one or more blanks.
  • You can use a keyword only once on a statement.
  • Exactly one equal sign (=) must separate a keyword from its value. You can put any number of blanks on either side of the equal sign.
  • If a keyword is permitted to have several values, supply those values surrounded by parentheses and separated by any number of blanks on either side of the parentheses. If this is the last keyword on the statement, you can omit the closing parenthesis.
  • Subsequent keywords on the same statement must be separated from the values of the previous keyword by one or more blanks.
  • The value for a keyword cannot contain any blanks, commas, or parentheses since these are used to delimit statement names, keywords, and values.
  • Single and double quotation marks do not have any special significance. If they are supplied as part of a keyword’s value, they are interpreted as part of the value.

CONTROL statement

Use this statement to set options for the filter program. This statement is optional, and can be supplied only once.

image2022-11-2_15-47-35.png

DEFAULT=INCLUDE|EXCLUDE

Indicates whether to include or exclude source script screens and user inputs from the target script data set if no exit program makes that decision. If you do not supply a DEFAULT keyword, DEFAULT=INCLUDE is used. All screens and user inputs are included in the target script data set.

REPLACE=NO|YES

Indicates whether existing scripts are replaced in the target script data set. If you do not supply a REPLACE keyword, REPLACE=NO is used. Existing scripts in the target script data set are not replaced.

COMMENT=NO|YES

Indicates whether excluded lines in a script are changed into comments in the target script data set. If you do not supply a COMMENT keyword, COMMENT=NO is used. Excluded lines are removed from the target script data set rather than changed into comments. Enter COMMENT=YES if you want to see all of the script lines that Performance Test has excluded because of your message filtering requests. The excluded lines all start with the Performance Test script comment character, which is the asterisk (*).

INDD=input_script_ddname

The JCL ddname of the source script data set. This is where your original scripts are located. If you do not supply an INDD keyword, INDD=INPUT is used.

OUTDD=output_script_ddname

The JCL ddname of the target script data set. This is where the new scripts are written. If you do not supply an OUTDD keyword, OUTDD=OUTPUT is used.

REXXDD=rexx_exit_ddname

The JCL ddname of the data set containing your REXX exit programs. If you do not supply a REXXDD keyword, REXXDD=REXX is used.

REPORTDD=report_ddname

The JCL ddname of the sequential file (DASD or SYSOUT) where Performance Test will write the summary report. The summary report specifies which scripts were processed and the number of <INPUT> and <OUTPUT> tags excluded from each script. If you do not supply a REPORTDD keyword, Performance Test uses REPORTDD=SYSPRINT.

SELECT statement

Use this statement to select the scripts from the source script data set to process. This statement is optional, and can be supplied only once. If you do not supply a SELECT statement, the entire source script data set is used.

image2022-11-2_15-48-12.png

SCRIPT=(member_1 member_n)

Supplies the list of scripts to be processed. If you want to process a single script, enclosing it in parentheses is optional. If you want to process a list of scripts, you must enclose the list in parentheses. Separate each member with a blank.

INCLUDE statement

Use this statement to choose screens and user inputs to include in the target script data set. At least one INCLUDE or EXCLUDE statement must be supplied. You can supply this statement any number of times.

image2022-11-2_15-48-38.png

TRAN=name

Supplies the name of the REXX exit program, which you have written, that decides what screens and user inputs are copied to the target script data set. Since “name” is a member in a data set, it must conform to the naming requirements for data set members. This keyword is required.

You can process a list of messages on a single INCLUDE statement by enclosing the list of names in parentheses. Separate each name with a blank.

PARM=exitparm

Supplies a value that can be used by the exit program you have written. You can supply any value that does not contain blanks, commas, or parentheses. The PARM keyword is optional.

You might use the PARM keyword if you have written a general purpose REXX exit program, and the exit needs special control information passed to it. If you want to supply a value that is made up of several logical parts, you can use a character such as a slash (/) to delimit the parts. For example:

INCLUDE TRAN=X@FIND PARM=/dick/jane/bill/sally/

Your exit must do any “parsing” necessary to handle pieces of the PARM value.

EXCLUDE statement

Use this statement to exclude screens and user inputs from the target script data set. At least one EXCLUDE or INCLUDE statement must be supplied. You can supply this statement any number of times.

image2022-11-2_15-49-7.png

TRAN=name

Supplies the name of the REXX exit program, which you have written, that decides what screens and user inputs are excluded from the target script data set. Since “name” is a member in a data set, it must conform to the naming requirements for data set members. This keyword is required.

You can process a list of messages on a single EXCLUDE statement by enclosing the list of names in parentheses. Separate each name with a blank.

PARM=exitparm

Supplies a value that can be used by the exit program you have written. You can supply any value that does not contain blanks, commas, or parentheses. The PARM keyword is optional.

Running the message filter program

The message filter program is run as a TSO command processor, normally in a batch job. The input to the program is a set of control statements and a set of DD statements. The control statements are pointed to by the SYSIN DD statement. If you wish, you can use a different ddname. To use a different ddname, supply that ddname as the first parameter to the EHSFLTR program, as follows:

000400 //IEFPROC EXEC PGM=IKJEFT01,PARM=’EHSFLTR MYCNTL’

001400 //MYCNTL DD * (<--- instead of SYSIN)
The program IKJEFT01 is IBM’s TSO terminal monitor program for MVS. By submitting a batch job that runs IKJEFT01, you are running TSO as a batch job. The EHSFLTR program supplied by BMC Software uses features that are available only under TSO. TSO is necessary to run the EHSFLTR program.

The three DD statements in the JCL list the source script data set, the target script data set, and the REXX data set containing your exit programs. By default, the DD names for these three data sets are INPUT, OUTPUT, and REXX, respectively. The message filter program does not support multiple data set names per ddname. Each DD statement you supply must name a single data set, not a concatenation of data sets.

Message filter summary report

The message filter program produces a summary report that shows the names of all of the processed scripts, how many <INPUT> and <OUTPUT> groups were in each script, and how many of those groups were excluded from the target script data set.

The last column in the report indicates whether Performance Test detected any REXX code within the script (Y = Yes, blank = No). If your script contains REXX code, that REXX code can have dependencies on the INPUT and OUTPUT groups within the script. Excluding lines from such a script with the message filter function can produce an invalid script. You must carefully review each script in the target script data set for validity if that script contains REXX code.

Message Filter Summary Report

               Hiperstation Message Filtering

     Script    ----- Inputs -----  ----- Outputs ----  REXX in
     Name      Excluded     Total  Excluded     Total  script?
     --------  --------  --------  --------  --------  --------
     A                0        10        11        11     Y
     CICS01           0        14        18        18
     CICS02           6        15        13        15
     FOREIGN          3         7         9         9
     HEX01            0         9         0         9
     TEST01           2        11         3        12     Y
     TSO01            0        10        11        11     Y
     --------  --------  --------  --------  --------  --------
     Total           11        76        65        85

Sample message filtering job

The message filter job shown in Sample JCL for Message Filter Program is designed to eliminate all screens from a script except those that are part of the PAYROLL message. While in the PAYROLL message, all SALARY screens must be excluded because they contain confidential data. You submit a batch job that runs the EHSFLTR filter program using JCL like that shown in Sample JCL for Message Filter Program. The job statements are described below.

The EHSFLTR program is a REXX EXEC contained in the SQQFSAMP sample data set. JCL to run the message filtering job is in the SAMPLIB member EHSFLTRJ.

Sample JCL for Message Filter Program

  File  Edit  Confirm  Menu  Utilities  Compilers  Test  Help
-------------------------------------------------------------------------------
EDIT       USRJXG0.H.CNTL(EHSFLTR) - 01.26                 Columns 00001 00072
Command ===>                                                  Scroll ===> CSR
****** ***************************** Top of Data ******************************
000100 //USRJXG0A JOB (’OVPBAS5.4DEV’,66),’GALT, JOHN’,NOTIFY=USRJXG0,
000200 //         MSGCLASS=X,CLASS=L
000300 //* -------------------------------------------------------------------
000400 //IEFPROC  EXEC PGM=IKJEFT01,PARM=’EHSFLTR’
000500 //SYSPROC  DD DISP=SHR,DSN=COMPWARE.QVP700.SQVPSAMP  <---
 HS SAMPLE LIBRARY
000600 //*
000700 //INPUT    DD DISP=SHR,DSN=USRJXG0.HS.INPUT      <--- INPUT SCRIPT PDS
000800 //OUTPUT   DD DISP=SHR,DSN=USRJXG0.HS.OUTPUT     <--- OUTPUT SCRIPT PDS
000900 //REXX     DD DISP=SHR,DSN=USRJXG0.HS.EXEC       <--- USER REXX LIBRARY
001000 //*
001100 //SYSTSIN  DD DUMMY
001200 //SYSTSPRT DD SYSOUT=*                           <--- MESSAGES
001300 //SYSPRINT DD SYSOUT=*                           <--- HS SUMMARY REPORT
001400 //SYSIN    DD *                                  <--- HS CONTROL PARMS
001500   CONTROL  DEFAULT=EXCLUDE
001600   SELECT   SCRIPT=TEST001
001700   INCLUDE  TRAN=PAYROLL
001800   EXCLUDE  TRAN=SALARY
  • The INPUT DD statement on line 700 lists the source script data set.
  • The OUTPUT DD statement on line 800 lists the target script data set that contains the filtering results.
  • The REXX DD statement on line 900 lists the library that contains the REXX exit programs.
  • The CONTROL statement on line 1500 excludes screens from the target script data set unless included by subsequent INCLUDE exits.
  • The SELECT statement on line 1600 lists the scripts you want to process from the source script data set. Here, we are processing a single script. You can also process a list of several scripts or the entire data set.
  • The INCLUDE statement on line 1700 lists a message to be included in the target script data set (kept). TRAN=PAYROLL names the REXX exit program that performs the filtering.
  • The EXCLUDE statement on line 1800 is similar to the INCLUDE statement. The difference is that screens matching the filtering criteria are excluded from the target script data set (discarded).

The values supplied on the TRAN keyword of the INCLUDE and EXCLUDE statements are the names of REXX exit programs that you write modeled on templates supplied by BMC Software. This example shows two exits, PAYROLL and SALARY, that identify the first and last screens in the PAYROLL and SALARY messages.

Multiple INCLUDE and EXCLUDE statements can appear, indicating each of the messages to be included or excluded. Because you control what the exits do, you can write a single exit that makes filtering decisions for several messages, not just one.

The PAYROLL exit might look like that shown in PAYROLL Exit Program.

PAYROLL Exit Program

/* Hiperstation 3270 filter: All PAYROLL messages */

if hs_exittype = ’INPUT’ then do
   if hs_key = ’ENTER’ & TRANSLATE(SUBSTR(hs_input.1,1,4)) = ’PAYR’ then
      hs_match = 1
end
else do
   if SUBSTR(hs_output.2,12,13) = ’SESSION ENDED’ then
      hs_match = 0
end

This PAYROLL exit is called for each <INPUT> and <OUTPUT> group in a script. You have determined that the PAYROLL message starts whenever the user types the PAYR message code and presses Enter. By setting HS_MATCH = 1, this exit signals Performance Test that this is the start of the PAYROLL message. Performance Test begins including screens in the target script data set.

The next lines of this exit look at the second row of each screen for a message created by the PAYROLL message when it is finished. When this message is seen on a screen, HS_MATCH = 0 is the signal to Performance Test that the PAYROLL message finishes. Performance Test begins excluding screens from the target script data set.

  • TRANSLATE is a REXX function that converts a character string to all uppercase letters. You can use TRANSLATE when you are looking for words on a screen and you do not care if the letters are uppercase or lowercase.
  • SUBSTR is a REXX function that examines a portion of a longer character string. It is useful for looking at only a small part of the screen.

The SALARY exit shown in SALARY Exit Program is also called for each <INPUT> and <OUTPUT> group in a script.

SALARY Exit Program

/* Hiperstation 3270 filter: All SALARY screens */

if hs_exittype = ’OUTPUT’ then do
   if TRANSLATE(SUBSTR(hs_output.1,1,3)) = ’SAL’ then
      hs_match = 1
   else
      hs_match = 0
end

You have determined that all of the SALARY screens in the PAYROLL message have an eyecatcher of SAL at row 1, column 1. By setting HS_MATCH = 1, this exit specifies that this is the first of the set of SALARY screens, and to exclude the screens.

If the eyecatcher does not appear on the current screen, the SALARY screens are finished, which you specify by setting HS_MATCH = 0.

The result of these two exits and the SYSIN parameters is to create scripts in the target script data set that contain only user input and screens for the PAYROLL message. Any screens within the PAYROLL message that pertain to SALARY information are excluded.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX Performance Test 17.02