Subject: | |
From: | |
Reply To: | |
Date: | Wed, 4 Aug 2004 11:45:05 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
At 10:40 AM -0700 8/4/04, Paul Christidis wrote:
...
>The 'sorting', similar to the date arithmetic, is 'handed off' to a
>supporting command file. The involved command files are:
>
> LISTFX - The main command file.
> DTOFFSET - Command file for performing 'date arithmetic'.
> DATESORT - Command file that performs the 'date' sort of the
>qualifying "fileset".
>
>and were recently posted on the 'jazz' server
><http://jazz.external.hp.com/src/scripts/index.html>. All three files
>should be 'collocated' in the same MPE "group.account". Invoking the
>LISTFX command file without any parameters displays its 'usage
>information'.
Thanks for doing this. I'm sure it's quite useful, and your work is much
appreciated.
But may I make a suggestion? The more command files you have lying around
the more cumbersome it becomes to track them and maintain them. If your
date-related command files are used only in the context of providing extra
functionality to LISTFX, then I'd suggest rolling all that functionality
right into LISTFX. Although the CI doesn't currently support "functions" as
in posix shell programming, the "function" concept can be roughly simulated
using command file "entry points". For example...
parm entry="MAIN"
if "!entry" = "DTOFFSET"
# do all the steps performed by the DTOFFSET command file
endif
if "!entry" = "DATESORT"
# do all the steps performed by the DATESORT command file
endif
if "!entry" = "MAIN"
# do whatever LISTFX now does, but when you want to invoke
# the DTOFFSET functionality do it this way instead:
xeq !hpfile entry=DTOFFSET
end
So LISTFX ends up invoking a nested version of itself with the alternate
entry point. Of course, there may be some technical or other reason why
this wouldn't work in LISTFX, but I thought it was worth mentioning, as
it's a fairly solid technique in general.
--
Barry Lake mailto:[log in to unmask]
Allegro Consultants, Inc. http://www.allegro.com
(408)252-2330
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|