Page 1 of 1

Put data from 21 VSAM files to one flat file.

Posted: Sun Feb 21, 2016 9:34 am
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.

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

Posted: Sun Feb 21, 2016 2:28 pm
by William Collins
What SORT product do you use? Is the order of the data important?

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

Posted: Sun Feb 21, 2016 7:08 pm
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.

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

Posted: Mon Feb 22, 2016 11:44 am
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.

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

Posted: Mon Feb 22, 2016 11:48 am
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.

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

Posted: Mon Feb 22, 2016 12:11 pm
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?

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

Posted: Mon Feb 22, 2016 12:15 pm
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.

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

Posted: Mon Feb 22, 2016 4:20 pm
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.

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

Posted: Mon Feb 22, 2016 4:28 pm
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

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

Posted: Mon Feb 22, 2016 6:37 pm
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.

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

Posted: Mon Feb 22, 2016 8:22 pm
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.

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

Posted: Tue Feb 23, 2016 5:34 pm
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?