[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxaxp::vmsnotes

Title:VAX and Alpha VMS
Notice:This is a new VMSnotes, please read note 2.1
Moderator:VAXAXP::BERNARDO
Created:Wed Jan 22 1997
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:703
Total number of notes:3722

226.0. "Subtle USGOTO error VAX only V6.2 & V7.0" by GIDDAY::GILLINGS (a crucible of informative mistakes) Wed Feb 19 1997 20:53

    A customer has submitted some DCL code which behaves differently on
    OpenVMS/VAX V6.2 from OpenVMS/Alpha. The distilled version is:
    
label_test.com
$ ThisSymbol="The symbol value"
$ GOTO TestLabel
$ ThisSymbol "test"
$ TestLabel:
$ EXIT
    
    
    On OpenVMS/Alpha and OpenVMS/VAX V6.1 and below this "works" as one
    might expect at first sight. On OpenVMS/VAX V6.2 and V7.0, an error
    is generated (verify on):
    
$ @label_test
$ ThisSymbol="The symbol value"
$ GOTO TestLabel
%DCL-W-USGOTO, target of GOTO not found - check spelling and presence of label
 \TESTLABEL\
    
    Now, if you change the RHS of the symbol assignment to anything NOT
    starting with "THE", the code "works" again. So, DCL must be seeing the
    symbol usage of "ThisSymbol" and interpreting it as a synonym for
    "THEN", hence the label is inside a structured IF block and is
    therefore not visible to the GOTO command. 
    
    The customer discovered this curiosity by accidently leaving out the
    "=" symbol in an assignment which was continued across 2 lines.
    
    Now, I find it difficult to call this as bug or feature. On the one
    hand you'd have to be completely crazy to define synonym symbols for
    "IF", "THEN", "ELSE" and/or "ENDIF" (although some non-native english
    speakers may disagree). On the other hand, the nature of an interpreted
    language would suggest that it is legal and should work.
    
    There must be a problem here though as VAX and Alpha behave
    differently. Any opinions on which one should be QARed?
    
    						John Gillings, Sydney CSC
                                                                         
T.RTitleUserPersonal
Name
DateLines
226.1AUSS::GARSONDECcharity Program OfficeWed Feb 19 1997 22:3528
    re .0
    
    Er, cute.
    
    In fact symbols are not relevant.
    
    The following command procedure minimally demonstrates the difference
    between Alpha VMS V6.2 and VAX VMS V6.2.
    
$ if 1
$ th
$ endi
    
    Output from Alpha:
    
%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data inconsistency
    
    Output from VAX: none although if one has spell checking on then one
    gets
    
%DCL-I-MISSPELL, Verb TH is misspelled, using THEN in file A.COM
    
    i.e. Alpha will not accept the THEN verb abbreviated unambiguously to
    TH or THE.
    
    Which is correct? Well, IMHO this is a pretty sordid area of DCL but
    the VAX is probably correct.
    
226.2Caught by a bugfixEVMS::DAVIDB::DMILLERThis bug fix broke what???????Thu Feb 20 1997 11:2210
	Yep.  The bugfix was to accept abbreviations for the THEN and ELSE
	verbs just like they're allowed everywhere else.

	As noticed, you had a busted command procedure all along, and now
	its obvious.

	The fix should have been on both VAX and Alpha, though.  Will have
	to check into that...

	-Dave
226.3How do you spell check (again) please?IOSG::PYEGraham - ALL-IN-1 Sorcerer's ApprenticeFri Feb 21 1997 03:566
    RE .1
    
    Can you remind me how to turn on spell checking? Last time I saw how to
    do this, I was left a little confused!
    
    Graham (maintainer of 100k lines of DCL!!)
226.4DCL spell checkingMARVIN::CARLINIFri Feb 21 1997 15:1310
    Well it was 17 months ago when last you asked :-)
    
    $ SET COMMAND SYS$INPUT:
      DEFINE VERB EVIL
      CLIROUTINE SETDCL
      QUALIFIER SPELL_CHECK, NEGATABLE
    $!
    $ EVIL/SPELL
    
    Antonio
226.5Warning!COMEUP::SIMMONDSlock (M); while (not *SOMETHING) { Wait(C,M); } unlock(M)Sun Feb 23 1997 00:059
    Re: .4
    
    .. there's some problem when SPELL_CHECK is turned ON on OpenVMS Alpha
    V6.2 and you start a command procedure.. 100% CPU Busy in a fairly tight
    loop involving DCL and emulated MOVC3 .. interrupts are ignored.
    
    Does anyone consider this SPELL_CHECK feet-chewer QAR-able? :)
    
    John.
226.6AUSS::GARSONDECcharity Program OfficeSun Feb 23 1997 16:359
re .5
    
    (Er, yes, my LOGIN.COM only turns on spell checking if VAX.)
    
>    Does anyone consider this SPELL_CHECK feet-chewer QAR-able? :)
    
    A quick look through the list of QARs entered by me suggests that even
    I drew the line at QARing an undocumented feature that you have to
    define a verb manually for in order to use. But don't let me stop you.
226.7will QAR it soon..COMEUP::SIMMONDSlock (M); while (not *SOMETHING) { Wait(C,M); } unlock(M)Sun Feb 23 1997 18:386
    Re: .6
    
    Given that this (CPU consuming) behaviour could be exploited as a mild
    denial-of-service attack on OpenVMS Alpha, I'll write a QAR on it.
    
    John.