IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Combine groups of lines in one line


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
knobi

New User


Joined: 16 Aug 2005
Posts: 54

PostPosted: Fri Jun 20, 2014 3:43 am
Reply with quote

hello, would be possible to this with sort ?

Basically, retrieve only the groups of 4 lines and merge the lines one after the other.

Input:
Code:

lines...before/after
cccc blablabla
    zzzz blabla
    yyyy blabla
    aaaa blabla
    bbbb blabla
lines...before/after
cccc blablabla
    zzzz blabla
    yyyy blabla
    aaaa blabla
    bbbb blabla
lines...before/after


Code:

cccc blablabla     zzzz blabla    yyyy blabla    aaaa blabla    bbbb blabla
cccc blablabla     zzzz blabla    yyyy blabla    aaaa blabla    bbbb blabla
Back to top
View user's profile Send private message
knobi

New User


Joined: 16 Aug 2005
Posts: 54

PostPosted: Fri Jun 20, 2014 5:27 am
Reply with quote

small correction.. this are 5 lines groups...
and the second piece of code, from the above post is how would be the output.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jun 20, 2014 5:49 am
Reply with quote

Yes, if you can identify them sufficiently.

Look at ICETOOL's RESIZE operator. OMIT COND= for the stuff you don't want (or INCLUDE COND= for the stuff you want) in a USING which also includes an OUTFIL for your final processing.

Search for RESIZE examples. If you get stuck, show us what you've done and we should be able to move you on with it.
Back to top
View user's profile Send private message
knobi

New User


Joined: 16 Aug 2005
Posts: 54

PostPosted: Fri Jun 20, 2014 5:52 am
Reply with quote

i was trying to fit the code below on my jcl.. but not too much lucky so far...
any advise would be great

INREC IFTHEN=(WHEN=INIT,

OVERLAY=(134:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(2,7,CH,EQ,C'WARNING'),
OVERLAY=(142:SEQNUM,8,ZD,
134:134,8,ZD,SUB,142,8,ZD,M11,LENGTH=8)),


IFTHEN=(WHEN=NONE,
OVERLAY=(134:SEQNUM,8,ZD))
Back to top
View user's profile Send private message
knobi

New User


Joined: 16 Aug 2005
Posts: 54

PostPosted: Fri Jun 20, 2014 6:08 am
Reply with quote

i'm little behind on icetool... wasn't aware of resize... worked pretty good !
thanks !
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jun 20, 2014 11:26 am
Reply with quote

Well, at just 19 minutes after my suggestion, you're catching up fast. Good work.

If you can post your solution, it may help others with a similar requirement.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
No new posts Copy few lines from SYSOUT of 10 mill... All Other Mainframe Topics 5
Search our Forums:

Back to Top