Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Removing Delimeter using DFSORT/ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Removing Delimeter using DFSORT/ICETOOL
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    Post subject: Reply to: Removing Delimeter using DFSORT/ICETOOL
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Oct 16, 2012 11:47 am    Post subject: Reply to: Removing Delimeter using DFSORT/ICETOOL
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    Post subject:
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Tue Oct 16, 2012 3:38 pm    Post subject: Reply to: Removing Delimeter using DFSORT/ICETOOL
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

Site Director


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

PostPosted: Tue Oct 16, 2012 7:21 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us