copy data from a pds to 3 pds



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

copy data from a pds to 3 pds

Postby maxcc » Thu Jul 29, 2010 4:16 pm

How can we copy data from a pds which has 30 records to 3 pds all having equal 10 records?
maxcc
 
Posts: 28
Joined: Fri Apr 30, 2010 12:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copy data from a pds to 3 pds

 

Re: copy data from a pds to 3 pds

Postby expat » Thu Jul 29, 2010 4:23 pm

Huh, I think that you need to explain in a lot more detail to be able to get any help here
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: copy data from a pds to 3 pds

Postby NicC » Thu Jul 29, 2010 4:39 pm

You need to read up on file types - PDS (partitioned Data Set (a library)), PS (physical sequential (also known as a sequential or flat file)), VSAM (Virtual Storage Access Method) and others.

I think you mean you want to split a sequential file into multiple files - I suggest you google for DFSort Tricks and read the examples that specify how to do this.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: copy data from a pds to 3 pds

Postby smita257 » Thu Jul 29, 2010 5:02 pm

I think , you can use sort technique, with skiprec(skiprecord) and stopaft(stopafter) options.
Thanks.
smita257
 
Posts: 13
Joined: Mon Jul 19, 2010 2:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copy data from a pds to 3 pds

Postby dick scherrer » Fri Jul 30, 2010 4:32 am

Hello,

Sort will not help "splitting a pds". . .
How can we copy data from a pds which has 30 records to 3 pds all having equal 10 records?
A pds does not directly have records. . . A pds contains members that may contain records or be empty.

What exactly are you asking?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: copy data from a pds to 3 pds

Postby maxcc » Sun Aug 01, 2010 4:34 pm

Sorry It is from 1 PS to 3 PS and I will try with skiprec(skiprecord) and stopaft(stopafter) options. it should work.
maxcc
 
Posts: 28
Joined: Fri Apr 30, 2010 12:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copy data from a pds to 3 pds

Postby steve-myers » Sun Aug 01, 2010 5:56 pm

I have to admit when I first read this I took it to mean one PDS member, which is roughly equivalent to a sequential data set to 3 PDS members, which are roughly equivalent to 3 sequential data sets.

One thing you do not want to do is try to create the 3 members into 1 data set in one step at the same time using JCL. This will not work! You want to do something like -
//A       EXEC ---
//INPUT    DD  DISP=SHR,DSN=INPUT(MEMBER1)
//OUTPUT1  DD  DISP=(NEW,PASS),UNIT=SYSDA,SPACE=(...)
//OUTPUT2  DD  DISP=(NEW,PASS),UNIT=SYSDA,SPACE=(...)
//OUTPUT3  DD  DISP=(NEW,PASS),UNIT=SYSDA,SPACE=(...)
//B       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT1   DD  DISP=OLD,DSN=*.A.OUTPUT1
//SYSUT2   DD  DISP=OLD,DSN=OUTPUT(MEMBER1)
//C       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT1   DD  DISP=OLD,DSN=*.A.OUTPUT2
//SYSUT2   DD  DISP=OLD,DSN=OUTPUT(MEMBER2)
//D       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT1   DD  DISP=OLD,DSN=*.A.OUTPUT3
//SYSUT2   DD  DISP=OLD,DSN=OUTPUT(MEMBER3)
I suspect this is much less elegant than what you were thinking, but this skeleton will actually work!
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: copy data from a pds to 3 pds

Postby dick scherrer » Mon Aug 02, 2010 10:31 am

Hello,

If you are splitting one sequential file (either a ps or a member of a pds) and you are creating 3 separate ps files and you want to use your sort product, you can do as you mention with skiprec and stopaft.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: copy data from a pds to 3 pds

Postby NicC » Mon Aug 02, 2010 11:24 am

You can also use SPLIT or SPLITBY or SPLIT1R - see the section '5 Ways To Split a Dataset' in the aforementioned DFSort tricks.pdf
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: copy data from a pds to 3 pds

Postby maxcc » Wed Aug 04, 2010 11:56 pm

Thankyou all!
maxcc
 
Posts: 28
Joined: Fri Apr 30, 2010 12:50 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post