Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
abin wrote:
[...]
Does any one know if there is a method to achieve this using SYNCSORT.
Probably somebody knows.
Why do you want to split them? If they are created programatically, why can't they be written seperately/consecutively there? Or why not just create the dataset references and wrap the other stuff around? If they are manually created, why not just do a split? The more you can explain, the better the solutions you may receive.
Off-topic but, if you transfer a .gz doing EBCDIC-to-ASCII conversion, as you are with the fourth dataset, you're going to pickle it.
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
Seems like there are a few options:
- you could just sequentially number the input records, then create each output dataset by including those particular record count numbers.
- seems like a good place to use an IFTHEN=(WHEN=GROUP construct, where you could create groups based on the occurence of the SENDSITE command, the next group on the occurence of each BINARY command, and the last on the CLOSE command. Then, include the relevant group id's for the output.
Off-topic but, if you transfer a .gz doing EBCDIC-to-ASCII conversion, as you are with the fourth dataset, you're going to pickle it.
It was a typo from my end, fourth data set is actually not a zip file.
Option Kevin and Xavier provided works perfectly. Now I need to play around a little, because that datetime stamp on my file "WWW_EEE_NNN_BBBB_20120104025016.DAT.GZ" is not a static value. Instead, I need to change it with current date time stamp.
for example my input will have "WWW_EEE_NNN_BBBB_YYYYMMDDHHMMSS.DAT.GZ" and o/p should be "WWW_EEE_NNN_BBBB_20120104025016.DAT.GZ",given 20120104025016 is the current date time stamp.
I know this option will help me to get the required result.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
You can see how the following goes in place of your OUTREC. It identifies the data to be changed by the five blanks at the start of the line. Doesn't bother actually changing anything, just drops in the date and time.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Quote:
Looks like my site documentation is not updated with latest syncsort doc.
Then you (or someone in your local system support group) needs to ask Syncsort Support for the documentation that is for your release of the product. . .
How did the question move from CHANGE to PUSH?
Is there a new issue? Has the actual requirement been described or are we shooting at a moving target?
Intiall requirement was satisfied. I added a new requirement to get current date time and I was trying to get this done by CHANGE sub parameter in OUTREC.