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
 

 

Delimited file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dharmaraok

New User


Joined: 10 Mar 2011
Posts: 30
Location: india

PostPosted: Fri Mar 13, 2015 5:12 pm    Post subject: Delimited file
Reply with quote

Hi all,

I am having the below input file having delimited by ",".

Code:
Field -1 --> Name
Field -2 --> city
Field -3 --> street no
Field -4 --> road no


Code:
raju,madras,street no-10,mainroad-10


I have used sort card with delimited option

the data I got is

Code:
Raju  madras street no-10 maonroad-10


But the data comes in the below format , there is no street no.

Code:
raju,madras,,mainroad-10


my sort card is not working; i am getting the output like

Code:
Raju  madras              maonroad-10


BUt i need output like, spaces should be populated in the 3rd field.
Code:

Raju  madras                      maonroad-10


Could uou please let me know how can we do it.

Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7281

PostPosted: Fri Mar 13, 2015 6:15 pm    Post subject: Reply to: Delimited file
Reply with quote

You need to show the code that is failing. Also please used the Code tags to preserve formatting.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1641
Location: NY,USA

PostPosted: Fri Mar 13, 2015 9:49 pm    Post subject:
Reply with quote

Very much confusing!!
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10219
Location: italy

PostPosted: Fri Mar 13, 2015 11:23 pm    Post subject: Reply to: Delimited file
Reply with quote

Quote:
my sort card is not working;

how in heaven are we supposed to provide help with the useless info You provided

post the sort control statements using the code tags
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 338
Location: USA

PostPosted: Fri Mar 13, 2015 11:25 pm    Post subject: Reply to: Delimited file
Reply with quote

I believe you need the help of PARSE operand of SORT.

If your input data looks like this:
Code:
//SORTIN DD *               
 ABC,XYZ,STREET10,MAINROAD10
 ABC,XYZ,,MAINROAD10         


And you need output like this:

Code:
 ABC XYZ  STREET10  MAINROAD10   
 ABC XYZ            MAINROAD10   


Then you may want to use PARSE and build a SYSIN card like this:
Code:
 OPTION COPY   
 OUTREC PARSE=(%01=(ENDBEFR=C',',FIXLEN=5), 
               %02=(ENDBEFR=C',',FIXLEN=5), 
               %03=(ENDBEFR=C',',FIXLEN=10),
               %04=(ENDBEFR=C',',FIXLEN=10)),
 BUILD=(%01,%02,%03,%04)                     
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 Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm


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