LOGIN.COM

From VSI OpenVMS Wiki
Revision as of 12:18, 28 November 2019 by Jane.doe (talk | contribs) (Created page with "'''LOGIN.COM''', or the '''personal login command procedure''', is the default name for a command procedure that is executed before each user's Process...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

LOGIN.COM, or the personal login command procedure, is the default name for a command procedure that is executed before each user's process runs (interactive, batch or otherwise). Unless a different file specification is supplied in the user's SYSUAF record's LGICMD field, the system will look for a file called LOGIN.COM in the user's default directory and if found execute the latest version of it. LOGIN.COM is usually used to customize the user's environment: set up their terminal, define logical names, symbols and foreign commands, set prompt, display important information, etc. In case of a captive account, the personal login command procedure limits the user's actions, usually providing a menu and never allowing the user access to DCL.

Batch Considerations

LOGIN.COM executes before every batch job that a user runs, which could possibly lead to:

  • the batch process hanging if LOGIN.COM contains commands requiring terminal interaction, such as SET TERMINAL/INQUIRE or INQUIRE, because there is no terminal
  • uncontrollable creation of batch processes if LOGIN.COM contains SUBMIT commands
  • longer execution times if LOGIN.COM is long and performs actions unnecessary for the purposes of the batch job etc.

The following code determines the mode in which the process runs and branches to the commands specific to that mode:

$ GOTO 'F$MODE()'                                      
$INTERACTIVE:                                          
$! put your interactive commands here  
$
$                        
$ EXIT
$BATCH:
$! put your batch mode commands here
$ 
$ 
$ EXIT 
$NETWORK:
$OTHER:
$ EXIT