Page 2 of 2

Re: merge multiple seq files onto one

PostPosted: Fri Feb 17, 2012 5:06 am
by BillyBoyo
Why don't you forget about the PDS and just write it to a sequential dataset?

Or explain why it has to be a PDS? Is it a PDSE at least?

Re: merge multiple seq files onto one

PostPosted: Fri Feb 17, 2012 5:12 am
by dn2012
Can you please give me example how to write in sequential?

Please see my JCL.

Re: merge multiple seq files onto one

PostPosted: Fri Feb 17, 2012 5:38 am
by BillyBoyo
There must be someone you work with who can tell you this to your site's standards.

It is possible to Allocate a dataset in ISPF. Fill in the holes. Use the dataset name you give it on your DD statements in place of the PDS(MEMBER) stuff.

Re: merge multiple seq files onto one

PostPosted: Fri Feb 17, 2012 6:20 am
by steve-myers
BillyBoyo wrote:A member of a PDS is just a sequential file. You can have as many duplicates as you want. ...

Maybe while doing your testing with bulk data, just use a plain sequential file, not a member.

I'm not quite sure what BillyBoyo means by "duplicates" here. There can be just one member xxx in one PDS or PDSE at a time, though member yyy can have the exact same data as member xxx.

As BillyBoyo says, when you add a member to a PDS it is placed at the end. If the new member replaces an existing member, the old member is removed from the directory and the directory is updated to point to the new member. A PDS "compress" just recovers the space.

As BillyBoyo says, running two jobs in parallel that attempt to add a member to the same PDS is a recipe for disaster, even if the new members have different names. The Linkage Editor and Binder have a method to avoid a disaster. ISPF uses a similar (but different) method. However, regular batch utilities like IEBGENER and IEBCOPY do not use these methods.

Re: merge multiple seq files onto one

PostPosted: Fri Feb 17, 2012 1:02 pm
by BillyBoyo
dn2012 wrote:Thanks

You think it can also load duplicate values.


Thanks Steve. Sorry for not being clear about the "duplicates". TS is using an intermediate dataset which is then repro'd to a KSDS. Getting duplicates on the REPRO due to not being in key sequence. I took the above question to be referring to comments about sequential datasets, as TS knows his KSDS doesn't "load duplicate" values.

At the very least I should have said that with no keys, a sequential file cannot even recognise a "duplicate" so can just take everything you throw at it, subject to conforming to DCB.