From: MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 15-MAR-1993 14:00:24.89 To: Info-VAX@KL.SRI.COM CC: Subj: Re: How to prevent symbol substitution In article <1993Mar15.080715.17475@news.th-darmstadt.de>, sysgaertner@bootes.frm.maschinenbau.th-darmstadt.de (M. Gaertner, FRM, TH Darmstadt, Germany) writes: Well, a reply to my own message, that doesn't happen often :-) Here's what I was hunting after: ================================================================================ Note 3438.0 Re: Question in SUBMIT jobs, DCL, copyrights, symbols, No replies LINAC::INFO_VAX 122 lines 10-DEC-1991 15:18 Oh, yeah, another neat DCL trick: Define a symbol, the underscore, to mean a space, in your command files. Then any line you are worried about the user redefining (like delete--happens all the time), precede with an underscore. Any symbol name would work, but underscores as initial characters don't seem to occur to people, and it is reminicent of how DEC used to indicate no-logical-name-translation, and still does: NL: is the null device, but is subject to logical name redirection; _NL: is _always_ the null device. So if your user says something like $ DEL*ETE :== DELETE/CONFIRM ! a common practice your command file will break with something like $ delete/symbol foo ! not all that common, but 'happens. So, change your file to $ _ = " " $ _ delete/symbol foo instead of naming every verb you might use, or mangling them: $ deletecuzIsedso__I_MEAN_IT /symbol foo The first trick (batch enhancements) is entirely supported by DEC; like I said, it's in the manuals. If you use it, and it breaks, you can legitimately complain to DEC, and you'll be in LOTSA good company, and they'll fix it. The latter (underscore quoting symbol) is a mixed bag. Your definition is supported, but it relies on an undocumented aspect of the DCL command parser. DEC would be able to change it and thumb their nose at you when you complained that your stuff didn't work, but the change that would make that trick fail would break more than half of the command files that DEC wrote, and DOES support, and most likely, does not want to re-write. In other words, no guarantees, but unbelievably long odds. I use it, anyways. Boy, I really ran off at the fingers today!! -- Steve Suttles Internet: steve@dbaccess.com Dr. DCL is IN! CROSS ACCESS Corporation UUCP: {uunet,mips}!troi!steve Yo speako TECO! 2900 Gordon Ave, Suite 100 fax: (408) 735-0328 Talk data to me! Santa Clara, CA 95051-0718 vox: (408) 735-7545 HA! It's under 4 lines NOW! ============================================================================== That does work even with 5.5-1: (List of SETHOST.LOG) THD Maschinenbau FRM CI-VAXcluster Username: SYSGAERTNER/NOCOM Password: Last interactive login on Monday, 15-MAR-1993 08:49 Last non-interactive login on Monday, 15-MAR-1993 09:14 letzte "Neuigkeiten" vom 23-FEB-1993 (Help Neuigkeiten) BOO_> set def user$scratch: BOO_> dir Directory USER$SCRATCH: NOTES.LIS;3 SETHOST.LOG;1 Total of 2 files. BOO_> ty*pe :== copy BOO_> ty notes.lis _To: hallo.dat BOO_> dele hallo.dat; BOO_> _ ty notes.lis %DCL-W-IVVERB, unrecognized command verb - check validity and spelling \_\ BOO_> _ = " " BOO_> _ ty notes.lis -------------------------------------------------------------------------------- INFO-VAX Liste Created: 29-MAY-1991 19:25 11718 topics Updated: 15-MAR-1993 07:31 Topic Author Date Repl Title -------------------------------------------------------------------------------- 1 LINAC::HUCK 29-MAY-1991 0 Welcome to the INFO-VAX List Conference 2 LINAC::HUCK 29-MAY-1991 0 MAILTONOTES 3 29-MAY-1991 0 4 LINAC::MAILTONOTES 30-MAY-1991 1 CMU-TEK TCP/IP problems with LPR 5 LINAC::MAILTONOTES 30-MAY-1991 6 RE: DECUS CDroms for non-US customers 6 LINAC::MAILTONOTES 30-MAY-1991 1 Getting LAT service name - summary. 7 LINAC::MAILTONOTES 30-MAY-1991 8 Re: talk for VMS 8 LINAC::MAILTONOTES 30-MAY-1991 2 DECUS LUGs 9 LINAC::MAILTONOTES 30-MAY-1991 0 Re: A problem with case, in argv[] with VAX C 10 LINAC::INFO_VAX 30-MAY-1991 4 re: DISKQUOTA questions ... basic ... 11 LINAC::INFO_VAX 30-MAY-1991 1 Re: Kermit transfer problem BOO_> BOO_> _ type notes.lis -------------------------------------------------------------------------------- INFO-VAX Liste Created: 29-MAY-1991 19:25 11718 topics Updated: 15-MAR-1993 07:31 Topic Author Date Repl Title -------------------------------------------------------------------------------- 1 LINAC::HUCK 29-MAY-1991 0 Welcome to the INFO-VAX List Conference 2 LINAC::HUCK 29-MAY-1991 0 MAILTONOTES 3 29-MAY-1991 0 4 LINAC::MAILTONOTES 30-MAY-1991 1 CMU-TEK TCP/IP problems with LPR 5 LINAC::MAILTONOTES 30-MAY-1991 6 RE: DECUS CDroms for non-US customers 6 LINAC::MAILTONOTES 30-MAY-1991 1 Getting LAT service name - summary. 7 LINAC::MAILTONOTES 30-MAY-1991 8 Re: talk for VMS 8 LINAC::MAILTONOTES 30-MAY-1991 2 DECUS LUGs 9 LINAC::MAILTONOTES 30-MAY-1991 0 Re: A problem with case, in argv[] with VAX C 10 LINAC::INFO_VAX 30-MAY-1991 4 re: DISKQUOTA questions ... basic ... BOO_> type notes.lis _To: nla0: BOO_> lo SYSGAERTNER logged out at 15-MAR-1993 09:22:38.59 ============================================================================== That's perfectly what I remembered. This way neither deletes user's symbols nor prevents my command-files to run as expected. ----------------------------------------------------------------------------- M. Gaertner TH Darmstadt, W. Germany Rechnergruppe FB 16-Maschinenbau SYSGAERTNER@CYGNUS.FRM.MASCHINENBAU.TH-DARMSTADT.DE Phone: Germany, (0)6151/16 5145