DCL_DIET, UTILITIES, Charlie Hammond's unsupported DCL dieter [The following also appears near the beginning of DCL_DIET.COM and DCL_DIET.COM_SOURCE.] ************************************************************** This procedure "DIETs" a command procedure file -- compressing it by removing comments and unnecessary space. This saves file space and improves execution time. It may also remove comments that you don't want users to see. To run this procedure, enter command $@DCL_DIET where is the input command procedure is the "DIETed" output file ( may also be in the form "/OUTPUT=" If you use DCL_DIET frequently, you may wish to assign a symbol in your LOGIN.COM file to execute DCL_DIET. For example, if the DCL_DIET.COM is in you LOGIN default directory, you might put the following in your LOGIN.COM: $ DCL_DIET :== "@SYS$LOGIN:DCL_DIET" Alternatively, if you put DCL_DIET.COM in SYS$SYSTEM, you might put the following in your SYS$SYLOGIN (which is normally SYS$MANAGER:SYLOGIN.COM): $ DCL_DIET :== "@SYS$SYSTEM:DCL_DIET" If the translation of the logical name DCL$DIET_DOTDOT is true, then this version adds a space a the beginning of a line that starts with ".". This is to overcome a problem with SMTP mail in Compaq TCP/IP services so that TCP/IP V5.3-18's SMTP won't double the "." ************************************************************** Version 1.1 implements the following: $! We want to TRIM, COMPRESS and UNCOMMENT the dcl record, $! But first we must deal with problem that F$EDIT has: $! $! - Exclaimation marks used for formating directives in F$FAO $! control strings may be taken as comments and removed. $! This only occurs when the F$FAO is preceded by two single quotes $! indicating symbol substitution within a quoted string. e.g. $! $! $ write sys$output "Value is: ''f$fao("!4UL",value)'" $! $! - Multiple spaces in strings within a lexical function may be $! incorrectly compressed. Again, This only occurs when the F$FAO $! is preceded by two single quotes indicating symbol substitution $! within a quoted string. e.g. $! $! $ write sys$output "''f$locate(" a"," a")'" $! $! (These may not be good coding practice, but tye ARE used.) $! $! We could write a lot of clumsy code to handle this, but since it is $! an unusual occurance, we just skip dieting any lines that contain $! the string "''F$" or the string "''f$'"(although we do strip extra $! spaces after the "$" and we also strip any trailing spaces. Version 1.2 implements code to handle /DOLLARS on $DECK. Note that there are various ways to "go wrong" when using /DOLLARS. Checking your code with DCL_CHECK may find problems; you may want to use DCL_CHECK before running DCL_DIET.