Dear All,

 I am writing to inquire about how to use the sort program on the mainframe to 
extract and count msgid from a day's operlog. I would appreciate your guidance 
and advice on this matter.

Msgid is a keyword that identifies system messages. It usually consists of 7 
letters and a number, such as IEA001I or CSV003E. However, some msgid may have 
up to 10 characters.

I need to extract all msgid from the operlog, and remove any duplicates. Then, 
I need to count the number of occurrences of each msgid and generate a report.

I have tried to use the following statement to extract msgid, and it seems to 
work well. However, I am not sure if there is anything missing or if it can be 
written more simply.

SORT FIELDS=(58,7,CH,A)                                           
     INCLUDE COND=((58,7,SS,NE,C' ',AND,                          
                   65,1,CH,EQ,C' ',AND,                           
                   (63,1,SS,EQ,C'0,1,2,3,4,5,6,7,8,9'),AND,       
                   (64,1,SS,EQ,C'ABCDEFGHIJKLMNOPQRSTUVWXYZ')),OR,
                   (58,8,SS,NE,C' ',AND,                          
                   66,1,CH,EQ,C' ',AND,                           
                   (64,1,SS,EQ,C'0,1,2,3,4,5,6,7,8,9'),AND,       
                   (65,1,SS,EQ,C'ABCDEFGHIJKLMNOPQRSTUVWXYZ')),OR,
                   (58,9,SS,NE,C' ',AND,                          
                    67,1,CH,EQ,C' ',AND,                          
                   (65,1,SS,EQ,C'0,1,2,3,4,5,6,7,8,9'),AND,       
                   (66,1,SS,EQ,C'ABCDEFGHIJKLMNOPQRSTUVWXYZ')),OR,
                   (58,10,SS,NE,C' ',AND,                         
                    68,1,CH,EQ,C' ',AND,                          
                   (66,1,SS,EQ,C'0,1,2,3,4,5,6,7,8,9'),AND,    
                   (67,1,SS,EQ,C'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))

But I do not know how to count the number of occurrences of each msgid and 
eliminate duplicates.

Thank you for your time and attention.

Sincerely,

Jason Cai

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to