View previous topic :: View next topic
|
Author |
Message |
sureshmurali Warnings : 1 New User
Joined: 25 Nov 2010 Posts: 70 Location: Sivakasi, India
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
You cannot, SuperC is not clairvoyant-enabled. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Best you can get is if you can get 2-3 lines before and after the match. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
how do you identify the start or end of a sentence ?
Gerry |
|
Back to top |
|
|
sureshmurali Warnings : 1 New User
Joined: 25 Nov 2010 Posts: 70 Location: Sivakasi, India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
|