Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Capture Joblog into PS Using REXX

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

Active User


Joined: 10 Aug 2009
Posts: 161
Location: India

PostPosted: Wed Dec 01, 2010 2:21 pm    Post subject: Capture Joblog into PS Using REXX
Reply with quote

Hi,

I have coded a rexx program to capture joblog from spool into a PS. Here is the code:

Code:

/* REXX */                                                                       
 STRNG='JESYSMSG'                                                               
 JOBNAME=Substr(FLIST.in,1,8)                                                   
 JOBID=Substr(FLIST.in,10,8)                                                     
                                                                                 
 Say JOBNAME                                                                     
 Say JOBID                                                                       
                                                                                 
ADDRESS TSO                                                                     
X = MSG("OFF")                                                                   
TEMP=USERID()||'.TP.SDSF'                                               
                                                                                 
ADDRESS TSO                                                                     
B=SYSDSN("'"TEMP"'")                                                             
If B = OK Then                                                                   
"DELETE '"||TEMP||"'"                                                           
"ALLOC F(ISFIN) TRACKS SPACE(1) REU"            /* USED BY SDSF     */           
                                                                                 
"ALLOC F(ISFOUT) DA('"TEMP"') NEW",                                             
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"                       
                                                                                 
"ALLOC F(OUTDD) DA("OUTFIL") NEW CATALOG REU ",                                 
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"                       
                                                                                 
QUEUE "SET CONFIRM OFF"                                                         
QUEUE "OWNER *"                                                                 
QUEUE "PREFIX *"                                                                 
QUEUE "DA"                                                                       
QUEUE "ST"                                                                       
QUEUE "SELECT "JOBNAME JOBID                                                     
QUEUE "AFD REFRESH"                                                             
QUEUE "FIND "JOBNAME                                                             
QUEUE "++?"                                                                     
QUEUE "FIND "STRNG                                                               
QUEUE "++S"                                /* BROWSE MSGUSR DATASET */           
QUEUE "PRINT FILE OUTDD "                  /* PRINT TO TEMP DATASET */           
QUEUE "PRINT 1 999999"                                                           
QUEUE "PRINT CLOSE"                                                             
QUEUE "END"                                                                     
QUEUE "EXIT"                                                                     
                                                                                 
"EXECIO" QUEUED()" DISKW ISFIN (FINIS"     /* INPUT TO SDSF BATCH   */           
                                                                                 
"EXECIO * DISKW OUTDD(FINIS"                                                     
                                                                                 
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255')" /* INVOKE SDSF */         
A = MSG(X)                                                                       
                                                                                 
Exit                                                                             


I am executing this rexx program in BATCH using following jcl,

Code:

//STEP04 EXEC PGM=IKJEFT01,PARM='rexx pgm'
//SYSEXEC  DD  DSN= rexx lib,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSTSPRT DD  SYSOUT=*
//OUTDD    DD  DSN=output ps file name,
//             DISP=(NEW,CATLG,DELETE),UNIT=DISK,
//             DCB=(LRECL=133,RECFM=FB,BLKSIZE=0)
//SYSTSIN  DD  DUMMY
//SYSIN    DD  *
P473574G
JOB08484
/*


I am getting EMPTY output file with the following message displayed in SYSTSPRT

Code:

********************************* TOP OF DATA **********************************
P473574G
JOB08484
    54 *-*  ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255')" /* INVOKE SDSF
       +++ RC(-3) +++
READY
END
******************************** BOTTOM OF DATA ********************************


Could you please let me know where I am doing wrong in my REXX code?

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

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8596
Location: Back in jolly old England

PostPosted: Wed Dec 01, 2010 2:25 pm    Post subject:
Reply with quote

You are using ISPF services without allocating the ISPF libraries via the JCL.

However, I am very impressed that you have posted ALL of the information required to resolve this in your first post.
Well done icon_biggrin.gif

Other posters please take note
Back to top
View user's profile Send private message
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 161
Location: India

PostPosted: Wed Dec 01, 2010 6:05 pm    Post subject:
Reply with quote

Thanks Expat,

Here onwards I will try to post all the required information for my queries.

I ran the job by allocating all ISPF libraries in JCL but still I got same output as I mentioned in my first post.

Could anyone suggest a solution for my problem? icon_sad.gif icon_sad.gif icon_sad.gif

Thanks!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8596
Location: Back in jolly old England

PostPosted: Wed Dec 01, 2010 6:17 pm    Post subject:
Reply with quote

Didn't notice earlier, but you do need to invoke ISPF to be able to use its services. Here's the PARM from an EXEC card I usually use.

Code:
PARM='ISPSTART CMD(%REXX Pgm)'
Back to top
View user's profile Send private message
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 161
Location: India

PostPosted: Wed Dec 01, 2010 6:58 pm    Post subject:
Reply with quote

Hi Expat,

I ran the job with your suggestion, i got following message

Code:
********************************* TOP OF DATA **********
ISPI003  Following file was not preallocated:
         ISPPROF
READY
END
******************************** BOTTOM OF DATA ********


Then updated my job with ISPPROF DD name then submitted

Now job is waiting for the dataset which I specified in ISPPROF dd name.

Any suggestions.

Thanks!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8596
Location: Back in jolly old England

PostPosted: Wed Dec 01, 2010 7:16 pm    Post subject:
Reply with quote

I usually use this
Code:
//PROFLIST DD DSN=&&TEMPPROF,DISP=(,PASS,DELETE),   
//            SPACE=(TRK,(45,45,44)),               
//            RECFM=FB,LRECL=80                     
//ISPTLIB  DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST 
   ....... other concats
//ISPTABL  DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST 
   ....... other concats
//ISPPROF  DD DSN=*.PROFLIST,DISP=SHR,VOL=REF=*.PROFLIST 
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10360
Location: italy

PostPosted: Wed Dec 01, 2010 7:22 pm    Post subject: Reply to: Capture Joblog into PS Using REXX
Reply with quote

but... wanting to use the settings in the online profile

my ispf batch procedure is a two step process
1) allocate a temporary PROFILE and copy into it the content of the GOOD profile
2) use the aforesaidtemporaryprofile in the ISPF step
Back to top
View user's profile Send private message
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 161
Location: India

PostPosted: Mon Dec 06, 2010 10:56 am    Post subject:
Reply with quote

Hi Expat,

I have modified the job as you suggested and ran the job but I got same error.

Hi Enrico,

I didn't understand what your suggested.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Dec 06, 2010 4:29 pm    Post subject:
Reply with quote

I don't speak REXX much, however, regarding "Capture Joblog into PS Using REXX" - you may have a look at this redbook: http://www.redbooks.ibm.com/abstracts/sg247419.html or this presentation: http://publib.boulder.ibm.com/infocenter/ieduasst/stgv1r0/index.jsp?topic=/com.ibm.iea.zos/zos/1.9/Simplification/zOSV1R9_Simplification_SDSFREXX/player.html, both discussing "Implementing REXX Support in SDSF".
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 Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 6 Sun Nov 19, 2017 7:59 pm
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
No new posts REXX LISTDSI () SMSINFO is not working upendrasri CLIST & REXX 4 Fri Nov 17, 2017 11:33 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 4 Wed Nov 15, 2017 4:27 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us