Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Is %COPY-S-COPIED always 100% -S- ?

Art Wiens
Respected Contributor

Is %COPY-S-COPIED always 100% -S- ?

I'm troubleshooting a tiny piece of DCL that works 99.999% of the time, but for some unknown reason (to me ;-), sometimes it blows up. I have attached the code in question. It's part of a procedure run interactively at night but I have a screenshot from the operator.

I see the two COPY commands come back with %COPY-S-COPIED. The next bit of code shouldn't execute because the Mail_User symbol doesn't exist and it should just Return.

Immediately following the two -S-'s, I see:

%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\\\
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
\SAVE_VERIFY\
SAVE_STATUS = "%X00038090"
*** END SCREENSHOT HERE ***

I just can't see how it might fail on the blank line or the test on If Mail_User !! I assume from the first DCL-W- \\\ that it's seeing a \ somewhere? Is the COPY-S- not really a -S- ?

No idea,
Art
8 REPLIES
Robert Brooks_1
Honored Contributor

Re: Is %COPY-S-COPIED always 100% -S- ?

I'd validate that the symbol exists by using f$type(), which returns "" if the symbol is not defined.

-- Rob
Volker Halle
Honored Contributor

Re: Is %COPY-S-COPIED always 100% -S- ?

Art,

$ if mail_user .eqs. "" then hallo
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\\\
$ sho sym if
IF = "\"

Just a guess ;-)

Volker.
Aaron Sakovich
Super Advisor

Re: Is %COPY-S-COPIED always 100% -S- ?

I'd strongly recommend turning on Verify during that chunk of code. Given that you've only given us a snippet of the code, it's kind of hard to say exactly how things are setup prior to this section, and what could be causing the problem.

If this problem were regularly occurring, I'd recommend using the DCL debugger.

Since I presume (based on your statement about a "screen shot") that this job is running interactively, adding the verify will allow the operator to see the actual offending command, not just the error message. With verify off, this error could be coming from anyplace between the "IF" and the "MAIL" (nb: your code says "MAILL", not "MAIL") and you wouldn't be able to track it down precisely.
Walter Miller_1
Valued Contributor

Re: Is %COPY-S-COPIED always 100% -S- ?

Maybe somewhere Return has been defined as "\". An interactive user with a global symbol "Return" defined would cause the problem. I also notice the SAVE_VERIFY symbol has not been defined so there are other issues in the code.
Hein van den Heuvel
Honored Contributor

Re: Is %COPY-S-COPIED always 100% -S- ?

Aaron>> If this problem were regularly occurring, I'd recommend using the DCL debugger.

What DCL debugger? Guy Peleg special?

Aaron>> nb: your code says "MAILL", not "MAIL")

It could be a typo, but it is also a fairly common technique to avoid using a declared symbol, or in fact to use a special flavor.
If dir:==dir/date then dirr can be used to get a plain directory command.
The maill might use a maill:==mail/self definition.

Anyway, surely Volker is on the right track... something somewhere fed DCL a raw backslash: $Search *.com \ !????

Art>>Is the COPY-S- not really a -S- ?

Succes is succes.
You showed but a tiny fraction of the script.
Notably you did not show where the error handler is set up. So I think it is fair to assume it was active before getting to this code, and is still active after the return.
Could the bad statement not come from the code continuation after the return?
Too bad that DCL does not remember an offending line number for us huh?


fwiw,
Hein.




Art Wiens
Respected Contributor

Re: Is %COPY-S-COPIED always 100% -S- ?

Please keep in mind, all this stuff was "invented" 10+ years ago (and not by me ;-)

MAILL is not a typo, they wrote their own mail program and the two LL's avoid running it.

I didn't include all 400+ lines of code because it's brutal and would be too difficult to obfiscate (sp?).

SET VERIFY - showing the operators thousands of lines of DCL would probably make them cry and complain they can't do their job.

I searched through the most obvious directories for this account, no \'s defined.

I will add the SAVE_VERIFY symbol.

The error handler is setup at the top of the procedure:

$ On Error Then Goto Errhandler

The weird thing is it only happens once every few months so I'm thinking it's not really this code, but something else that the operator has done/run just before this procedure.

Re: DCL debugger - I am using it. It's found at the ITRC VMS Forum ;-)

1-800-do-my-job

Cheers,
Art
Volker Halle
Honored Contributor

Re: Is %COPY-S-COPIED always 100% -S- ?

re: DCL debugger

Google for DCL_DEBUG.COM

Art,

now as we have some possible culprit symbols for this error, why not add a couple of SHOW SYMB into the error handler (i.e. for IF, RETURN, MAILL) ? So you will have to do less speculation next time...

Volker.
Volker Halle
Honored Contributor

Re: Is %COPY-S-COPIED always 100% -S- ?

Art,

the points should go to Walter !

Your error handler is defined to handle severity: ERROR. But the %DCL-W-IVVERB is only a WARNING, so the error handler should NOT have been called.

The only way to reach the ERROR handler without a previous ERROR would be an invalid RETURN statement/symbol ( RETURN = "\" ) - at least in the code snippet you've provided.

Volker.