$! name: achdlr.com $! $! purpose: captive LOGIN command file for handling users' accounts $! $! author: s. szep $! $! site: pratt institute $! $! date: 21-aug-84 $! $! revised: 2/26/85 $! $! location: ac$mgr $! $! $ set nocontrol = y $ set noverify $ option_table = "3NEW4LIST5QUOTA4MORE6REMOVE5PASWD4MAIL4DONE4HELP" $ type sys$input VAX/VMS ACCOUNT MANAGER Version 2.1 $! $! set up for initial prompt $! $ prompt = "INIT0" $ goto help0 !print the initial help message $! $! after the first prompting message, $! use the prompt: Next $! $ init0: $ prompt = "NEXT" $! $! Main command parsing routine. The routine compares the $! current command against the options in the option table. $! When it finds a match, it branches to the appropriate label. $! $ next: $ on control_y - then goto next !CTRL/Y resets prompt $ set control = y $ on warning - then goto next !if any, reset prompt $ inquire command "Next" $ if command .eqs. "" - then goto next $ command_size = f$length(command) !input length $ index = 0 !initial index $! $ check_next: $ option_length = f$extract(index,1,option_table) $ if option_length .eq. 0 - then goto invalid_command $ index = index + 1 !advance index $ next_command = f$extract(index,option_length,option_table) $ if f$extract(0,command_size,next_command) - .eqs. command - then goto 'next_command'0 $ index = index + option_length !set to next command $ goto check_next $! $ invalid_command: $ write sys$output " Invalid command" $! $ help0: $ type sys$input The commands you can enter are: NEW Add user accounts for an entire class LIST List the accounts for one class MORE Add more accounts to an existing class REMOVE Remove a user's account PASWD Reset a user's password MAIL Use the personal MAIL utility HELP Print this menu DONE Log off the system Enter CTRL/Y to restart this session $! $ goto 'PROMPT' $ new0: $ @ac$mgr:clasac $ goto next $! $ list0: $ @ac$mgr:lstusr $ goto next $! $ quota0: $ @ac$mgr:dquot $ goto next $! $ more0: $ @ac$mgr:morac $ goto next $! $ remove0: $ @ac$mgr:remac $ goto next $! $ paswd0: $ @ac$mgr:resetpw $ goto next $! $ mail0: $ define/user_mode sys$input sys$command: $ set control = y $ mail $ goto next $! $ done0: $ logoff $! $! $! end of achdlr.com $! $!