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
 
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: 94
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: 2100
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: 94
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: 310
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: 94
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: 310
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: 2037
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 Confusion regarding length of SQLCA v... Vivek0410 DB2 1 Thu Oct 18, 2018 2:20 pm
No new posts Replace comp-3 field value to comp-3 ... dharmaraok DFSORT/ICETOOL 5 Fri Sep 14, 2018 3:46 pm
No new posts Extra data in overlay field speermb DFSORT/ICETOOL 2 Thu Sep 13, 2018 6:04 pm
No new posts RPG II Problem with unsigned Packed d... Andi1982 All Other Mainframe Topics 6 Tue Sep 11, 2018 6:11 pm
No new posts Formating of Amount field in CLIST be... Anil Kumar Prajapati CLIST & REXX 9 Fri Aug 03, 2018 6:34 pm

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