UDC / script comparisons
similarities:
- ASCII, NOCCTL, numbered or unnumbered, max 511 record width
- optional parameter line ok - max of 255 arguments
- optional options, e.g. HELP, NOBREAK, RECURSION
- optional body (actual commands)
- no inline data, unlike Unix ‘here’ files :(
- can protect file contents by allowing eXecute access-only security, i.e., denying read access
Notes:
UDCs support the OPTION LOGON option. A single UDC at each level (user, account and system) can be executed at logon. Even if there are several UDCs at a given level with OPTION LOGON defined, only one UDC (the first) per level will be executed at logon time -- the remaining OPTION LOGON UDCs at that level are ignored at logon. The order that UDCs are executed during logon is the opposite of the execution order after logon. Namely, system level UDC are invoked first, followed by account UDCs, followed last by user level logon UDCs. This order allows system managers to control access to their system and to administer other security related policies via a system level logon UDC. Users cannot override a system level logon UDC, at logon time nor during normal command usage.
Scripts do not support OPTION LOGON. However, it is not uncommon for an OPTION LOGON UDC to simply invoke a script to do the real work. For example:
MYLOGONUDC file: LOGIN
OPTION LOGON # my logon script
# invoke login script setvar hppath hppath+”,scripts.sys,hpbin.sys”
xeq login setvar hpredosize 100
*** if hpinteractive then ...
A UDC name can be from 1 to 16 character long and consist solely of alphanumeric characters, with the first character being a letter.
Note: UDC filename can be an MPE syntax symbolic link pointing to a POSIX named UDC file, if for some reason the actual UDC file needed to reside in the HFS. For example,
:newlink udclk, /usr/local/udcs/system.udc :setcatalog udclk ; append