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: 95
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: 2188
Location: Hampshire, 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: 95
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: 95
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: 2174
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 Having problem passing a variable to ... markzasz JCL & VSAM 12 Thu Jul 11, 2019 5:31 pm
No new posts position, start pos, length of column... juares castro SYNCSORT 14 Fri Jun 21, 2019 8:47 pm
No new posts SECTION BASED ON FIELD speermb DFSORT/ICETOOL 10 Mon Jun 17, 2019 9:41 pm
No new posts Converting a copybook value into Json... srikant314 COBOL Programming 1 Mon Jun 03, 2019 11:17 am
No new posts Send text at cursor position on an IS... Domenic Ailati CLIST & REXX 10 Sun Jun 02, 2019 7:34 am

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