IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Removing Delimeter using DFSORT/ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Nitin Bhargava

New User


Joined: 22 May 2012
Posts: 32
Location: india

PostPosted: Tue Oct 16, 2012 11:41 am
Reply with quote

Hi,

I am having following record in my input file;
Code:
KEY       FN      LN       DOB
100000100,JOSEPH,GORGE,28031984
200000200,WM,KRISTEN,31031984


In output, i have to remove "," in such a way that the KEY should start from position 1, FN(first name) should start from 11th position, LN (last name) from 31 position and DOB from 61 position.

Output will look like as follows:
Code:
100000100 JOSEPH                        GORGE                     28031984
200000200 WM                            KRISTEN                   31031984


I tried with FINDREP option but the output record is not in sync.

Regards
Nitin Bhargava
Back to top
View user's profile Send private message
Nitin Bhargava

New User


Joined: 22 May 2012
Posts: 32
Location: india

PostPosted: Tue Oct 16, 2012 11:43 am
Reply with quote

Forgot to mention:

Lenght of the file is 1000, its a FB.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Oct 16, 2012 11:47 am
Reply with quote

You should have a look at some of the many examples of PARSE in for forum.
Back to top
View user's profile Send private message
ezio vin

New User


Joined: 16 Aug 2012
Posts: 44
Location: india

PostPosted: Tue Oct 16, 2012 1:28 pm
Reply with quote

As BILL specified using PARSE function you can accomplish your requirement.

change this following code as you need


Code:
//**********************************************
//MERGE   EXEC PGM=SORT                         
//**********************************************
//SYSOUT  DD SYSOUT=*                           
//SORTIN  DD *                                 
100000100,JOSEPH,GORGE,28031984                 
200000200,WM,KRISTEN,31031984                   
//SORTOUT DD SYSOUT=*                           
//SYSIN   DD *                                 
  SORT FIELDS=COPY                             
  OUTREC PARSE=(%01=(ENDBEFR=C',',FIXLEN=9),   
  %02=(ENDBEFR=C',',FIXLEN=6),                 
  %03=(ENDBEFR=C',',FIXLEN=7),                 
  %04=(FIXLEN=9)),                             
  BUILD=(%01,12:%02,20:%03,30:%04)             


output

Code:
********************************* TOP OF DATA **
100000100  JOSEPH  GORGE     28031984           
200000200  WM      KRISTEN   31031984           
******************************** BOTTOM OF DATA
Back to top
View user's profile Send private message
Nitin Bhargava

New User


Joined: 22 May 2012
Posts: 32
Location: india

PostPosted: Tue Oct 16, 2012 1:46 pm
Reply with quote

Thanks Bill and ezio....its done
Back to top
View user's profile Send private message
srinivasulu.p

New User


Joined: 10 Jul 2012
Posts: 22
Location: india

PostPosted: Tue Oct 16, 2012 3:15 pm
Reply with quote

Nitin Bhargava wrote:
Thanks Bill and ezio....its done


is that above code is working?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Oct 16, 2012 3:38 pm
Reply with quote

Why do you want to know? Did you try it? Working in what way? ezio provided it as an example, I suspect, not for a particular task stated here?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Oct 16, 2012 7:21 pm
Reply with quote

Hello,

Quote:
is that above code is working?
Looks like you did not read the reply 1.5 hours before yours . . .

When someone posts "thanks" and "its done", they are confirming that the code is working . . .

Think how easy it would be to run your own little test icon_confused.gif
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DFSORT Join Keys Controlcard DFSORT/ICETOOL 4
No new posts Denomination counts by using PARSE in... DFSORT/ICETOOL 8
No new posts Date format correction using dfsort DFSORT/ICETOOL 3
No new posts ICETOOL to SUM String DFSORT/ICETOOL 1
No new posts DFSORT GUID DFSORT/ICETOOL 5
Search our Forums:


Back to Top