How to report on a Data Set Prefix or High Level Qualifier running TMSGRW?
search cancel

How to report on a Data Set Prefix or High Level Qualifier running TMSGRW?

book

Article ID: 40152

calendar_today

Updated On:

Products

CA 1 Flexible Storage

Issue/Introduction

 

How to report on a Data Set Prefix or High Level Qualifier running TMSGRW?

 

Resolution

 

TMSGRW compares the operands from the WHEN statement using the length of the first operand. If you specify your operand from the CONTROL SECTION, as first operand you get a match for all records starting with your defined value in the related field.

NOTE: this works for character fields only.

The following sample lists all volumes with a DSN starting with USER01.T:

//TMSGRW.SYSIN DD *                    

CONTROL-SECTION                        

TITLE 'DATA SETS STARTING WITH ...... '

DEFINE PREFIX CH 'USER01.T'          

*                                      

PROCESS-SECTION                        

WHEN PREFIX EQ DSN                     

LIST                                   

*                                      

REPORT-SECTION                          

PRINT VOLSER                           

PRINT DSN                              

PRINT EXPDT                            

*        

 

TMS REPORT-49                                    DATA SETS STARTING WITH ......             

  VOLSER   DSN                                            EXPDT                             

                                                                                            

  V00001   USER01.TEST1                                   2018/100                           

  V00004   USER01.TEST2                                   2018/100                          

  V00005   USER01.TESTTAPE.FILE1                          2018/100                          

  V00009   USER01.T                                       2018/100                            

 

Additional Information:

If more complex filtering is required use Vantage or the pattern masking feature of EARL.