| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| dohellwithmf Beginner
 
  
 Joined: 12 Jul 2007
 Posts: 55
 Topics: 23
 
 
 | 
			
				|  Posted: Tue Sep 15, 2009 2:42 pm    Post subject: saving the spool |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| dohellwithmf Beginner
 
  
 Joined: 12 Jul 2007
 Posts: 55
 Topics: 23
 
 
 | 
			
				|  Posted: Tue Sep 15, 2009 2:43 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| dohellwithmf Beginner
 
  
 Joined: 12 Jul 2007
 Posts: 55
 Topics: 23
 
 
 | 
			
				|  Posted: Tue Sep 15, 2009 2:45 pm    Post subject: |   |  
				| 
 |  
				| correction the JCL used had: FILTER JOBID EQ JOB39088
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| dohellwithmf Beginner
 
  
 Joined: 12 Jul 2007
 Posts: 55
 Topics: 23
 
 
 | 
			
				|  Posted: Thu Sep 17, 2009 3:24 pm    Post subject: |   |  
				| 
 |  
				| any REXX guru out there? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dibakar Advanced
 
  
 Joined: 02 Dec 2002
 Posts: 702
 Topics: 64
 Location: USA
 
 | 
			
				|  Posted: Thu Sep 17, 2009 6:04 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| dohellwithmf Beginner
 
  
 Joined: 12 Jul 2007
 Posts: 55
 Topics: 23
 
 
 | 
			
				|  Posted: Fri Sep 18, 2009 9:06 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Dibakar Advanced
 
  
 Joined: 02 Dec 2002
 Posts: 702
 Topics: 64
 Location: USA
 
 | 
			
				|  Posted: Sat Sep 19, 2009 6:51 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| semigeezer Supermod
 
 
 Joined: 03 Jan 2003
 Posts: 1014
 Topics: 13
 Location: Atlantis
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| s_shivaraj Beginner
 
  
 Joined: 21 Sep 2004
 Posts: 140
 Topics: 14
 Location: Chennai, India
 
 | 
			
				|  Posted: Mon Sep 21, 2009 12:14 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| s_shivaraj Beginner
 
  
 Joined: 21 Sep 2004
 Posts: 140
 Topics: 14
 Location: Chennai, India
 
 | 
			
				|  Posted: Mon Sep 21, 2009 12:31 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| s_shivaraj Beginner
 
  
 Joined: 21 Sep 2004
 Posts: 140
 Topics: 14
 Location: Chennai, India
 
 | 
			
				|  Posted: Mon Sep 21, 2009 3:08 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| dohellwithmf Beginner
 
  
 Joined: 12 Jul 2007
 Posts: 55
 Topics: 23
 
 
 | 
			
				|  Posted: Fri Sep 25, 2009 10:22 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		|  | 
	
		|  |