New To JCL- Please help



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

New To JCL- Please help

Postby plantronics007 » Wed Oct 18, 2017 6:55 pm

Hi,

I was wondering if it is possible to write a job where I have a list of dataset names and I would like to search up for it in CA-7 and my cross reference. The list is long and the task is very tedious. Is it possible to create an output where it will tell me which dsns have not been found in both and vice versa.

Thanks!
plantronics007
 
Posts: 2
Joined: Wed Oct 18, 2017 6:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: New To JCL- Please help

 

Re: New To JCL- Please help

Postby Robert Sample » Wed Oct 18, 2017 7:03 pm

What do you mean by
I would like to search up for it in CA-7
Are you wanting to know which data sets are triggers for CA-7 jobs?
Are you wanting to know which data sets are used in which CA-7 jobs?
Are you wanting to know something which you have not specified?

CA-7 jobs are stored in a partitioned data set (PDS) so you can use the ISPF search function if you're looking for which jobs use which data sets (although if the data set is stored in a procedure library -- PROCLIB -- then you won't find it by inspecting the CA-7 library). If you want to know something else, you may need to read the CA-7 manual which contains the utilities supported by CA-7. Due to the use of PROCLIB and INCLUDE statements, it can be a non-trivial task to find which jobs use which data sets.
Robert Sample
Global moderator
 
Posts: 3363
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 221 times

Re: New To JCL- Please help

Postby plantronics007 » Wed Oct 18, 2017 7:58 pm

Robert Sample wrote:What do you mean by
I would like to search up for it in CA-7
Are you wanting to know which data sets are triggers for CA-7 jobs?
Are you wanting to know which data sets are used in which CA-7 jobs?
Are you wanting to know something which you have not specified?

CA-7 jobs are stored in a partitioned data set (PDS) so you can use the ISPF search function if you're looking for which jobs use which data sets (although if the data set is stored in a procedure library -- PROCLIB -- then you won't find it by inspecting the CA-7 library). If you want to know something else, you may need to read the CA-7 manual which contains the utilities supported by CA-7. Due to the use of PROCLIB and INCLUDE statements, it can be a non-trivial task to find which jobs use which data sets.


Thanks for replying. I would like to know which jobs use a particular DSN. Right now, I would like to know if a particular DSN is in cr and/or if it is used by a job . The list of dsns im looking into right now have alot of dsns that are not in either and that is fine. I was just wondering if it is possible to write a job that will look at a huge list for me and note which dsns are not in either because it can cut my work load by a huge chunk

Thanks!
plantronics007
 
Posts: 2
Joined: Wed Oct 18, 2017 6:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: New To JCL- Please help

Postby steve-myers » Wed Oct 18, 2017 8:35 pm

I don't know CA-7, but I rather doubt it maintains a data base of which jobs use specific data sets. All it will have is knowledge of data sets that, by their existence, can trigger a specific job.

It is extremely difficult for a program - CA-7, for example - to examine JCL and determine the data sets used by the JCL. Consider this JCL, and it is by no means complex.
//PCHECKS JOB (...
//      JCLLIB ORDER=(PROD.PROCLIB)
//STEP001 EXEC PRODPROC,LEVEL='01',YEAR=2017,START='450921'

and this member in PROD.PROCLIB.
//PRODPROC PROC LEVEL='?',START='?',YEAR='2017'
//COPY    EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=SHR,DSN=FTP.PAYROLL.INPUT
//SYSUT2   DD  DISP=(,CATLG),UNIT=STSDA,SPACE=(CYL,(20,5),RLSE),
//             DSN=PROD.PAYROLL.Y&YEAR...WEEK&LEVEL.(+1)
//SYSIN    DD  DUMMY
//GENCHKS EXEC PGM=CHECKS,PARM='&START'
//CHECKS   DD  SYSOUT=(P,,CHKX)
//INPUT    DD  DISP=OLD,DSN=*.COPY.SYSUT2

FTP.PAYROLL.INPUT is pretty simple, but PROD.PAYROLL.Y&YEAR..WEEK&LEVEL.(+1) has the substitutions, and the GDG, so the data set is not really resolved until the job runs.

The trigger data set is FTP.PAYROLL.INPUT.
steve-myers
Global moderator
 
Posts: 1875
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 193 times

Re: New To JCL- Please help

Postby Robert Sample » Wed Oct 18, 2017 8:38 pm

It is not that unusual for a production job to look like:
//JOBNAME JOB ....
//        EXEC PROCNAME
//
Looking at the source, there are no data sets used by this job. HOWEVER, if you look at PROCNAME in the appropriate PROCLIB (which, by the way, could be system library or a CA-7 library), you see that PROCNAME expands to 17 steps with an average of 12 data sets per step or a total of 204 (or so) data sets being used by the job.
Robert Sample
Global moderator
 
Posts: 3363
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 221 times


Return to JCL