Page 1 of 1

separating a string into set of strings for each record

PostPosted: Wed Oct 02, 2013 3:06 am
by gauti
Hi,

:geek:
Requirement:
Sample input:
File A...
78328383.09-01-2013.08-03.2014
457832328383.09-11-2006.08-03.2016
38328.11-06-2011.08-03.2015

Required Output: 17 digit number then a space and then a date and then space and then date .... each record has two dots separating three fields ( number, date 1 and date 2) :roll:
File B...
00000000078328383 09-01-2013 08-03.2014
00000457832328383 09-11-2006 08-03.2016
00000000000038328 11-06-2011 08-03.2015

Thanks

Re: separating a string into set of strings for each record

PostPosted: Wed Oct 02, 2013 3:57 am
by BillyBoyo
Look at PARSE in your SORT manual.Having used PARSE, use an EDIT to format the number. The spaces are easy, the dates, once PARSEd are easy.

Re: separating a string into set of strings for each record

PostPosted: Wed Oct 02, 2013 10:26 pm
by NicC
JCL cannot do this. Tell me which sort product you use and I will move it to the appropriate part of the forum - that is, if you were thinking of using sort.