There quite a number of tools to scan CMS files for character strings. Everyone seems to have their particular favorite.
My favorite has long been "SCANCMS", written in assembler and very fast. SCANCMS can be found, courtesy of Fran Hensler, as of May 2008, at: http://zvm.sru.edu/~DOWNLOAD/ The following files are included in the SCANCMS PACKAGE: SCANCMS MODULE Z1 V 13720 3 4 9/09/98 10:56:37 SCANCMS TEXT Z1 F 80 254 5 9/09/98 10:56:22 SCANCMS LISTING Z1 F 121 5703 169 9/09/98 10:56:22 SCANCMS ASSEMBLE Z1 F 80 2903 57 9/09/98 10:56:06 SCANCMS ESAFIX Z1 F 80 10 1 9/09/98 10:47:21 SCANCMS AUXFIX Z1 F 80 1 1 9/09/98 10:15:13 SCANCMS CNTRL Z1 F 80 4 1 9/09/98 10:12:55 SCANCMS PACKAGE Z1 F 80 13 1 9/09/98 9:39:09 SCANCMS MACLIB Z1 F 80 568 12 9/09/98 9:36:27 SCANCMS NOTES Z1 F 80 113 3 5/13/87 14:47:17 SCANCMS HELPTOOL Z5 V 79 763 10 3/02/87 14:07:06 I particularly like SCANCMS' simple syntax. The typical syntax is: SCANCMS /search text/ fn ft fm There are lots of options. Another good "oldie" is SEARCH44 MODULE. Mike Walter Aon Corporation The opinions expressed herein are mine alone, not my employer's. "Les Koehler" <[email protected]> Sent by: "The IBM z/VM Operating System" <[email protected]> 03/17/2011 10:10 AM Please respond to "The IBM z/VM Operating System" <[email protected]> To [email protected] cc Subject Re: EXEC language parser Isn't SCANFILE MODULE available from the VM Download Library? Even if not, PIPES could probably simplify this EXEC. But it doesn't help analyze the code. Which is why I suggested a good XREF program. If he has the Rexx Compiler, that might satisfy his need. Les Miguel Roman wrote: > Hi,> > I wrote this REXX long time ago. I don't know if this is what you're looking for. > > ---------- > > /* REXX */ > /* Program S4 */ > /* Find Number of files on disk and list them */ > /* fn = file name | * > ft = file type | * > fm = file mode | * > fs = Search String */ > > /* For example 'S4 * exec a call' will search any 'exec' that resides on 'A' and will look for string 'call'. > It will exec 'listfile' with the arguments passed, it'll create file $ACTIVTY LOG A$. It'll use it to locate > the search string and will write files found on file '$SEACH FOUND A' */ > > parse arg fn ft fm fs > > 'erase $ACTIVTY LOG A' > 'erase $SEACH FOUND A' > 'listfile ' fn ft fm ' (stack' > Do x = 1 To queued() > Parse Pull temp > 'EXECIO 1 DISKW $ACTIVTY LOG A (STRING' TEMP > End > 'EXECIO * DISKR $ACTIVTY LOG A (STEM TEMPFILE. FINIS' > Do x = 1 To TEMPFILE.0 > 'makebuf' > FileName = TEMPFILE.x > fn = substr(FileName,1,9) > ft = substr(FileName,10,9) > fm = substr(FileName,19,1) > relrec=1 > do i=1 by 1 > 'EXECIO * DISKR ' fn ft fm relrec '(LOCATE /'fs'/' > if rc<>0 then leave /* end of file */ > parse pull relrec absrec . > parse pull rec.i > 'EXECIO 1 DISKW $SEACH FOUND A (STRING' File fn ft fm Line absrec > 'EXECIO 1 DISKW $SEACH FOUND A (STRING' rec.i > relrec=0 > end > rec.0=i-1 > 'dropbuf' > End > > ________________________________ > From: The IBM z/VM Operating System [mailto:[email protected]] On Behalf Of Mehta, Nilay > Sent: Wednesday, March 16, 2011 3:58 PM > To: [email protected] > Subject: EXEC language parser > > Hi, > > I am trying to create inventory list to show all called procedures from an EXEC program. > > Ideally I require a language parser which parses the syntax but doesn't execute the code; instead just identifies various aspects of the program (like called procedures, file definitions etc) > > REXX has option that causes commands to be traced but not processed. > > TRACE !C > > However it doesn't work if calls are made to external procedures (like PLI or FORTRAN modules etc) > > Is there a utility/command which can help me achieve the above? > > My system is z/VM 5.2 > > Thanks. > > Example: > > Pseudo code: > > ABC EXEC > /* */ > CALL 'PRDDATE' 'MMDDYY' > ERASE IUDINIT LOG > 'EXEC XYZPGM' > WHEN SELECTION = 2 > THEN DO > CMPSCHEM > END > 'FILEDEF IPPFILE DISK IPPFILE DAT A (LRECL 110 RECFM F' > 'FILEDEF ITTFILE DISK ITTFILE DAT A (LRECL 110 RECFM F' > 'QCHG' > IF RC <> 0 THEN DO; > SIGNAL ERROR; > END > RETURN; > > The utility should return all called programs: > 1.PRDDATE & XYZPGM (which are EXEC and may be written in EXEC, EXEC2 or REXX language) > 2.CMPSCHEM (which is written in assembly language - CMPSCHEM ASSEMBLE) > 3.QCHG (which is PL1 program - QCHG PLI) > > > > > > ............................................................................ > > For further important information about AllianceBernstein please click here > http://www.alliancebernstein.com/disclaimer/email/disclaimer.html > > > > > > ----------------------------------------- > CONFIDENTIALITY NOTE: This email communication and its attachments > contain information that are proprietary and confidential to > EVERTEC, INC., its affiliates or its clients. They may not be > disclosed, distributed, used, copied or modified in any way without > EVERTEC, Inc.รข??s authorization. If you are not the intended > recipient of this email, you are not an authorized person. Please > delete it and notify the sender immediately. EVERTEC, Inc. and its > affiliates do not assume any liability for damages resulting from > emails that have been sent or altered without their consent. > Moreover, EVERTEC, Inc. has taken precautions to safeguard its > email communications, but cannot assure that such is the case and > disclaim any responsibility attributable thereto. The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
