Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 31
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: 7315

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: 1806
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: 10327
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: 401
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us