![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: How I can to use the login file as a no-interactive process ?? Can I put "Submit" in to de login file no-interactive? I have this login.com, Is this correct? ___________________________________________ $ IF F$MODE() .NES. "INTERACTIVE" THEN GOTO SOMETE $ EXIT $ SOMETE: $! RENAME TEST.OLD TEST.COM $ SUBMIT /NOPRINT/LOG=USR$B:[SEPULVEDA_R]TEST.LOG SYS$LOGIN:TEST.COM $! RENAME TEST.COM TEST.OLD _____________________________________________ The Answer is : Be careful when you try this, but try it! (You will find that each login will submit a batch job -- as you expected, including the login performed by the batch jobs themselves -- as you might not have expected. You will end up with a job that repeatedly resubmits itself until some sort of outside intervention occurs.) There exist several manuals in the OpenVMS documentation set on this topic, as well as books from sources including Digital Press. Here is an example of a system-wide login command procedure from the OpenVMS V7.2, from SYS$MANAGER:SYLOGIN.TEMPLATE: $ Set NoOn $ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY")) $ Goto MODE_'F$MODE()' $!++ $! SYLOGIN, the site-specific system-wide login command procedure $! $! This command procedure is invoked when a DCL process logs into the $! OpenVMS system. This procedure is a system-wide equivalent to the $! user's LOGIN.COM procedure; these commands are executed everytime $! anyone on the OpenVMS system logs in to their account, or any time $! a (DCL-based) network task process logs in, or any time a detached $! process (running DCL) starts, or any time a batch job starts up. $! $! SYLOGIN Structure: $! $! This SYLOGIN procedure is divided into four sections, sections that $! are invoked for "Interactive", "Batch", "Network", and "Other" "mode" $! process logins. Each section falls through into the next section, $! and thus commands are cumulative. $! $! For details on how these sections are established and on the meanings $! of these modes, see the f$mode() lexical function documentation. $! $! How to Customize SYLOGIN: $! $! Most user modifications will involve the definitions of symbols $! or logical names, or the invocation of various command procedures $! or DCL verbs, in the "Interactive" section, or -- most likely -- in $! the "Batch" section. (Note that all "Interactive" users will "fall $! through" and invoke the commands in the "Batch" section, and will $! then fall through again into the other sections.) $! $! Relatively few changes should be made to the "Network" and "Other" $! sections, as these processes usually do not rely on symbols, logical $! names, or other context established in this procedure, as most sites $! prefer these processes to have fast logins, and minimal overhead. $! (User sessions established via SET HOST or telnet are considered $! "Interactive" sessions, and not "Network" sessions.) $! $! To display the contents of the SYLOGIN procedure as it executes, $! define the logical name SYLOGIN_VERIFY in the group or system $! logical name table -- this enables verification for all logins $! in the UIC group or on the system. (As the process running the $! SYLOGIN is just logging in, the process and job logical name tables $! are not nearly as accessable nor as useful.) $! $! How to Set Up SYLOGIN: $! $! Rename SYS$STARTUP:SYLOGIN.TEMPLATE to SYS$COMMON:[SYS$STARTUP] $! SYLOGIN.COM, with a file protection setting that allows at least $! world:execute access to the SYLOGIN.COM file and to all parent $! directories of the file. Make any DCL changes necessary or $! appropriate to your local site. $! $! In SYSTARTUP_VMS.COM, add the following line: $! $! $ DEFINE/EXECUTIVE/SYSTEM SYS$SYLOGIN SYS$STARTUP:SYLOGIN $! $! This will cause SYLOGIN.COM to be executed for all DCL logins $! on the system. Use the following SYSMAN commands to set up $! the SYS$SYLOGIN logical name "live" on all VMScluster nodes: $! $! $ RUN SYS$SYSTEM:SYSMAN $! SYSMAN> SET ENVIROMENT/CLUSTER $! SYSMAN> SET PROFILE/PRIVILEGE=(SYSNAM,CMEXEC) $! SYSMAN> DO DEFINE/EXECUTIVE/SYSTEM SYS$SYLOGIN SYS$STARTUP:SYLOGIN $! $! If the local node is operating standalone, the commands: $! $! $ SET PROCESS/PRIVILEGE=(SYSNAM,CMEXEC) $! $ DEFINE/EXECUTIVE/SYSTEM SYS$SYLOGIN SYS$STARTUP:SYLOGIN $! $! can be directly executed. $! $-- $MODE_INTERACTIVE: $! Turn on the processing of <Control/T>. $! $ SET CONTROL=T $! Set the terminal type, unless this is a detached DECwindows application, $! or a remote login, or specific other terminal types. (Note that remote $! user logins, via such protocols as DECnet CTERM (SET HOST, device driver $! prefix "RT") and IP (telnet, device driver prefix "TN"), are considered $! "Interactive" processes, and not "Network" processes.) $ TT_NOINQUIR = "|TW|RT|WT|TK|WS|PY|FT|TN|" $ TT_DEVNAME = F$GETDVI("TT","TT_PHYDEVNAM") $ TT_DEVPREFIX = F$EXTRACT(1,2,TT_DEVNAME) $ IF F$LOCATE("|''TT_DEVPREFIX'|",TT_NOINQUIR) .eq. F$Length(TT_NOINQUIR) $ THEN $ ! Determine what sort of terminal this is, and avoid resetting $ ! the user's default display size settings in the process... $ tt_page = f$getdvi("TT","TT_PAGE") $ devbufsiz = f$getdvi("TT","DEVBUFSIZ") $ SET TERMINAL/INQUIRE/PAGE='tt_page'/WIDTH='devbufsiz' $ EndIf $! Remove the comments from the following command to support the Wollongong $! PathWay specific login procedure. $! @TWG$TCP:[NETDIST.MISC]SYSLOGIN.COM $! Remove the comment from the following command to execute Process Software's $! TCPware command definition procedure. $! @TCPWARE:TCPWARE_COMMANDS.COM $! Fall through... $MODE_BATCH: $! Place commands that should be available to interactive users, and to $! batch jobs, below. This is the most common place for user-defined $! logical names and DCL symbols. $ IF (F$TRNLNM("SYS$MICROVAX")) $ THEN $ ! For MicroVAX systems only, use the command MOUNT/NOASSIST. $ MOU*NT :== MOUNT/NOASSIST $ EndIf $! ======= ================= =========== $! A D D C O M M A N D S B E L O W $! ======= ================= =========== $! ======= ================= =========== $! A D D C O M M A N D S A B O V E $! ======= ================= =========== $! Fall through... $MODE_NETWORK: $! Place those commands that should be available to interactive users, $! to batch jobs, and to network jobs, below. (Few commands should be $! placed here, as network tasks do not normally need symbols nor $! logical names defined in SYLOGIN.) $! Fall through... $MODE_OTHER: $! Place those commands that should be available to interactive users, $! to batch jobs, and to network jobs, below. (Very few commands should $! be placed here, as detached processes do not normally need symbols nor $! logical names defined in SYLOGIN.) $ Exit 1
|