Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

i want to extract all the JESMSGs of all the jobs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Apr 18, 2008 12:54 am    Post subject:
Reply with quote

Hi,

There are about hundreds of CICS jobs that run in the spool,
like this....
Code:
  Display  Filter  View  Print  Options  Help                                 
-------------------------------------------------------------------------------
SDSF STATUS DISPLAY ALL CLASSES                        LINE 1-18 (639)         
COMMAND INPUT ===>                                            SCROLL ===> CSR 
PREFIX=CICST*  DEST=(ALL)  OWNER=*  SORT=Pos/A  SYSNAME=                       
NP   JOBNAME  JobID    Owner    Prty Queue      C  Pos  Max-RC     SAff  ASys S
     CICSTBD  STC02452 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTBL  STC02453 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTDA  STC02454 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTDD  STC02464 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD4  STC02472 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD5  STC02473 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD9  STC02478 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD6  STC02474 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD1  STC02468 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD2  STC02469 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD8  STC02476 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTDE  STC02467 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTXS  STC02488 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTHO  STC02485 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTDX  STC24247 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTSP  STC31825 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTHN  STC06087 TCICS      15 EXECUTION                     MVSK  MVSK 

If i want to extract all the JESMSGs of all the jobs, then could you please let me know how this can be done..

I tried the below code, but I was able to get only one job details,i.e. the details of the second job alone.

Code:
/*REXX*/                                                               
ADDRESS TSO                                                             
"ALLOC F(ISFIN) TRACKS SPACE(1) REU"            /* USED BY SDSF     */ 
"ALLOC F(ISFOUT) NEW DELETE REU " ,             /* USED BY SDSF     */ 
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"               
"ALLOC F(TEMPPRT) DA('XK89.SDSF') SHR"                                 
                                                                       
QUEUE "PRE CICST*"                       /* SDSF COMMANDS IN BATCH*/   
QUEUE "ST"                                                             
QUEUE "FIND 'JESMSG'"                                         
QUEUE "PRINT FILE TEMPPRT "                /* PRINT TO TEMP DATASET */ 
QUEUE "PRINT 1 999999"                                                 
QUEUE "ST"                                                             
QUEUE "DOWN 1"                                                         
QUEUE "++S"                                /* BROWSE MSGUSR DATASET */ 
QUEUE "PRINT FILE TEMPPRT "                /* PRINT TO TEMP DATASET */ 
QUEUE "PRINT 1 999999"                                                 
QUEUE "PRINT CLOSE"                                                     
QUEUE "END"                                                             
QUEUE "EXIT"                                                           
                                                                       
"EXECIO" QUEUED()" DISKW ISFIN (FINIS"     /* INPUT TO SDSF BATCH   */ 
                                                                       
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255)" /* INVOKE SDSF */ 
EXIT


Also gone through other threads, but could not find, how to find the number of jobs currently running in the spool.

Thanks in advance.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 18, 2008 3:38 am    Post subject:
Reply with quote

Hello,

What we used to do (in an sdsf session) was issue a "PRINT ODSN dsn" that opened an output dataset. Then when we selected output, we just issued "PRINT". When we had printed what we wanted, we issued "PRINT CLOSE" which closed the dataset.

I believe that your "code" is writing over the output dataset each time you specify PRINT, so the last PRINT is all that will be in the output.

This is from memory, so i hope i'm close. . .
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Apr 18, 2008 2:59 pm    Post subject:
Reply with quote

I have progressed slightly in the situation, by using a loop logic,

Code:
/*REXX*/                                                               
ADDRESS TSO                                                             
DO I = 0 TO 1                                 /*I TO READ TWO JOBS*/   
"ALLOC F(ISFIN) TRACKS SPACE(1) REU"            /* USED BY SDSF     */ 
"ALLOC F(ISFOUT) NEW DELETE REU " ,             /* USED BY SDSF     */ 
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"               
"ALLOC F(TEMPPRT) DA('XK89.SDSF') SHR"                                 
"ALLOC F(ACCUM) DS('XK89.ACCUM') MOD"                                   
                                                                       
QUEUE "PRE CICST*"                       /* SDSF COMMANDS IN BATCH*/   
QUEUE "ST"                                                             
QUEUE "DOWN '"I"'"                                                     
QUEUE "++S"                                /* BROWSE MSGUSR DATASET */ 
QUEUE "PRINT FILE TEMPPRT "                /* PRINT TO TEMP DATASET */ 
QUEUE "PRINT 1 999999"                                                 
QUEUE "PRINT CLOSE"                                                     
QUEUE "END"                                                             
QUEUE "EXIT"                                                           
                                                                       
"EXECIO" QUEUED()" DISKW ISFIN (FINIS"     /* INPUT TO SDSF BATCH   */ 
                                                                       
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255)" /* INVOKE SDSF */ 
                                                                       
