When you design an application, be careful how you define the supporting logical names. Logical names are a powerful concept that unfortunately can be very easy to make exceptionally confusing.
I've found the best way to do logical names is to avoid all system-supplied logical name tables such as the LNM$SYSTEM_TABLE
, and define your own logical name tables with the CREATE/NAME_TABLE
command. You can define any number of tables, each of which can duplicate the associated logical names for an application, so that you can have multiple application environments. The appropriate environment/application table can then be slotted into LNM$FILE_DEV
after LNM$JOB_TABLE
, which allows programmers to override logicals as needed for testing and development.
For Deity's sake, don't redefine disk logical names at the process or job level in production DCL. I know of no faster way to cause massive amounts of confusion for people like myself who are attempting to troubleshoot issues.
Does your application refer to files via logical names? Not the directory locations, but do you expect to have a logical pointing at the absolute file spec? If so, check that the logical exists before you do something like refer to it in a SYS$OPEN
call that specifies CIF
(that's create if the file doesn't exist). The file will get created in your default directory. Probably not what you meant to accomplish. Better yet, learn how primary, default, and related file specs work. Your systems managers will thank you.
An advise:
USE THE |D|i|g|i|t|a|l| STANDARDS.
1. Add a clear, discriminating prefix.
Most applications have an acronym or abbreviation. USE IT. For instance, an application I work on today is abbreviated "tks". ALL it's logicals are prefixed "tks_". No matter in what table they are defined.
2. define the logicals of an application in a separate table and add this between LNM$JOB and LNM$GROUP, like specified. Name this table after the application, by it's acronym or abbreviation. In my case: LNM$TRAKSY, or LNM$TKS. I would prefer the acronym, since it may contain different definitions as well.
Quite handy if you're running multiple applications.
Another approach: Place all users that normally use this application, in the same UIC-group, and define the logicals in LNM$GROUP_nnnnnn - their GROUP table.
Feasible in an environment using a dedicated server, or where users are strictly coupled to use ONE application.)
Posted by: SYSMGR at October 9, 2008 7:27 PM
Yep, all good suggestions. Well, other than the group thing. I'm not a fan of division by group, as it never usually lasts.
Posted by: Jim Duff at October 9, 2008 10:53 PM
Comments are closed