Re: Purpose of uppercasing a RUN command ?



Larry Kilgallen wrote:
In article <ejkg9o$5aa$1@xxxxxxxxxxxxxxxxx>, david20@xxxxxxxxxxxxxxxx writes:
In article <OF7A40D9CD.6262BD35-ON85257229.004B367E-85257229.004B9753@xxxxxxxxx>, norm.raphael@xxxxxxxxx writes:
I have no particular insights, but ISTM that since it is possible to
SET PROCESS/PARSE=EXTENDED with ODS5, then this may guarantee a match.


SET PROCESS/PARSE=EXTENDED on it's own will preserve case but will access
files in a case insensitive manner.

SET PROCESS/CASE_LOOKUP=SENSITIVE

would be needed to do case sensitive file accesses.

But then they could have just written the commands in
uppercase

But writing the commands in uppercase would not have provided such a good
warning to others who write command procedures (such as those assembled
here).

JF's example looks like it's from TCPIP$SMTP_RECV_RUN.COM

Follow this logic:

$ serv_id = f$edit("tcpip$smtp","upcase")
$ serv_home = f$edit("sys$specific:[''serv_id']","upcase")
$ !
$ ! purge smtp receiver logs
$ !
$ purge:
$ set default 'serv_home'

There is a log file name created the same way:

$ lognam = f$edit("tcpip$smtp_recv_run.log","upcase")

And of course, JF's original "run" statement example.

There is no good reason to perform f$edit on a constant argument. It
makes as much sense as $ ab = f$extract(0,2,"ABCDEFG")

If the actual directory name is "SYS$SPECIFIC:[TCPIP$SMTP]" and can't
be any other case, then use the frigging actual directory name.

The fact that this has hard-coded names throughout doesn't make me
believe it was done to allow for the future use of logicals/variables
or to make future changes to the routine easier.

This routine makes lexical calls to create symbols and does symbol
substitutions that accomplish nothing other than to waste cycles.

This routine also defines two labels, "purge:" and "run:" that are
never referenced. Each is placed after a comment. Again, they
accomplish nothing positive.

TCPIP$SMTP_RECV_RUN.COM is not an example of good DCL coding technique,
IMHO.

Not that I haven't written my share of crappy code;-)

.



Relevant Pages

  • Re: Exporting DNS
    ... test lab environment.What is the best way to accomplish this? ... Download dnsdmp from www.reskit.net/scripts ... The commands are: ... dnsdmp.cmd export <ExportDirectory> ...
    (microsoft.public.windows.server.dns)
  • Re: So thats what theyre for.
    ... > commands or syntax to accomplish the same thing. ... this might not be readily portable to all shells the user wants. ...
    (comp.unix.questions)
  • Re: Tcl "source" command
    ... to use the "eval" command to accomplish a dynamic use of the code ... forming the set of commands into a string/list that "eval" can ... variables and array elements that are defined in the current context. ... >fortran program that returns some Tcl code. ...
    (comp.lang.tcl)
  • Re: [opensuse] unsubscribe
    ... To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ... it does contain the EXACT method required to accomplish your ... desires, provided you have the ability to read and comprehend. ...
    (SuSE)