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: 1756
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: 271
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: 271
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: 1651
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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