JOE@FHCRCVAX.BITNET (07/17/87)
Hi, I was wondering how people like to define DCL commands. There's pretty much three different ways of going about it, and I was interested in seeing what methods people preferred and why. 1) Define a 'foreign' command, use lib$get_foreign (or something similar) and parse by hand (requires programming effort, and a symbol definition) 2) Define a 'foreign' command, use lib$get_foreign (or something similar), call the cli$ routines (DCL_Parse and Dispatch) (requires SET COMMAND/OBJECT and linking in the command definition, plus a symbol definition) 3) Define a real command: a) Using SET COMMAND once per session (slow) b) Using SET COMMAND/TABLE=SYS$SHARE:DCLTABLES (1) Has the advantage of flexibility, but it takes work, and makes for non-standard interfaces.. It could reduce one of the better features of VMS (the standard command interface) into something akin to UNIX. (2) has the advantage of being much faster, and doesn't require mucking around with the system command tables. However, there's no chance for anyone to change any of the command defaults (this could be viewed as a plus for some applications) since they are linked into the image. (3) offers the chance of someone changing command defaults, however, some people may feel hesitant about modifying the system command tables (and of course, many can't), which forces them into redefining the command every time they log in (or at least when they want to use a particular command) which is painfully slow... Personally I generally use (3), although I think it should be possible to use a mixture of (3) and (2), by trying to parse the command, if it doesn't work then get the rest of the command line and call cli$dcl_parse with it.. This would give the advantage of being able to modify the command definition, yet also give a speed advantage to someone who hasn't modified it. Does anyone do this? Any comments? Cheers, Joe Meadows Jr. bitnet - JOE@FHCRCVAX voice - (206) 467-4970 Fred Hutchinson Cancer Research Center