- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: DCL analysis / tools
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 05:12 AM
08-22-2007 05:12 AM
Thanks,
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 05:24 AM
08-22-2007 05:24 AM
Re: DCL analysis / tools
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.
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 07:32 AM
08-22-2007 07:32 AM
Re: DCL analysis / tools
As Karl said, it depends what your goals are.
Any 'static' analysis isn't going to be able to find all the possible execution paths in an arbitrary DCL procedure.
The case you give of @'name' is much easier to find than something like
$ abc = " ''name'"
...
$ abc[0,8] = 64
...
$ 'abc'
If I found something similar to that in a command procedure, it would raise red flags, because it appears to be intentional obfuscation.
Without some assists from DCL itself, I don't know of any easy way to determine what files DCL is getting its commands from.
I am not aware of any magic logical names to turn on DCL procedure tracing.
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.
If you have never seen what this does and want to know, Google for â set watch fileâ
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.
Good luck,
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 09:27 AM
08-22-2007 09:27 AM
Re: DCL analysis / tools
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
worked on some big ones, strategic inquires in places or exits help, kind of like breakpoints. dcl is powerful, but easy to
get cute coding in it, making it tough to
maintain. Dean
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 01:26 PM
08-22-2007 01:26 PM
Re: DCL analysis / tools
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? :-)
DCL_CHECK and various other tools can be used to clean up the program, and there's likely a DCL lint around.
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.
100,000 lines? That's a very substantial investment in DCL.
Stephen Hoffman
HoffmanLabs LLC
"Writing Real Programs in DCL, 2nd Ed"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 07:22 PM
08-22-2007 07:22 PM
Re: DCL analysis / tools
You can change all the â @â signs to â executeâ
You then get something like this $ â executeâ john.com
Depending if you go for a test or for real you can do the following
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
or
if it is for REAL $ IF â â â p1â â .eqs. â REALâ then $ execute = â @â and you get the real execution of the stuff.
For better reading sea attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 07:23 PM
08-22-2007 07:23 PM
Re: DCL analysis / tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 08:03 PM
08-23-2007 08:03 PM
Re: DCL analysis / tools
Do you mean with sort out, look and know how procedures are called and stacked in eachother ?
AvR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 10:03 PM
08-23-2007 10:03 PM
Re: DCL analysis / tools
In my reply of Aug 22, 2007 19:32:09 GMT, I stated:
------------
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.
------------
I tried doing this, and to my surprise, it does not display any file activity related to DCL opening command procedures via the "@"
Here's the command file I used on Alpha VMS 7.3-2
Contents of set_watch_file.com
-------------
$ ver='f$verify(1)'
$ abc = " sys$login:show_time.com"
$ set noon
$ old_priv=f$setprv("cmkrnl")
$ abc[0,8] = 64
$ set watch file/class=(all)
$ abc
$ set watch file/class=none
$ junk=f$setprv(old_priv)
$ exit 1+0*f$verify(ver)
-------------
Contents of sys$login:show_time.com
-------------
$ show time
-------------
The only activity that is shown is the access to SETWATCH after the line $ set watch file/class=none
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.
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
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.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 11:07 PM
08-23-2007 11:07 PM
Re: DCL analysis / tools
You then get something like this $ 'execute'john.com
-------------
Unfortunately, blindly doing a global replace of all @ characters with the string 'execute' has a reasonably high probability of breaking something, for several reasons.
1. if the @ is contained in a quoted string the substitution won't work.
2. internet mail addresses or something else using @ as something other than indirect execution of another command procedure.
However, it may be easier to find them once they are broken.
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.
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.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2007 12:19 AM
08-24-2007 12:19 AM
Solution- Create a little file with this content
$ write REVENGLOG "ENTER" + f$environment ("procedure")
called "GETIN" (just to give it a name)
- Create a little file with this content
$ write REVENGLOG "EXIT" + f$environment ("procedure")
called "GETOUT" (just to give it a name)
- for each file to check:
$ copy GETIN,Procedure.COM,GETOUT Procedure.COM
Add lines to the main procedure:
as the FIRST line:
$ OPEN/WRITE REVENGLOG
and as last line (just above $ exit):
$ CLOSE REVENGLOG
- Now Run the main procedure.
That will give you an idea what's called and by whom, written in the file you specified.
(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)
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2007 03:43 AM
08-24-2007 03:43 AM
Re: DCL analysis / tools
Yes.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2007 09:28 AM
08-28-2007 09:28 AM
Re: DCL analysis / tools
John