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: 7226

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: 1609
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: 10202
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: 331
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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