"EXECIO * DISKR TEMPPRT (FINIS STEM IN."                               
"EXECIO * DISKW ACCUM (FINIS STEM IN."                                 
END                                                                     
EXIT   



But the variable I in QUEUE "DOWN '"I"'" line is not getting resolved.
I have tried moving around " and ' but still cannot progress further.

Could you please show me some light in the tunnel please.

Thanks in advance
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Apr 18, 2008 3:23 pm    Post subject:
Reply with quote

in SDSF if I type

Code:
DOWN '1'


i get
Code:

INVALID SCROLL AMOUNT


so instead type DOWN 1 (without quotes), so change
Code:
QUEUE "DOWN '"I"'"   

to
Code:
QUEUE "DOWN "I   


hth
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Apr 18, 2008 3:31 pm    Post subject:
Reply with quote

btw, I have a similar program to look for messages IEFC001I and IEFC002I in JESYSMSG... previous to my program SDSF is downloaded (with some conditions) and this file is the input to the program wich 'fetchs' in SDSF using Jobname and Jobid.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Apr 18, 2008 3:46 pm    Post subject:
Reply with quote

Hi acevedo,

Many thanks for the correction, the variable I resolves properly icon_smile.gif

BTW. This REXX code was taken from a post by Ofer, so this may have been familiar to you.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Apr 18, 2008 6:05 pm    Post subject:
Reply with quote

glad to help you.
icon_wink.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Thu May 08, 2008 2:44 am    Post subject:
Reply with quote

Hi,

There are hundreds of CICS jobs in spool, both running and completed ones also...

like this,

Code:
PREFIX=CICSTD*  DEST=(ALL)  OWNER=*  SORT=Pos/A  FILTERS=1  SYSN
NP   JOBNAME  JobID    Owner    Prty Queue      C  Pos  Max-RC 
     CICSTD5  STC13169 TCICS      15 EXECUTION                 
     CICSTD8  STC13172 TCICS      15 EXECUTION                 
     CICSTD6  STC13170 TCICS      15 EXECUTION                 
     CICSTD7  STC13171 TCICS      15 EXECUTION                 
     CICSTDA  STC21176 TCICS      15 EXECUTION                 
     CICSTDB  STC05511 TCICS       1 PRINT            8 CC 0000
     CICSTDD  STC05513 TCICS       1 PRINT            9 CC 0000
     CICSTD6  STC05556 TCICS       1 PRINT           10 CC 0000
     CICSTDE  STC05544 TCICS       1 PRINT           11 CC 0000
     CICSTD7  STC05560 TCICS       1 PRINT           12 CC 0000


I want to extract the JESMSG's of only the EXECUTING CICS jobs alone and leave out the completed ones.

I tried using DA in sdsf, but it does not show even executing CICS jobs.
I tried using "FILTER QUEUE EXECUTION" in the REXX code, but that too did'nt not work.

FILTER QUEUE EXECUTION command works perfectly in online mode, it brings up only executing CICS jobs. like this,

Code:
PREFIX=CICSTD*  DEST=(ALL)  OWNER=*  SORT=Pos/A  FILTERS=1  SYSNAME=           
NP   JOBNAME  JobID    Owner    Prty Queue      C  Pos  Max-RC     SAff  ASys S
     CICSTD5  STC13169 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD8  STC13172 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD6  STC13170 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTD7  STC13171 TCICS      15 EXECUTION                     MVSK  MVSK 
     CICSTDA  STC21176 TCICS      15 EXECUTION                     MVSK  MVSK 



I guess that FILTER command is for viewing purposes only and REXX does not recognise it.

Could someone show some light in the tunnel, about how this can be carried forward.

Thanks in advance, icon_smile.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu May 08, 2008 6:56 am    Post subject:
Reply with quote

vasanthz wrote:
There are hundreds of CICS jobs in spool, both running and completed ones also...
Welcome back.....
Check out Lionel B. Dyck. he has a great little tool, SDFSEXT, a generalized SDSF batch tool to extract all or part of your sysout into a dataset that you could do whatever you want with.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue May 20, 2008 4:52 pm    Post subject:
Reply with quote

Quote:
There are hundreds of CICS jobs in spool, both running and completed ones also...


The above stated REXX code(Please refer to the 7th post before this)
works fine in ONLINE mode, but when i use batch submission of REXX(IKJEFT1B utility) the batch job does not recognise the ISFAFD program.
icon_sad.gif
All these days i thought, whatever code that runs in online mode, works the same way in batch.. icon_sad.gif

Is there any way to execute the above program in batch..
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue May 20, 2008 4:54 pm    Post subject: Reply to: i want to extract all the JESMSGs of all the jobs
Reply with quote

Quote:
the batch job does not recognise the ISFAFD program.


chack that the libraries allocated to Your tso session are also in the
concatenation of the batch jcl
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue May 20, 2008 5:12 pm    Post subject:
Reply with quote

