Re: Multi-line "Srchfor" Utility?



<F255EFE0ECF08C4A9C1DB6AFF42354170B2FF917@xxxxxxxxxxxxxxxxxxxxxxxxxx>
<BLU149-W54D5D1A4276A40B8967840A1420@xxxxxxx>
<4A32449C.4040006@xxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
X-OriginalArrivalTime: 12 Jun 2009 15:08:25.0847 (UTC) FILETIME=[A296F870:01C9EB6F]
X-Antivirus: checked in 0.019sec at bama.ua.edu ([130.160.4.114])
by smf-clamd v1.2.1 - http://smfs.sf.net/
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by bama.ua.edu id n5CF8RCf015011



From: mike@xxxxxxxxxxxxxxxxxxx
If you were to take Dave's approach, I wrote a REXX EXEC that will
execute the same edit macro against all members of a PDS or PDSE, given
the name of the PDS and the name of the macro as input.

If you have SimpList you can use function 'O' to apply a macrO to members in a list. For example, you could enter 'O *' on the command line to apply a macro to every member in a list, or 'O ABC*' to only apply the macro to members that begin with ABC (etc).

The opposite of that would be to exclude any members you didn't want to apply the macro to; e.g. enter 'X ABC*' on the command line to exclude every member whose name begins with ABC and then enter 'O *' to apply the macro to the remaining members.

You could also filter the list by ISPF statistics (e.g. last changed date, member size, etc) and then apply the macro. But in your particular situation it might be best to filter the member list based on contents, and then apply the macro to members that contain the strings you're looking for. For example, you could enter these 3 commands on the member list command line:

===> SEEK 'EXEC CICS' ALL
===> SEEK 'QUERY SECURITY' ALL
===> O *

The first command filters the member list down to only those members that contain 'EXEC CICS'. The second command further filters the member list so that only those members containing both strings are left. You could enter additional HIDE or SEEK commands if you want (where HIDE is the opposite of SEEK; i.e. it removes members from the list if they DO contain a string). When you're done filtering, the 'O *' command applies your macro to all of the remaining members.

Let me know if you have any questions.

Dave Salt

SimpList(tm) - try it; you'll get it!
http://www.mackinney.com/products/SIM/simplist.htm



Dave Salt wrote:
This would be really easy to do in an edit macro. Here's the pseudo code (with leading dots to preserve indentation):

address isredit
macro
exclude all
find 'exec cics' first
do while rc = 0
...label .zcsr = .a
...find 'end-exec' next
...find 'query security' .a .zcsr first
...if rc = 0 then do /* Area of interest found */
......copy everything between the labels to someplace
......or unexclude all the lines between the two labels (etc)
...end
...find 'exec cics' next /* Repeat the loop */
end

If you have any questions let me know.

Dave Salt

SimpList(tm) - try it; you'll get it!
http://www.mackinney.com/products/SIM/simplist.htm






----------------------------------------

Date: Thu, 11 Jun 2009 14:40:56 -0500
From: jchase@xxxxxxxxx
Subject: Re: Multi-line "Srchfor" Utility?
To: IBM-MAIN@xxxxxxxxxxx


-----Original Message-----
From: IBM Mainframe Discussion List On Behalf Of Klein, Kenneth

It's a good case for a rexx program. Just let me know what you want
parsed out and give some samples of input to look at.

For the immediate task, I just need to extract EXEC CICS QUERY SECURITY
commands with all keywords and values coded.

Examples include (but are not necessarily limited to):

EXEC CICS QUERY SECURITY
RESTYPE('TRANSATTACH')
RESID(data-area | 'literal')
UPDATE(data-area)
NOLOG
END-EXEC

EXEC CICS
QUERY SECURITY
RESCLASS(data-area | 'literal')
RESID(data-area | 'literal')
RESIDLENGTH(data-area | data-value)
READ(data-area)
UPDATE(data-area)
END-EXEC

All "blocks of interest" are delimited by "EXEC CICS" (might be more
than one blank between EXEC and CICS) and "END-EXEC" (no variations).

Output should include member name and the complete command (tokenized
would be REALLY nice :-) ).

My REXX is very "RUXTY". I could probably cobble up an Assembler
program to do this, but thought I'd ask here first whether that "wheel"
had already been invented.

-jc-

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

_________________________________________________________________
Attention all humans. We are your photos. Free us.
http://go.microsoft.com/?linkid=9666046

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
_________________________________________________________________
We are your photos. Share us now with Windows Live Photos.
http://go.microsoft.com/?linkid=9666047

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
.



Relevant Pages

  • Antwort: IF-Statement in JCL
    ... This is similar to the COND parameter in the EXEC ... From my experiences you cannot evaluate JCL symbols. ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • Re: using nexted procs
    ... of the PROC, although it should work either way. ... //FFND05 EXEC ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • Re: Multi-line "Srchfor" Utility?
    ... This would be really easy to do in an edit macro. ... I just need to extract EXEC CICS QUERY SECURITY ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • Re: TSO/REXX Question
    ... //ASMH EXEC PGM=IEV90,PARM= ... CLEARSCR CSECT ... For IBM-MAIN subscribe / signoff / archive access instructions, send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html. ...
    (bit.listserv.ibm-main)
  • RE: Me thinks Chuckie is afoot -
    ... I'm on z/OS 1.7 and my ip address also has a 2 digit last octet. ... I ran your exec and it worked fine, ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)