MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

saving the spool

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
dohellwithmf
Beginner


Joined: 12 Jul 2007
Posts: 55
Topics: 23

PostPosted: Tue Sep 15, 2009 2:42 pm    Post subject: saving the spool Reply with quote

Hi all,
can anyone tell me how to save joblog for 100 jobs in one go?
I use to execute jobs all over the day and in end of the day count goes to 100+. Its very time taking and irritating to save spool in the end of the day. I tried invoking SDSF in batch mode but there i can give one job at a time.
Is there any way I can save all my spool at the same time? Can anyone give me some hints if I can use REXX to code such utility.

Any help will be appreciated.

TIA, Mayank
Back to top
View user's profile Send private message
dohellwithmf
Beginner


Joined: 12 Jul 2007
Posts: 55
Topics: 23

PostPosted: Tue Sep 15, 2009 2:43 pm    Post subject: Reply with quote

i have got the following JCL which I used but here we need to give the jobid each time:
Code:

//BSDSF  EXEC PGM=ISFAFD,PARM='++30,256'
//ISFOUT   DD SYSOUT=*                 
//SYSUDUMP DD SYSOUT=*                 
//SYSPRINT DD SYSOUT=*                 
//SYSTSPRT DD SYSOUT=*                 
//SYSOUT   DD SYSOUT=*                 
//ISFIN    DD *                         
  PRE ZIRI*                             
  ST                                   
  FILTER OWNER EQ D172445               
  ++2                                   
  FIND 'MSGUSR'                         
  ++S                                   
  PRINT ODSN 'D172445.JOBLOG.TEST' * NEW
  PRINT 1 9999                         
  PRINT CLOSE                           
  END                                   
  EXIT
/*
Back to top
View user's profile Send private message
dohellwithmf
Beginner


Joined: 12 Jul 2007
Posts: 55
Topics: 23

PostPosted: Tue Sep 15, 2009 2:45 pm    Post subject: Reply with quote

correction the JCL used had:
FILTER JOBID EQ JOB39088
Back to top
View user's profile Send private message
dohellwithmf
Beginner


Joined: 12 Jul 2007
Posts: 55
Topics: 23

PostPosted: Thu Sep 17, 2009 3:24 pm    Post subject: Reply with quote

any REXX guru out there?
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Thu Sep 17, 2009 6:04 pm    Post subject: Reply with quote

Search for ISFAFD in this forum and you will find examples of listings jobs for a specific prefix. Then you can create an input like in your own jcl for each job.
Back to top
View user's profile Send private message Send e-mail
dohellwithmf
Beginner


Joined: 12 Jul 2007
Posts: 55
Topics: 23

PostPosted: Fri Sep 18, 2009 9:06 am    Post subject: Reply with quote

Dibakar,
i want to save all joblogs in a single step but in different data sets. how can i keep changing the dataset names for each job in my spool?
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Sat Sep 19, 2009 6:51 pm    Post subject: Reply with quote

dohellwithmf,

You need to break your job into three setps -

Step 1: Extract relevant jobnames, search for examples in the forum

Step 2: Create D172445.ISFIN dataset using from the joblist saved in step 1. You may write a COBOL or REXX or any other code to do that. Maybe you can find sort eaxmples to do the same

Code:


  Sample D172445.ISFIN dataset

  ST                                   
  FILTER JOBID EQ JOBnum1
  ++2                                   
  FIND 'MSGUSR'                         
  ++S                                   
  PRINT ODSN 'D172445.JOBLOG.JOBnum1' * NEW
  PRINT 1 9999                         
  PRINT CLOSE                           
  ST                                   
  FILTER JOBID EQ JOBnum2
  ++2                                   
  FIND 'MSGUSR'                         
  ++S                                   
  PRINT ODSN 'D172445.JOBLOG.JOBnum2' * NEW
  PRINT 1 9999                         
  PRINT CLOSE                           
  ST                                   
  FILTER JOBID EQ JOBnum3
  ++2                                   
  FIND 'MSGUSR'                         
  ++S                                   
  PRINT ODSN 'D172445.JOBLOG.JOBnum3' * NEW
  PRINT 1 9999                         
  PRINT CLOSE                   
  ...       
  END                                   
  EXIT


Step 3: Use your BSDSF step, replace '//ISFIN DD *' by '//ISFIN DD DSN=D172445.ISFIN,disp=shr
Back to top
View user's profile Send private message Send e-mail
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Sep 19, 2009 11:47 pm    Post subject: Reply with quote

SDSF V1.9 and higher: See samples at http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/isf4cs70/12.0
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
s_shivaraj
Beginner


Joined: 21 Sep 2004
Posts: 140
Topics: 14
Location: Chennai, India

PostPosted: Mon Sep 21, 2009 12:14 am    Post subject: Reply with quote

dohellwithmf, Using ISFEXEC host command you can acess the spool data, search for that. Please check the link also for more information

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.isfa500/isf4cs70247.htm

Let me know in case if you need an example, i can share the piece of code where i am using the spool information.
_________________
Cheers
Sivaraj S

'Technical Skill is the Master of complexity, while Creativity is the Master of Simplicity'
Back to top
View user's profile Send private message AIM Address
s_shivaraj
Beginner


Joined: 21 Sep 2004
Posts: 140
Topics: 14
Location: Chennai, India

PostPosted: Mon Sep 21, 2009 12:31 am    Post subject: Reply with quote

Try this piece of code,. Note:- i didnt include any error handling.. plz include.
Code:

/* rexx */                                                             
IsfRC = isfcalls( "ON" )                                               
isfowner  = USerid
DdName    = 'MSGUSR'                         
isffilter = "queue = print"                                             
isfcols = "jname jobid ownerid queue jclass prtdest retcode"           
address SDSF "isfexec st"                                               
StRows    =   isfrows                                                   
do i = 1 to StRows                                                     
 address SDSF "isfact st token('"Token.i"') parm(np ?) (prefix J_"     
 do jX = 1 to j_ddname.0                                               
    If j_ddname.jX = DDName then Do                                     
    address SDSF "isfact st token('"j_token.jX"') parm(np sa)"         
    "execio * diskr" isfddname.1 "(stem SpoolDat. finis" ;             
    end                                                                 
 end                                                                   
