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

comma delimited file with multiple records in one line


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

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Wed Mar 26, 2008 7:39 am
Reply with quote

Hi,

I am having input file which is a comma delimited. Same file can have multiple records in one line. I need to separate these records and write into one output file with fixed format. How can we do that?

e.g.

INPUT File :
Field1,field2,feild3 file1,file2,file3 field1,field2,field3 field1,
field2,field3

Note that 2 records are not separated by comma but they are separated by space.

I want output file in below mentioned format :

field1 field2 field3
field1 field2 field3
field1 field2 field3

Here output files lay out is fixed .

e.g. Field1 1-10
field2 12-20
field3 21-30

Can anyone help me to achieve this using sort.

Regards,
Umed
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 194
Location: India

PostPosted: Wed Mar 26, 2008 10:58 am
Reply with quote

I am looking for similar requirement but only comma some thing like CSV file as input.

I got as SORT can achieve this using OUTFIL PARSE statements but still working on it.

Please try and let me know if you do..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 26, 2008 8:36 pm
Reply with quote

Umed,

Your description of the requirement is very confusing. It's not clear what variations in the layout of the records you can have (maximum length of a field, maximum number of fields in a record, are there only two records or can there be more, etc). It's not clear how the fields separated by blanks fit in or what you want to do with them. Since you used Field1, Field2 and Field3 multiple times, it's impossible to distinguish between them in the input or output.

Please show an example with non-generic values (e.g. ABCDEF,GHI) and explain the possible variations and the "rules" for dealing with them.

Quote:
Note that 2 records are not separated by comma but they are separated by space.


Huh? Do you mean "2 fields are not separated ..."? There's a big difference between records and fields and when you use incorrect terminology like this, it makes it very difficult to understand what you want.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 26, 2008 8:37 pm
Reply with quote

Srini,

Please start a new topic and explain clearly what it is you want to do.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top