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 

send results of TYRUN=SCAN to a dataset

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
MVS_blob
Beginner


Joined: 23 Oct 2007
Posts: 23
Topics: 9

PostPosted: Tue May 12, 2009 8:11 am    Post subject: send results of TYRUN=SCAN to a dataset Reply with quote

Hi all!

I'll begin with some background..

The company I work with uses alot of JCL substitutions:
Code:

//IM58ODAC JOB ' ',MSGCLASS=X,CLASS=A
//STEP001  EXEC PROC1,           
//             ENV=PROD,         
//             STAGE=LIVE,       
//             LIB=JCL           



Proc:
Code:

//PROC1   PROC
//STEP010  EXEC PGM=IEFBR14                           
//SYSPRINT DD SYSOUT=*                               
//SYSIN    DD DUMMY                                   
//DD01     DD DSN=&ENV..&STAGE..&LIB.LIB(CARD1),
//            DISP=(MOD,DELETE,DELETE),               
//            SPACE=(TRK,(0,0),RLSE)                               
//PROC1   PEND


running the JCL with TYPRUN=SCAN will reveal the actual datasets in use:
Code:
//TESTJOB  JOB ' ',MSGCLASS=X,CLASS=A,TYPRUN=SCAN                       
//PROC     JCLLIB ORDER=(USERNAME.TEST.PROCLIB)                         
//STEP001  EXEC PROC1,                                                 
//             ENV=PROD,                                               
//             STAGE=LIVE,                                             
//             LIB=JCL                                                 
XXPROC1   PROC                                                         
XXSTEP010  EXEC PGM=IEFBR14                                             
XXSYSPRINT DD SYSOUT=*                                                 
XXSYSIN    DD DUMMY                                                     
XXDD01     DD DSN=&ENV..&STAGE..&LIB.LIB,                               
XX            DISP=(MOD,DELETE,DELETE),                                 
XX            SPACE=(TRK,(0,0),RLSE)                                   
IEFC653I SUBSTITUTION JCL - DSN=PROD.LIVE.JCLLIB,DISP=(MOD,DELETE,DELETE
XXPROC1   PEND                                                         


As there are hundreds of JCL, PROCS, and different substitution combinations possible, its a bit tricky when you're searching for a job that accesses a particular dataset.

So what I want to do is submit all of the JCLS with TYPRUN=SCAN to a dataset where I will be able to search for a particular dataset later on.

Once I figure out how to send the interpreted JCL with TYPRUN=SCAN to a dataset instead of JES2, I should be able to figure out the rest.

so... anyone know how to send the output of TYPRUN=SCAN to a dataset?
Back to top
View user's profile Send private message
Ram
Beginner


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Tue May 12, 2009 11:08 am    Post subject: Reply with quote

Do an XDC from spool panel and save it into a file.
If your shop has ASG-JOB/SCAN installed, it supports a feature for running batch job to check the syntax of JCL's. You could store the o/p in a dataset and then try searching for the dataset names of your interest.
Back to top
View user's profile Send private message
MVS_blob
Beginner


Joined: 23 Oct 2007
Posts: 23
Topics: 9

PostPosted: Wed Jun 03, 2009 11:04 am    Post subject: Reply with quote

Ram,

Yes, XDC would work, but when you've got thousands of jobs, its impractical to perform XDC thousands of times.

.... after some research, I've found a way to get the data from SDSF directly:

Code:
//SDSFBTCH JOB ' ',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),REGION=0M,
//          NOTIFY=&SYSUID                                     
//*------------------------------------------------------------
//*      JOB TO RUN SDSF IN BATCH                             
//*------------------------------------------------------------
//SDSFSTEP EXEC PGM=SDSF,PARM='++60,228'                       
//ISFOUT   DD  SYSOUT=*                                       
//ISFIN    DD  *                                               
  PRINT ODSN 'USERNAME.DATA.FLATFILE'                         
  OWNER USERNAME
  ST                                                           
  PRE JOBNAME                                                 
  FIND JOBNAME                                                 
  ++?                                                         
  FIND JESJCL                                                 
  ++S                                                         
  PRINT                                                       
  PRINT CLOSE                                                 
/*                                                             


This will print out the interpreted JESJCL in SDSF to USERNAME.DATA.FLATFILE.

... so looks like the steps would be to
- write a rexx to edit all JCLs to include TYPRUN=SCAN
- program to batch submit all jobs
- extract JESJCL from SDSF.
- wola!

Will post up my final solution when I get round to writing it. Wink
Back to top
View user's profile Send private message
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Wed Jun 03, 2009 3:52 pm    Post subject: Reply with quote

Hi MVS Blob,

I ran your job but I am getting JESJCL in spool instead of dataset...

Can you please let me know what I have to make change to get in dataset.

Thanks,
Chandra.
_________________
Regards,
Chandra
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jun 03, 2009 3:56 pm    Post subject: Reply with quote

chandra,

Use this JCL
Code:

//STEP010 EXEC PGM=IEFBR14                                 
//DD1      DD DSN=CHANDRA.SDSF.OUTPUT,                         
//            DISP=(NEW,CATLG,DELETE),                     
//            UNIT=SYSDA,                                 
//            SPACE=(CYL,(5,5),RLSE),                   
//            DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0,DSORG=PS)
//*                                                       
//STEP020 EXEC PGM=SDSF                                   
//ISFOUT  DD DUMMY                                         
//ISFIN   DD *                                             
OWNER **                                                   
PREFIX JOBNAME
H                                                         
FIND JOBNAME                                               
++S                                                       
PRINT ODSN 'CHANDRA.SDSF.OUTPUT'                               
PRINT                                                     
PRINT CLOSE                                               
END                                                       
//*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Wed Jun 03, 2009 9:58 pm    Post subject: Reply with quote

Hi Kolusu,

You JCL is working perfectly. Thank you.

I have made little modification to copy only JESJCL as follows

Code:

//DD1      DD DSN=CHANDRA.SDSF.OUTPUT,
//            DISP=(OLD,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(5,5),RLSE),
//            DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0,DSORG=PS)
//*
//STEP020 EXEC PGM=SDSF
//ISFOUT  DD DUMMY
//ISFIN   DD *
OWNER **
PREFIX JOBNAME
H
FIND JOBNAME
++?
FIND JESJCL
++S
PRINT ODSN 'TEST.CHANDRA.SDSF.OUTPUT'
PRINT
PRINT CLOSE
END
//*

_________________
Regards,
Chandra
Back to top
View user's profile Send private message
semigeezer
Supermod


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

PostPosted: Thu Jun 04, 2009 10:26 am    Post subject: Reply with quote

I'm glad you got a good result because anyone who would say "wola!" deserves to have a good day Smile
_________________
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
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Wed Jun 10, 2009 11:11 pm    Post subject: Reply with quote

MVS_blob,

1> The solution which Ram gave (ASG-JOB/SCAN) ie., which uses JSCAN you can submit the batch job directly and get the all outputs into a PDS in one single step. It works as I tried it earlier.

2> what scheduler do you use in your shop?
If its CA7, then you can give the prodcution file name using LDSN option and
LDSN,DSN=MY.PROD.FILE,LIST=ALL and it will show you all the JCL's using that file.

3> If you have DOCUTEXT (Which SCLM uses) installed, you can use the Option 2. ONLINE XREF Query and get the desired result.

Hope this helps..
Back to top
View user's profile Send private message
MVS_blob
Beginner


Joined: 23 Oct 2007
Posts: 23
Topics: 9

PostPosted: Tue Jun 16, 2009 9:14 am    Post subject: Reply with quote

Ravi,

Unfortunately, my workplace doesn't offer any of the above... Sad Looks like i'll have to write my own.
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 -> Job Control Language(JCL) 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