merge multiple seq files onto one



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

Re: merge multiple seq files onto one

Postby BillyBoyo » Fri Feb 17, 2012 5:06 am

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?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Re: merge multiple seq files onto one

 

Re: merge multiple seq files onto one

Postby dn2012 » Fri Feb 17, 2012 5:12 am

Can you please give me example how to write in sequential?

Please see my JCL.
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: merge multiple seq files onto one

Postby BillyBoyo » Fri Feb 17, 2012 5:38 am

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: merge multiple seq files onto one

Postby steve-myers » Fri Feb 17, 2012 6:20 am

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.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: merge multiple seq files onto one

Postby BillyBoyo » Fri Feb 17, 2012 1:02 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post