<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DCL analysis / tools in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064550#M38367</link>
    <description>John,&lt;BR /&gt;&lt;BR /&gt;In my reply of Aug 22, 2007 19:32:09 GMT, I stated:&lt;BR /&gt;------------&lt;BR /&gt;There are "undocumented" tools like set watch file/class=all that will show all XQP related operations, but depending on what the command procedures are doing, you may get so much output that finding what you are looking for as hard as other approaches.&lt;BR /&gt;------------&lt;BR /&gt;&lt;BR /&gt;I tried doing this, and to my surprise, it does not display any file activity related to DCL opening command procedures via the "@"&lt;BR /&gt;&lt;BR /&gt;Here's the command file I used on Alpha VMS 7.3-2&lt;BR /&gt;&lt;BR /&gt;Contents of set_watch_file.com&lt;BR /&gt;-------------&lt;BR /&gt;$ ver='f$verify(1)'&lt;BR /&gt;$ abc = " sys$login:show_time.com"&lt;BR /&gt;$ set noon&lt;BR /&gt;$ old_priv=f$setprv("cmkrnl")&lt;BR /&gt;$ abc[0,8] = 64&lt;BR /&gt;$ set watch file/class=(all)&lt;BR /&gt;$ abc&lt;BR /&gt;$ set watch file/class=none&lt;BR /&gt;$ junk=f$setprv(old_priv)&lt;BR /&gt;$ exit 1+0*f$verify(ver)&lt;BR /&gt;-------------&lt;BR /&gt;&lt;BR /&gt;Contents of sys$login:show_time.com&lt;BR /&gt;-------------&lt;BR /&gt;$ show time&lt;BR /&gt;-------------&lt;BR /&gt;&lt;BR /&gt;The only activity that is shown is the access to SETWATCH after the line $ set watch file/class=none&lt;BR /&gt;&lt;BR /&gt;I then modified it to do a DCL open/write of a file, and that is not seen by set watch file either.  I assume it is filtering DCL access to files (PPF? or SUPERVISOR mode?)   At any rate, sorry for the suggestion that doesn't work.&lt;BR /&gt;&lt;BR /&gt;I've included a log file showing my testing.  Normally, you would probably want to use something like /class=(major,directory) instead of /clss=all unless you are really interested in the details provided by /class=all&lt;BR /&gt;&lt;BR /&gt;By the way, AUDITING does show the file accesses, but getting the data is cumbersome, and there is no easy way to correlate where in the DCL procedure the file access is occuring, only time when it happened.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
    <pubDate>Fri, 24 Aug 2007 05:03:15 GMT</pubDate>
    <dc:creator>Jon Pinkley</dc:creator>
    <dc:date>2007-08-24T05:03:15Z</dc:date>
    <item>
      <title>DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064542#M38359</link>
      <description>I have about 100K lines of DCL code to sort out.  Are there any tools out there that will help me do this?  In particular, something that will parse the "@" calls.  Many of these calls are of the form @'name' which increases the complexity of creating a script to do it myself.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;John</description>
      <pubDate>Wed, 22 Aug 2007 12:12:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064542#M38359</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2007-08-22T12:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064543#M38360</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;what do you mean 'sort out'? Charlie Hammonds DCL_CHECK tool it helpful in finding coding errors/typos, but didn't go into @ed procedures.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Wed, 22 Aug 2007 12:24:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064543#M38360</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2007-08-22T12:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064544#M38361</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;As Karl said, it depends what your goals are.&lt;BR /&gt;&lt;BR /&gt;Any 'static' analysis isn't going to be able to find all the possible execution paths in an arbitrary DCL procedure.&lt;BR /&gt;&lt;BR /&gt;The case you give of @'name' is much easier to find than something like&lt;BR /&gt;&lt;BR /&gt;$ abc = " ''name'"&lt;BR /&gt;...&lt;BR /&gt;$ abc[0,8] = 64&lt;BR /&gt;...&lt;BR /&gt;$ 'abc'&lt;BR /&gt;&lt;BR /&gt;If I found something similar to that in a command procedure, it would raise red flags, because it appears to be intentional obfuscation.&lt;BR /&gt;&lt;BR /&gt;Without some assists from DCL itself, I don't know of any easy way to determine what files DCL is getting its commands from.&lt;BR /&gt;&lt;BR /&gt;I am not aware of any magic logical names to turn on DCL procedure tracing.&lt;BR /&gt;&lt;BR /&gt;There are "undocumented" tools like set watch file/class=all that will show all XQP related operations, but depending on what the command procedures are doing, you may get so much output that finding what you are looking for as hard as other approaches.&lt;BR /&gt;&lt;BR /&gt;If you have never seen what this does and want to know, Google for â  set watch fileâ  &lt;BR /&gt;&lt;BR /&gt;Perhaps you have just been given support responsibility for the code, and if thatâ  s the case, I donâ  t know of any magic bullets to help you understand what the code does.  I would recommend that whenever you have to go into the procedures to find a problem, once you have determined the cause, that you add comments that you will find useful in the future.&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;&lt;BR /&gt;Jon&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Aug 2007 14:32:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064544#M38361</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2007-08-22T14:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064545#M38362</link>
      <description>John,&lt;BR /&gt;     I'll second the what do you mean sort out question. if you mean your stuck maintaining it, thats a lot of dcl. I have&lt;BR /&gt;worked on some big ones, strategic inquires in places or exits help, kind of like breakpoints. dcl is powerful, but easy to&lt;BR /&gt;get cute coding in it, making it tough to&lt;BR /&gt;maintain. Dean</description>
      <pubDate>Wed, 22 Aug 2007 16:27:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064545#M38362</guid>
      <dc:creator>Dean McGorrill</dc:creator>
      <dc:date>2007-08-22T16:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064546#M38363</link>
      <description>There are no direct tools available here that I'm aware of.&lt;BR /&gt;&lt;BR /&gt;DCL is a limited environment, and there are a number of wrinkles around string handling and such that make processing it difficult.  The apostrophe substitution is just the tip; found any ampersand substitution lurking in the code yet? :-)&lt;BR /&gt;&lt;BR /&gt;DCL_CHECK and various other tools can be used to clean up the program, and there's likely a DCL lint around.&lt;BR /&gt;&lt;BR /&gt;You can use indirect techniques to watch for the @ operations, such as the (undocumented) SET WATCH /CLASS=kw FILE command, and security auditing.  These are fairly ugly and tedious approaches, though functional.&lt;BR /&gt;&lt;BR /&gt;100,000 lines?  That's a very substantial investment in DCL.&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs LLC&lt;BR /&gt;"Writing Real Programs in DCL, 2nd Ed"&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Aug 2007 20:26:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064546#M38363</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-08-22T20:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064547#M38364</link>
      <description>&lt;!--!*#--&gt;John&lt;BR /&gt;You can change all the â  @â  signs to â  executeâ  &lt;BR /&gt;You then get something like this    $ â  executeâ  john.com&lt;BR /&gt;&lt;BR /&gt;Depending if you go for a test or for real you can do the following&lt;BR /&gt;&lt;BR /&gt;If it is a TEST  $ IF â  â  â  p1â  â   .eqs. â  TESTâ   then  $ execute=â  DIR â   or a execute = â  TYPE  â   and you check the existence of all the imbedded command files to execute&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt; if it is for REAL $ IF â  â  â  p1â  â   .eqs. â  REALâ   then $ execute = â  @â     and you get the real execution of the stuff.&lt;BR /&gt;&lt;BR /&gt;For better reading sea attachment</description>
      <pubDate>Thu, 23 Aug 2007 02:22:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064547#M38364</guid>
      <dc:creator>Ruud Dijt</dc:creator>
      <dc:date>2007-08-23T02:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064548#M38365</link>
      <description>the attachment</description>
      <pubDate>Thu, 23 Aug 2007 02:23:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064548#M38365</guid>
      <dc:creator>Ruud Dijt</dc:creator>
      <dc:date>2007-08-23T02:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064549#M38366</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;Do you mean with sort out, look and know how procedures are called and stacked in eachother ?&lt;BR /&gt;&lt;BR /&gt;AvR</description>
      <pubDate>Fri, 24 Aug 2007 03:03:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064549#M38366</guid>
      <dc:creator>Anton van Ruitenbeek</dc:creator>
      <dc:date>2007-08-24T03:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064550#M38367</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;In my reply of Aug 22, 2007 19:32:09 GMT, I stated:&lt;BR /&gt;------------&lt;BR /&gt;There are "undocumented" tools like set watch file/class=all that will show all XQP related operations, but depending on what the command procedures are doing, you may get so much output that finding what you are looking for as hard as other approaches.&lt;BR /&gt;------------&lt;BR /&gt;&lt;BR /&gt;I tried doing this, and to my surprise, it does not display any file activity related to DCL opening command procedures via the "@"&lt;BR /&gt;&lt;BR /&gt;Here's the command file I used on Alpha VMS 7.3-2&lt;BR /&gt;&lt;BR /&gt;Contents of set_watch_file.com&lt;BR /&gt;-------------&lt;BR /&gt;$ ver='f$verify(1)'&lt;BR /&gt;$ abc = " sys$login:show_time.com"&lt;BR /&gt;$ set noon&lt;BR /&gt;$ old_priv=f$setprv("cmkrnl")&lt;BR /&gt;$ abc[0,8] = 64&lt;BR /&gt;$ set watch file/class=(all)&lt;BR /&gt;$ abc&lt;BR /&gt;$ set watch file/class=none&lt;BR /&gt;$ junk=f$setprv(old_priv)&lt;BR /&gt;$ exit 1+0*f$verify(ver)&lt;BR /&gt;-------------&lt;BR /&gt;&lt;BR /&gt;Contents of sys$login:show_time.com&lt;BR /&gt;-------------&lt;BR /&gt;$ show time&lt;BR /&gt;-------------&lt;BR /&gt;&lt;BR /&gt;The only activity that is shown is the access to SETWATCH after the line $ set watch file/class=none&lt;BR /&gt;&lt;BR /&gt;I then modified it to do a DCL open/write of a file, and that is not seen by set watch file either.  I assume it is filtering DCL access to files (PPF? or SUPERVISOR mode?)   At any rate, sorry for the suggestion that doesn't work.&lt;BR /&gt;&lt;BR /&gt;I've included a log file showing my testing.  Normally, you would probably want to use something like /class=(major,directory) instead of /clss=all unless you are really interested in the details provided by /class=all&lt;BR /&gt;&lt;BR /&gt;By the way, AUDITING does show the file accesses, but getting the data is cumbersome, and there is no easy way to correlate where in the DCL procedure the file access is occuring, only time when it happened.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Fri, 24 Aug 2007 05:03:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064550#M38367</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2007-08-24T05:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064551#M38368</link>
      <description>RE: You can change all the "@"signs to 'execute'&lt;BR /&gt;You then get something like this    $ 'execute'john.com&lt;BR /&gt;-------------&lt;BR /&gt;&lt;BR /&gt;Unfortunately, blindly doing a global replace of all @ characters with the string 'execute' has a reasonably high probability of breaking something, for several reasons.&lt;BR /&gt;&lt;BR /&gt;1. if the @ is contained in a quoted string the substitution won't work.&lt;BR /&gt;&lt;BR /&gt;2. internet mail addresses or something else using @ as something other than indirect execution of another command procedure.&lt;BR /&gt;&lt;BR /&gt;However, it may be easier to find them once they are broken.&lt;BR /&gt;&lt;BR /&gt;What I normally do is search for "@" characters, and look at the context, but I've never had to deal with 100K lines of DCL. Hopefully this DCL has a reasonable amount of comments, and hasn't been run through DCL_DIET or some other tool that strips comments.&lt;BR /&gt;&lt;BR /&gt;It would be nice if DCL had the ability to generate a trace of "@", calls and gosubs for debugging, especially since it seems that  set watch file filters DCL file activity.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Fri, 24 Aug 2007 06:07:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064551#M38368</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2007-08-24T06:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064552#M38369</link>
      <description>Not a tool, but I've done a similar thing (in a much smaller scale) by brute force. Potentially a LOT of work to dig through, but sometimes there is no other way:&lt;BR /&gt;&lt;BR /&gt;- Create a little file with this content&lt;BR /&gt;&lt;BR /&gt;$ write REVENGLOG "ENTER" + f$environment ("procedure")&lt;BR /&gt;&lt;BR /&gt;called "GETIN" (just to give it a name)&lt;BR /&gt;&lt;BR /&gt;- Create a little file with this content&lt;BR /&gt;&lt;BR /&gt;$ write REVENGLOG "EXIT" + f$environment ("procedure")&lt;BR /&gt;&lt;BR /&gt;called "GETOUT" (just to give it a name)&lt;BR /&gt;&lt;BR /&gt;- for each file to check:&lt;BR /&gt;&lt;BR /&gt;$ copy GETIN,Procedure.COM,GETOUT Procedure.COM&lt;BR /&gt;&lt;BR /&gt;Add lines to the main procedure:&lt;BR /&gt;as the FIRST line:&lt;BR /&gt;&lt;BR /&gt;$ OPEN/WRITE REVENGLOG &lt;FILESPEC of="" log=""&gt;&lt;BR /&gt;&lt;BR /&gt;and as last line (just above $ exit):&lt;BR /&gt;&lt;BR /&gt;$ CLOSE REVENGLOG &lt;FILESPEC of="" log=""&gt;&lt;BR /&gt;&lt;BR /&gt;- Now Run the main procedure.&lt;BR /&gt;&lt;BR /&gt;That will give you an idea what's called and by whom, written in the file you specified.&lt;BR /&gt;&lt;BR /&gt;(I know this is a quick hack and it can be far more elaborate and nicer. But as stated: I've done pretty much the same in a smaller enviroment and that gave me a pretty good idea how the application was working. It's by no means the final stage but proved a very good starting point for further investigation)&lt;/FILESPEC&gt;&lt;/FILESPEC&gt;</description>
      <pubDate>Fri, 24 Aug 2007 07:19:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064552#M38369</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2007-08-24T07:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064553#M38370</link>
      <description>Anton,&lt;BR /&gt;&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Fri, 24 Aug 2007 10:43:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064553#M38370</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2007-08-24T10:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: DCL analysis / tools</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064554#M38371</link>
      <description>Does not appear to be any great solution, but appreciate the input I received.&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Tue, 28 Aug 2007 16:28:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-analysis-tools/m-p/5064554#M38371</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2007-08-28T16:28:53Z</dc:date>
    </item>
  </channel>
</rss>

