Page 1 of 1

Splitting a PDS.

PostPosted: Mon Aug 17, 2009 9:31 pm
by samrat189
Hi guyz,
I hav batch to run on 1000 membs in a pds , i can't give main pds as input to the job as it takes lot of time.. so planned to run tht job 10 times with 10 diff pds. So how do i split the main pds into a 10 childs with a batch job?

Re: Splitting a PDS.

PostPosted: Tue Aug 18, 2009 12:42 am
by MrSpock
Well, I guess I would:

1. Create a member list of all of the member names of the source PDS:
//STEP0001 EXEC PGM=IKJEFT01                       
//SYSTSPRT DD   DSN=&&T1,DISP=(,PASS),UNIT=VIO     
//SYSTSIN  DD   *                                   
  LISTDS 'THE.PDS' MEMBERS                 
/*


2. Run DFSORT to split the list into 10 IEBCOPY-ready parts:
//STEP0002 EXEC PGM=ICEMAN                                   
//SORTIN   DD   DSN=&&T1,DISP=(OLD,DELETE)                   
//O1       DD   DSN=&&O1,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O2       DD   DSN=&&O2,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O3       DD   DSN=&&O3,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O4       DD   DSN=&&O4,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O5       DD   DSN=&&O5,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O6       DD   DSN=&&O6,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O7       DD   DSN=&&O7,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O8       DD   DSN=&&O8,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O9       DD   DSN=&&O9,DISP=(,PASS),UNIT=SYSDA,             
//         SPACE=(CYL,(1,1),RLSE)                             
//O10      DD   DSN=&&O10,DISP=(,PASS),UNIT=SYSDA,           
//         SPACE=(CYL,(1,1),RLSE)                             
//SYSOUT   DD   SYSOUT=*                                     
//SYSIN    DD   *                                             
  OPTION COPY                                                 
  OUTFIL OUTREC=(1:C' S M=',8,8,80:X),CONVERT,STARTREC=10,   
    SPLIT1R=100,INCLUDE=(5,2,CH,EQ,C' '),                     
    FNAMES=(O1,O2,O3,O4,O5,O6,O7,O8,O9,O10)                   
/*                                                           


3. Run my IEBCOPY with the SORT output:
//STEP0003 EXEC PGM=IEBCOPY                           
//PDS      DD   DISP=SHR,DSN=THE.PDS
//PDS1     DD   DSN=&&PDS1,DISP=(,PASS),UNIT=SYSDA,   
//         SPACE=(CYL,(100,100,100),RLSE)             
//PDS2     DD   DSN=&&PDS2,DISP=(,PASS),UNIT=SYSDA,   
//         SPACE=(CYL,(100,100,100),RLSE)             
//PDS3     DD   DSN=&&PDS3,DISP=(,PASS),UNIT=SYSDA,   
//         SPACE=(CYL,(100,100,100),RLSE)             
...
//PDS10    DD   DSN=&&PDS10,DISP=(,PASS),UNIT=SYSDA,   
//         SPACE=(CYL,(100,100,100),RLSE)
//SYSPRINT DD   SYSOUT=*                               
//SYSIN    DD   *                                     
  COPY OUTDD=PDS1,INDD=PDS                             
/*                                                     
//         DD   DSN=&&O1,DISP=(OLD,DELETE),UNIT=SYSDA 
//         DD   *                                     
  COPY OUTDD=PDS2,INDD=PDS                             
/*                                                     
//         DD   DSN=&&O2,DISP=(OLD,DELETE),UNIT=SYSDA 
//         DD   *                                     
  COPY OUTDD=PDS3,INDD=PDS                             
/*                                                     
//         DD   DSN=&&O3,DISP=(OLD,DELETE),UNIT=SYSDA 
...
//*                                                   

Re: Splitting a PDS.

PostPosted: Tue Aug 18, 2009 2:40 am
by samrat189
WoW!!!!!
wat a detailed explanation... :)
hey MrSpock u rock dude..

Re: Splitting a PDS.

PostPosted: Tue Aug 18, 2009 11:17 am
by expat
What does you batch job do to the PDS ?

It may be easier to know what and how you do something to a dataset to determine if the method rather than the dataset is the problem.

Re: Splitting a PDS.

PostPosted: Tue Aug 18, 2009 12:48 pm
by samrat189
My pds contains jcl s and i need to validate the syntax(jck) for all the jcls. I hav batch job which takes a pds as input and does the operaion (jclchk) on all the mems nd write the results to a ps.. so if i give a pds with 1000 mems its takin a lot time so tht of splitting in to small pds..

Any othr solution?

Re: Splitting a PDS.

PostPosted: Tue Aug 18, 2009 2:38 pm
by expat
It is going to take the same amount of time with one pds as it will with multiple pds, as the amount of processing will be the same. In fact due to the splitting and more job initiations, the total time will be longer if anything.

If the batch job causes contention problems, just copy the original pds and then let the job run against the copy version. This may be faster as there will be no contention from any other users.

Re: Splitting a PDS.

PostPosted: Tue Aug 18, 2009 8:58 pm
by samrat189
Yeah, In terms of Time,spliting and running might take a bit more than in single executin. but here in my loc long running jobs requires spl permission... so i hav to avoid tht .