Hi enrico,

Could you please let me know how to check the libraries, the online execution is accessing. icon_confused.gif

After finding it, if I specify it in JCLLIB then the batch program will work right..??
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue May 20, 2008 5:15 pm    Post subject: Reply to: i want to extract all the JESMSGs of all the jobs
Reply with quote

tso isrddn is the command that will show the ddnames and the libraries for each ddname

in the command line enter M ISFAFD

and make sure that the library containing it is in the corresponding batch ddname
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue May 20, 2008 7:58 pm    Post subject:
Reply with quote

Apologies if I am asking a silly question,


Thanks for the swift,

When I tried tso isrddn it brings up the below list,


Code:
Volume   Disposition Act DDname   Data Set Name   Actions: B E V M F C I Q   
SYSLB3   SHR,KEEP   >    EDCHKDD  ZZ.V1R1M0.ISPSLIB(EDCHKDD)                 
SYSLB3   SHR,KEEP   >    ISPLLIB  ZZ.V1R1M0.ISPLLIB                           
SYSLB3   SHR,KEEP   >             ZA.DEV.LOAD                                 
SYSLB3   SHR,KEEP   >             ZZ.DML.LOAD.LIB                             
SYSLB3   SHR,KEEP   >    ISPMLIB  ZZ.V1R1M0.ISPMLIB                           
SYSLB3   SHR,KEEP   >             ZZ.DEV.ISPMLIB                             
SRS221   SHR,KEEP   >             SYS3.ISP.SISPMENU                           
SYSLB3   SHR,KEEP   >    ISPPLIB  ZZ.V1R1M0.ISPPLIB                           
SYSLB4   SHR,KEEP   >             ZZ.DEV.ISPPLIB                             
SRS221   SHR,KEEP   >             SYS3.ISP.SISPPENU                           
CTSO10   SHR,KEEP   >    ISPPROF  XK89.ISPF.ISPPROF                           
SYSLB3   SHR,KEEP   >    ISPSLIB  ZZ.V1R1M0.ISPSLIB                           
SYSLB3   SHR,KEEP   >             ZZ.DEV.ISPSLIB                             
SRS221   SHR,KEEP   >             SYS3.ISP.SISPSENU                           
SRS221   SHR,KEEP   >             SYS3.ISP.SISPSLIB                           
SYSLB3   SHR,KEEP   >    ISPTABL  ZZ.DEV.ISPTLIB                             
SYSLB3   SHR,KEEP   >    ISPTLIB  ZZ.DEV.ISPTLIB                             
SRS221   SHR,KEEP   >             SYS3.ISP.SISPTENU                           
SYSLB3   SHR,KEEP   >             ZZ.V1R1M0.ISPTLIB                           
CTSO11   MOD,CATLG  >    ISP14541 XK89.SPFLOG3.LIST                           
SYSLB3   SHR,KEEP   >    STEPLIB  ZZ.V1R1M0.ISPLLIB                           
SRS223   SHR,KEEP   >             SYS3.CEE.SCEERUN                           
SYSLB5   SHR,KEEP   >    SYSHELP  TESCO.HELP                                 
SRS221   SHR,KEEP   >             SYS1.HELP                                   
         NEW,DEL    >    SYSIN    ---------- Allocated to the terminal -------
         NEW,DEL    >    SYSPRINT ---------- Allocated to the terminal -------
S2CAT1   SHR,KEEP   >    SYSPROC  TESCO.CMDPROC                               
SRS221   SHR,KEEP   >             SYS3.ISP.SISPCLIB                           
SYSLB3   SHR,KEEP   >             ZA.DEV.CLIST                               
         NEW,DEL    >    SYSTERM  ---------- Allocated to the terminal -------


But M ISFAFD gives "Member not found"

I have gone inside all the PDS's listed, but still unable find the program ISFAFD.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue May 20, 2008 8:35 pm    Post subject:
Reply with quote

Kindly ignore the previous 2 posts.

When the online rexx was ran, a new DD was popping up in TSO ISRDDN screen.

So added this line,
//STEPLIB DD DSN=ZZ.V1R1M0.ISPSLIB(EDCHKDD),DISP=SHR

it did the trick.

Many thanks for enrico-sorichetti, for sharing the command "TSO ISRDDN"
very helpful
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm
No new posts Don't allow CICS to submit batch jobs prino JCL & VSAM 5 Mon Jul 25, 2016 3:26 pm
No new posts Predicting jobs which are about to re... kpanchabhai85 DFSORT/ICETOOL 4 Thu Jun 30, 2016 7:51 pm
No new posts How to find jobs that are in schedule... anilkumar922 All Other Mainframe Topics 5 Tue Jun 28, 2016 10:01 am
No new posts Sort Logic to extract data scorp_rahul23 DFSORT/ICETOOL 13 Tue Mar 01, 2016 1:22 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us