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
 

 

Format to pipe delimited with variable field length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
pshongal

New User


Joined: 14 Jun 2012
Posts: 70
Location: India

PostPosted: Wed Sep 14, 2016 2:48 pm    Post subject: Format to pipe delimited with variable field length
Reply with quote

Hi,
I have a file (FB). But value in each field can have variable length (like name, address etc). I need a O/P with pipe delimited.

I/P:
Code:

fname1      addr1     city1
fname11    addr11    city11
fname111   addr111  city111


Required O/P:
Code:

fname1|addr1|city1
fname11|addr11|city11
fname111|addr111|city111


Thanks,
PS[/code]
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1714
Location: UK

PostPosted: Wed Sep 14, 2016 3:33 pm    Post subject:
Reply with quote

Quote:
I have a file (FB)

No you do not - you have a data set.
Back to top
View user's profile Send private message
pshongal

New User


Joined: 14 Jun 2012
Posts: 70
Location: India

PostPosted: Wed Sep 14, 2016 3:35 pm    Post subject:
Reply with quote

Yes. Data set
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Sep 14, 2016 4:28 pm    Post subject:
Reply with quote

You have provided very less information to help. What is the Input/Output record format & record length. What could be the maximum length of any field. Your data might have embedded spaces in name/address fields like:
Code:
First Name Last Name ABC ROAD NEW DELHI


Search using key words PARSE, BUILD, SHIFT, SQZ. You will find many examples to start with.
Back to top
View user's profile Send private message
pshongal

New User


Joined: 14 Jun 2012
Posts: 70
Location: India

PostPosted: Wed Sep 14, 2016 4:37 pm    Post subject:
Reply with quote

Hi,
Here is some more information.

I/P & O/P record format is "FB"
record length is 310 bites

Code:

Field                  Max length
First name         30
Address            250
City                  30
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Sep 14, 2016 4:57 pm    Post subject:
Reply with quote

So the Address filed will always start at col 31 and City will always start from col 281?

Name/Address/City fields can have spaces in them?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Wed Sep 14, 2016 5:48 pm    Post subject:
Reply with quote

It is as simple as making a tea. You would have to search on what Mistah suggested and TRY and next time try to provide the least minimal information to the problem together when you post than feeding a piece meal.
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 1 Tue Dec 06, 2016 8:04 pm
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 SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm


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