Searching and producing report from SDSF



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Searching and producing report from SDSF

Postby Misha786 » Mon Mar 08, 2021 6:46 pm

Hi All -
I have a requirement where I need to search a string "$HASP150' from spool and if found need to pickup that line to produce a report.

 SDSF OUTPUT DISPLAY M958R2   JOB02114  DSID     2 LINE 0       COLUMNS 02- 81
 COMMAND INPUT ===>                                            SCROLL ===> CSR
********************************* TOP OF DATA ********************************
                       J E S 2  J O B  L O G  --  S Y S T E M  S I 0 0  --  N
                                                                             
08.10.49 JOB02114 ---- MONDAY,    08 MAR 2021 ----                            
08.10.49 JOB02114  $HASP373 M958R2   STARTED - INIT 48   - CLASS 4        - SY
08.10.49 JOB02114  ACF9CCCD USERID M958     IS ASSIGNED TO THIS JOB - M958R2  
08.10.49 JOB02114  IEF403I M958R2 - STARTED - TIME=08.10.49                  
08.10.50 JOB02114  JOB-M958R2   STEP-PDFINFO.TUPTRF    PGM-AOPBATCH R.C.-0000
08.10.50 JOB02114  JOB-M958R2   STEP-PRINT.TUPTRF      PGM-IEBGENER R.C.-0000
08.10.50 JOB02114  IEF404I M958R2 - ENDED - TIME=08.10.50                    
08.10.50 JOB02114  $HASP395 M958R2   ENDED - RC=0000                          
 

So, do I have to read the SYSLOG ? If so, how can this be done. Any suggestion wold be helpful please
Misha786
 
Posts: 31
Joined: Fri Nov 27, 2020 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: Searching and producing report from SDSF

Postby sergeyken » Mon Mar 08, 2021 7:05 pm

Since you are able to read SDSF log, you can use the SE line command (next to the desired job), and then - to copy the log to any dataset.
When done, you can use any of ISPF tools, or any batch utility, to find or to extract from this dataset whatever you want.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Searching and producing report from SDSF

Postby Misha786 » Mon Mar 08, 2021 7:16 pm

thanks Sergeyken .. that would have been great if it was related to only my job. Our requirement is such that we do not know how many user would be running this kind of job (related to print ) and when. So, reading the sdsf log to search for "$HASP150" string would help us pickup the all the job information from sdsf related to "$HASP150' . Hence, I am looking for some kind of batch job or any other utility to get this done. Please let me know if could convey my requirement clearly. Thanks in Advance !!
Misha786
 
Posts: 31
Joined: Fri Nov 27, 2020 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: Searching and producing report from SDSF

Postby sergeyken » Mon Mar 08, 2021 7:19 pm

The simplest way “to find and to extract this line to produce a report” is, using a SORT utility (also 100500 other methods are available)
INREC IFTHEN=(WHEN=(1,50,SS,EQ,C’ $HASP150 ‘),
              BUILD=(1,121))

Or similar code, depending on you (unspecified) requirements.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Searching and producing report from SDSF

Postby sergeyken » Mon Mar 08, 2021 7:24 pm

Misha786 wrote:thanks Sergeyken .. that would have been great if it was related to only my job. Our requirement is such that we do not know how many user would be running this kind of job (related to print ) and when. So, reading the sdsf log to search for "$HASP150" string would help us pickup the all the job information from sdsf related to "$HASP150' . Hence, I am looking for some kind of batch job or any other utility to get this done. Please let me know if could convey my requirement clearly. Thanks in Advance !!

In this case you need to automate the scanning process of all available SDSF logs in the output queue.
Such tools are available for use within ISPF, as well as for batch processing (mainly from REXX). I did it several times in my life, but do not keep those details in my mind. I’m pretty sure I can find it again if needed. Hope you can do this search by yourself, or maybe you’ll get more detailed answer from those who has such examples on hand right now.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Searching and producing report from SDSF

Postby Misha786 » Mon Mar 08, 2021 7:44 pm

Thanks Sergeyken for your quick response. Unfortunately, I do not have something handy to serve my purpose. I am not a mainframe expert either to quickly buildup something like this and hence looking forward to this forum for help if anyone has it, that would be great.
Thanks once again Sergeyken !!
Misha786
 
Posts: 31
Joined: Fri Nov 27, 2020 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: Searching and producing report from SDSF

Postby sergeyken » Mon Mar 08, 2021 8:22 pm

Misha786 wrote:Thanks Sergeyken for your quick response. Unfortunately, I do not have something handy to serve my purpose. I am not a mainframe expert either to quickly buildup something like this and hence looking forward to this forum for help if anyone has it, that would be great.
Thanks once again Sergeyken !!

OK,

At this moment I’m quite busy to make this searching for examples. If nobody else would provide some directions soon, I may be able to do this within a week, or so, whenever I have enough time.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: Searching and producing report from SDSF

Postby willy jensen » Tue Mar 09, 2021 2:26 pm

Sounds to me that it really the syslog you need to search rather than opening SDSF. How is your syslog saved? I'm sure that you must have either datasets (GDS most likely) or just using the system logger. In either case you can easily put together a SORT job to pull the $HASP150 messages. Let us know how syslog is saved.
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: Searching and producing report from SDSF

Postby Misha786 » Tue Mar 09, 2021 6:59 pm

Hi Willy -
We are not saving the syslogs anywhere. So, I am looking for something that can autoread/autoscan the syslogs and pickup $HASP150 message related records.
Thats all I need a batach job or rexx utility to run in bacth to collect those records and dump those in a ps file. Any help would be great !!
Thanks.
Misha786
 
Posts: 31
Joined: Fri Nov 27, 2020 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: Searching and producing report from SDSF

Postby sergeyken » Tue Mar 09, 2021 8:47 pm

These are two useful links on how to deal with SDSF log from REXX code. AFAIR I also used those two in my former projects.

Using SDSF with the REXX programming language

Implementing REXX Support in SDSF

They should help
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post