From: fairfield@slacvx.slac.stanford.edu
Subject: CORRECTION: Re: long, long, really long DCL commands
Organization: Stanford Linear Accelerator Center
Date: Mon, 28 Dec 1992 21:39:01 GMT

In a previous followup, I said:

In article <1992Dec28.125931.1@slacvx.slac.stanford.edu>, fairfield@slacvx.slac.stanford.edu writes:
[...]
>     DCL will accept ONLY 256 characters maximum on the command line,
> whether that line is continued on multiple, shorter lines in the input
> stream (terminal screen, command file) or not.

    I WAS WRONG :-(  Geez, I wish I'd learn to test before posting...

    Neil Readwin <nreadwin@micrognosis.co.uk> gave a correct response,
symbolically, which I verified myself.  Here are two examples captured
from my terminal screen:
-------------------------------------------------------------------------------
Example 1:
----------
$ show logical asdlfjkasdlfjkhaskldjfhalkjdfhaksjdfhaskljdfhlaskjdfhaskjdfhasklj
dfhaskjdfhaskljdhfalkjfhalskdjfhakljsdfhalkjhdflkajhdflkasjhasldfkjhasdflkjhalks
dfjhakldsjfhaksljdhkljahsdfkajhdflaiuwhfaksdjhfiauwhfakjdhfaiuhfkajlhdfakjldhfiu
ahaskdjfhasdfkjhas
%RMS-W-TNS, terminator not seen

    In this case, a single line typed at DCL exceeded the 256 character limit.
The length of the text above is just 256 characters, but the error message was
generated because (as I interpret it), DCL saw 256 characters without a <cr>
or other "terminator".  The error message is "terminator not seen", after all.

-------------------------------------------------------------------------------
Example 2
---------
$ show logical asdfjhafkdljhadfkjhadfkjhasdfkjhqwiufhaskjdhfwiauhfaksjhdfiquwhfk
asdjhfkaljsdhfukahdfauhdfjhakljsdfhalukhefklahfkasjdhfiuqhfkjasdhfklauhefkasjdhf
kajdhfkuahfklajhdfkluahekjasdhfuahfkjadshfiuahfeasdjfhdakjlhfawhasdjhvdakjfhiuah
adkjfhadkfjsha,-
_$ asldfkjaldkfjaslkdfjalsdkfjaslkdfjaslkdfjaslkdfjalskdfjsalkasdfjhaekfjhasdfha
kehfkadjhfkajshdfkajhdfkjadhfkjasdhfkweuahjasdhfkuahfkjdghjadfhkulaehaksdjhfkadu
hfkahfkdjhfhaiuhfkjdhfawkuehfkasjdhfkahdfkjasdhfkhuwqehfajsdhfkadduhfkuaehfkjdhf
kahdfjhakjdfha,-
_$ lsdfjaslkdfjaslkdfjaslk;dfjaoijfasldkghadsfjlkajfliasdjflkasdjfglk;asdjflkasd
jflkasdjflkasjdflaskgdjasdihfasdlkjfalskddjflaksdjfaijflkasdjfasdlkjfadlskjfaijf
adskfjalkdfjaslkdfjaasdfljaelkjdsafhasjkhfauehfdaskhfalkuefasdjhfasdjkhfauhdjhfa
uhfajhdfjkahjk,-
_$ asdkjfaslkdfjalksdjfalksdjfalksjdfalksdfjalskdfjaiejfakdsjfiarjfdkjfaijfadkfj
iajfdkjfalkdjfaijfdashfdasjflkaeifhadkfjagrijafaohfdlkfhauhafhhadfhafadsjhfauhdf
ahdfkasdhfuahfudahfadjhfaeuhrauhfuahjfhugfjfhadukhufahfuhfhuhfasduhfawegfldhfuia
ewryadfksdjhda,-
_$ asdfdsfrkjsdlfkj
%DCL-W-BUFOVF, command buffer overflow - shorten expression or command line
 \ASDFDSFRKJSDLFK\
$

    I haven't done the arithmetic carefully (it takes a long time to hit all
those keys! ), but if I subtract off the prompt string, the first line is
254 chars, the second, third and forth are 253 chars, and the last is 15 chars,
giving a total of 1038 characters.  Since the total exceeds 1024, the error
message is "command buffer overflow ...".

-------------------------------------------------------------------------------
>     The 1024 character limit has to do with the resulting command string
> after DCL has _expanded_ the command line, i.e., replaced symbols with their
> "translations", evaluated lexical functions, etc.  For example, if you had a
> symbol
>
> 	$ DF == "DIRECTORY/FULL"
>
> and typed "DF", the DCL command line would be 2 characters (counted against
> the 256 character limit), while the expanded command would be 14 characters
> long (counted against the 1024 character limit).

    I believe this assertion is still true, with the modification that the
256 character limit is on any single line, possibly a continuation line.

>
>     I'm sure others can give a more precise exposition (Don Stokes, are you
> listening?), but this is the general idea...

    Indeed, I'd rather hear what an EXPERT has to say ;-)
--
 Dr. Kenneth H. Fairfield    |  Internet: Fairfield@Slac.Stanford.Edu
 SLAC, P.O.Box 4349, MS 98   |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
 Stanford, CA   94309        |  BITNET    Fairfield@Slacvx
 ----------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...