separating a string into set of strings for each record



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

separating a string into set of strings for each record

Postby gauti » Wed Oct 02, 2013 3:06 am

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
gauti
 
Posts: 1
Joined: Wed Oct 02, 2013 2:52 am
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby BillyBoyo » Wed Oct 02, 2013 3:57 am

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

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

Postby NicC » Wed Oct 02, 2013 10:26 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post