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
 
comma delimited file with multiple records in one line

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: comma delimited file with multiple records in one line
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: 195
Location: India

PostPosted: Wed Mar 26, 2008 10:58 am    Post subject: Reply to: comma delimited file with multiple records in one
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 Moderator


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

PostPosted: Wed Mar 26, 2008 8:36 pm    Post subject:
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 Moderator


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

PostPosted: Wed Mar 26, 2008 8:37 pm    Post subject:
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    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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am

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