What are you actually trying to do with this information? There are various tools available for log analysis.
-- Kevin McKenzie External Phone: 845-435-8282, Tie-line: 8-295-8282 z/OS Test Services - Test Architect, Provisioning z/OS Hardware/Software Interlock From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Jason Cai <ibmm...@foxmail.com> Date: Wednesday, July 26, 2023 at 4:19 AM To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU> Subject: [EXTERNAL] Inquiry about extracting and counting msgid from operlog using sort program 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN