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
 

 

3.14 scan with preceding and subsequent lines for a string

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sureshmurali
Warnings : 1

New User


Joined: 25 Nov 2010
Posts: 70
Location: Sivakasi, India

PostPosted: Sat Jan 28, 2012 5:14 pm    Post subject: 3.14 scan with preceding and subsequent lines for a string
Reply with quote

Hi Everyone,

This is a part of COBOL program in a dataset.

Code:
            MOVE WS-B TO WS-A,                 
                      WS-C,                 
                      WS-D.                 
            MOVE B TO WS-D,                 
                      WS-B,                 
                      WS-C.       


I want to do 3.14 or 3.15 search for the string WS-B.
If the string is present in the middle of a sentence, i want to have that complete sentence in my output... no matter how many lines that sentence is splitted up in the code like the move statements above which have three lines each. So for the above part, 3.14 search should produce all 6 lines in the output.
Which PARM can i pass in the Searchfor utility to achieve this ? Could some one can help on this ?
Thanks in advance.
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1027
Location: Oostende, Belgium

PostPosted: Sat Jan 28, 2012 5:22 pm    Post subject:
Reply with quote

You cannot, SuperC is not clairvoyant-enabled.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sat Jan 28, 2012 5:41 pm    Post subject: Reply to: 3.14 scan with preceding and subsequent lines for
Reply with quote

Best you can get is if you can get 2-3 lines before and after the match.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Sun Jan 29, 2012 4:42 am    Post subject:
Reply with quote

Hi,

how do you identify the start or end of a sentence ?


Gerry
Back to top
View user's profile Send private message
sureshmurali
Warnings : 1

New User


Joined: 25 Nov 2010
Posts: 70
Location: Sivakasi, India

PostPosted: Sun Jan 29, 2012 7:53 am    Post subject: Reply to: 3.14 scan with preceding and subsequent lines for
Reply with quote

The begining of a sentence can be identified by a COBOL keyword and its end can be by a full stop. But full stop may not be required and is optional. But its continuation can be tracked by a comma at end of a line or a hyphen at the position 7.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Jan 29, 2012 5:01 pm    Post subject: Reply to: 3.14 scan with preceding and subsequent lines for
Reply with quote

Comma does not inidicate a continuatipon. The "-" is not "necessary" unless continuing a literal and can be avoided.

Why you'd expect a comparison product to be able to emulate compilers, I don't know.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1232
Location: Israel

PostPosted: Sun Jan 29, 2012 8:53 pm    Post subject: Reply to: 3.14 scan with preceding and subsequent lines for
Reply with quote

By default, SuperC will print only the lines where the string was found.

If you specify the process option LPSF, it will list 6 lines before and 6 lines after.
If you want more (or less) lines, you can use the process statement LPSFV followed by the number of lines you want to see (between 1 and 50).

These are the only possibilities.
And they are available only in 3.15, not in 3.14
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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