Put data from 21 VSAM files to one flat file.

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
NutanPsk
New Member
Posts: 5
Joined: Wed Apr 15, 2015 4:02 pm

Put data from 21 VSAM files to one flat file.

Post by NutanPsk »

Hi,

I need to copy data of 21 VSAM files to one flat file. Is there some easier way of doing apart from IDCAM REPRO for each file? Please advise.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Put data from 21 VSAM files to one flat file.

Post by William Collins »

What SORT product do you use? Is the order of the data important?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Put data from 21 VSAM files to one flat file.

Post by Robert Sample »

If you're doing this for back up purposes and don't need to access the data in the sequential (which is the proper term for a "flat" file) data set ("file" should only be used in z/OS when referencing Unix System Services files), you could use DF/DSS (ADRDSSU) to create a back up. If you do need to access the data, ADRDSSU is not a good choice as it does not preserve the data format until the back up is restored.
NutanPsk
New Member
Posts: 5
Joined: Wed Apr 15, 2015 4:02 pm

Re: Put data from 21 VSAM files to one flat file.

Post by NutanPsk »

William Collins wrote:What SORT product do you use? Is the order of the data important?


We are using DFSort. I think I am not mistaken when I say this. (How do I verify? )

No the order of data is not important.
Last edited by NutanPsk on Mon Feb 22, 2016 11:50 am, edited 1 time in total.
NutanPsk
New Member
Posts: 5
Joined: Wed Apr 15, 2015 4:02 pm

Re: Put data from 21 VSAM files to one flat file.

Post by NutanPsk »

Robert Sample wrote:If you're doing this for back up purposes and don't need to access the data in the sequential (which is the proper term for a "flat" file) data set ("file" should only be used in z/OS when referencing Unix System Services files), you could use DF/DSS (ADRDSSU) to create a back up. If you do need to access the data, ADRDSSU is not a good choice as it does not preserve the data format until the back up is restored.
Thanks for the reply.

At this moment, we are assuming that this data will not be accessed but it might change in future. We would need the backup in a way which can be accessed by some utility anyways and is not restricted to a specific utility.

Thanks for your explanation on "file" and "flat" file. It took me some time to understand your entire post, after reading what you put in brackets.
NutanPsk
New Member
Posts: 5
Joined: Wed Apr 15, 2015 4:02 pm

Re: Put data from 21 VSAM files to one flat file.

Post by NutanPsk »

NutanPsk wrote:
William Collins wrote:What SORT product do you use? Is the order of the data important?


We are using DFSort. I think I am not mistaken when I say this. (How do I verify? )

No the order of data is not important.


William, if the order of the data is important what challenges I need to face? And why are you asking that?
NutanPsk
New Member
Posts: 5
Joined: Wed Apr 15, 2015 4:02 pm

Re: Put data from 21 VSAM files to one flat file.

Post by NutanPsk »

Robert Sample wrote:If you're doing this for back up purposes and don't need to access the data in the sequential (which is the proper term for a "flat" file) data set ("file" should only be used in z/OS when referencing Unix System Services files), you could use DF/DSS (ADRDSSU) to create a back up. If you do need to access the data, ADRDSSU is not a good choice as it does not preserve the data format until the back up is restored.
I thought ADRDSSU is used by system programmers only. I have not seen any of the programmers using it.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Put data from 21 VSAM files to one flat file.

Post by William Collins »

Code: Select all

  OPTION EQUALS 
  INREC OVERLAY=(81:C'1') 
  MERGE FIELDS=(81,1,CH,A)
  OUTREC BUILD=(1,80)
That's an example with fixed-length 80-byte records. You can't concatenate VSAM datasets (unless you have something specific which can, like SAS), but MERGE takes multiple input datasets, which will be SORTINnn, when nn should be 01, 02, 03 etc through to 21.

If you happen to have a key, you can use that for the FIELDS (and forget the INREC and OUTREC). If you have no key, then you can make one. Making the key value the same and specifying the OPTION EQUALS will get all of SORTIN01 followed by all of SORTIN02 followed by all of SORTIN03 etc through to SORTIN21.

Since you are not concerned about the order, you can leave the EQUALS out.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Put data from 21 VSAM files to one flat file.

Post by enrico-sorichetti »

why not speak to You storage support for the practices in use in Your organisation!
We would need the backup in a way which can be accessed by some utility anyways and is not restricted to a specific utility.
stupid need.

the common practice is that backups are restored by the SAME utility used to create the backup
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Put data from 21 VSAM files to one flat file.

Post by Robert Sample »

I thought ADRDSSU is used by system programmers only. I have not seen any of the programmers using it.
It most commonly is used by system programmers and storage administrators, but your site may have security set to allow application programmers to use it -- ask your site support group.
User avatar
Akatsukami
Global Moderator
Global Moderator
Posts: 122
Joined: Tue Oct 20, 2015 3:20 am
Location: Bloomington, IL
Contact:

Re: Put data from 21 VSAM files to one flat file.

Post by Akatsukami »

NutanPsk wrote:We are using DFSort. I think I am not mistaken when I say this. (How do I verify? )
Look at the messages in SYSOUT. Messages beginning with "ICE" indicate DFSORT, messages beginning with "WER" indicate Syncsort.
"I come to the conclusion that, men loving according to their own will and fearing according to that of the prince, a wise prince should establish himself on that which is in his own control and not in that of others." -- Niccolò Machiavelli
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Put data from 21 VSAM files to one flat file.

Post by Anuj Dhawan »

We are using DFSort. I think I am not mistaken when I say this. (How do I verify? )
In addition to what Akatsukami has said, you can also have a look at these earlier topics. They might interest you:

ICETOOL and ICEMAN in DFSORT - are they same?
PGM=ICEMAN or PGM=SYNCSORT or PGM=DFSORT..confusion...
What is syncsort ?
Is ICEGENER same as Syncgener?
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”