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
 
Split into Multiple records based on delimiter

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

Active Member


Joined: 01 Dec 2006
Posts: 695
Location: Pennsylvania

PostPosted: Wed Mar 11, 2015 8:41 pm    Post subject: Split into Multiple records based on delimiter
Reply with quote

I have an input file which has multiple (virtual) records on each line.

I need to break each line into multiple lines each time the character '!' is found.

The number of occurrences on each line varies, and is unknown.

The input file is VB 23400. A sample record is here:
Code:
!LINE1   DATA1  !LINE2    DATA2!LINE3DATA3!LINE4 DATA4


The output file is VBM 32756. A sample is here:
Code:
!LINE1   DATA1
!LINE2    DATA2
!LINE3DATA3
!LINE4 DATA4


The process currently uses a Rexx exec provided by the vendor.

This is fine for small files, but larger ones (98,000 input to 9 million output), it runs for longer than desired.

I was looking for a Syncsort solution, but have not been able to create or find one.

Any help would be appreciated.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Wed Mar 11, 2015 10:31 pm    Post subject: Reply to: Split into Multiple records based on delimiter
Reply with quote

Is there a maximum number of virtual lines? What is the maximum length?

If not more than 100, then PARSE with "blank record" dropping for the ones which aren't there for any given record.

There are some recent examples of similar things for fixed-length records. May be able to fix the lengths (OVERLAY=(23401:X), use SyncTool's RESIZE and work on that. It would be multiple passes of the data, and with "blank record" dropping, but it may work out.

There's always COBOL...
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Wed Mar 11, 2015 10:49 pm    Post subject: Reply to: Split into Multiple records based on delimiter
Reply with quote

For instance, here, which contains two links as well. I see now that there is a query on the output from that...
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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm

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