This reminds of y2k days. You can use SRCHFOR and create a output. Then run a rexx or syncsort to identify necessary query on the second iteration.
//SEARCH EXEC PGM=ISRSUPC, // PARM=(SRCHCMP, // 'COBOL DPPLCMT DPCBCMT IDPFX LPSF NOPRTCC') //NEWDD DD DSN=NMOHAN.PGMS, // DISP=SHR //OUTDD DD SYSOUT=(A) //SYSIN DD * SRCHFOR 'EXEC*CICS' STCHFOR 'CICS' SRCHFOR 'EXEC' LPSFV 10 This should produce an output with 10 lines prior and after the exec statement (it could be anything from 1-50). Then use the output produced to further refine. Natarajan >>> "Chase, John" <jch...@ussco.com> 6/11/2009 12:40 PM >>> > -----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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html NOTICE OF CONFIDENTIALITY The information contained in this communication, including but not limited to any accompanying document(s) and/or attachment(s), is privileged and confidential and is intended solely for the above-named individual(s). If you are not the intended recipient, please be advised that any distribution, copying, disclosure, and/or use of the information contained herein is strictly prohibited. If you received this communication in error, please destroy all copies of the communication, whether in electronic or hard copy format, and immediately contact the Security Office at EDFUND at (916) 526-7539 or securityoff...@edfund.org. Thank you. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html