end

_________________
Cheers
Sivaraj S

'Technical Skill is the Master of complexity, while Creativity is the Master of Simplicity'
Back to top
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Sep 21, 2009 1:34 am    Post subject: Reply with quote

s_shivaraj,

How about following this post and saving me some time ?

http://www.mvsforums.com/helpboards/viewtopic.php?p=19023#19023

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
s_shivaraj
Beginner


Joined: 21 Sep 2004
Posts: 140
Topics: 14
Location: Chennai, India

PostPosted: Mon Sep 21, 2009 3:08 am    Post subject: Reply with quote

Sorry for that.. Did the pasting in a hurry..will make a note
_________________
Cheers
Sivaraj S

'Technical Skill is the Master of complexity, while Creativity is the Master of Simplicity'
Back to top
View user's profile Send private message AIM Address
dohellwithmf
Beginner


Joined: 12 Jul 2007
Posts: 55
Topics: 23

PostPosted: Fri Sep 25, 2009 10:22 am    Post subject: Reply with quote

Thanks Sivraj !!
The tool is working as expected. User can provide Jobname and Owner id and the first 2-3 node of the file he wish to write into. But its taking loads of time. It tool 10 mins to copy 16 joblogs (few were abended so they had more lines).

Can we optimize the code? Pls note that i have not included error/exception handling yet so the time taken will increase more once i'll place error handling in this.
Code:

Code:
/* REXX */                                           
SAY;SAY;SAY;                                         
SAY 'ENTER JOBNAME:'                                 
PULL JOBNAME                                         
SAY 'ENTER OWNER:'                                   
PULL OWNER                                           
SAY 'ENTER OUTPUT FILE NAME:'                         
PULL OUTFILE                                         
ISFRC = ISFCALLS( "ON" )                             
ISFPREFIX = JOBNAME                                   
ISFOWNER  = OWNER                                     
DDNAME    = 'MSGUSR'                                 
ISFCOLS = "JOBID OWNERID QUEUE JCLASS PRTDEST RETCODE"
ADDRESS SDSF "ISFEXEC ST"                             
STROWS    =   ISFROWS                                 
JNAMEFIELD = WORD(ISFCOLS,1)                         
JIDFIELD = WORD(ISFCOLS,3)                           
DO I = 1 TO ISFROWS                                               
JNAME = VALUE(JNAMEFIELD"."I)                                     
JIDNAME = VALUE(JIDFIELD"."I)                                     
NEXTFILE = OUTFILE | | "." | | JNAME | | "." | | JIDNAME         
"ALLOCATE DATASET('"NEXTFILE"') F(DAT) NEW SPACE(10,5) DIR(0)",   
"DSORG(PS) RECFM(F,B) LRECL(150) BLKSIZE(1500)"                   
"FREE F(DAT)"                                                     
     "ALLOC DDN(OP) DSN('"NEXTFILE"') MOD REUSE"                 
 ADDRESS SDSF "ISFACT ST TOKEN('"TOKEN.I"') PARM(NP ?) (PREFIX J_"
  DO JX = 1 TO J_DDNAME.0                                         
     IF J_DDNAME.JX <> DDNAME THEN DO                             
     ADDRESS SDSF "ISFACT ST TOKEN('"J_TOKEN.JX"') PARM(NP SA)"   
     "EXECIO * DISKR" ISFDDNAME.1 "(STEM SPOOLDAT. FINIS"         
     END                                                         
     DO M=1 TO SPOOLDAT.0                                         
       PUSH SPOOLDAT.M                                           
     "EXECIO 1 DISKW" OP "(FINIS"                                 
     END                         
"DELSTACK"                       
  END                             
      "FREE F(OP)"               
END                               
ISFRC = ISFCALLS( "OFF" )
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group