Example command file to start VAXNET with scripting: 780.COM ------- $ VAXNET_INTRO := N $ VAXNET_LOG := Y $ LOG_LOCAL := N $ LOG_FILE := 780.LOG $ REMOTE_PORT := TTA4: $ REMOTE_SPEED := 1200 $ SYSTEM_TYPE := DEC $ INTERRUPT_CHAR := "^A" $ DUMP_TERM := "^Z" $ MODEM_TYPE := RIXON $ PHONE_NUMBER := "705" ! ROLM phone number. $ LOGIN_START := "^M" $ LOGIN_PROMPT := "Username:" $ LOGIN_CMD := "ROBIN/NOCOM" $ PASS_PROMPT := "Password:" $ PASSWORD := "password" $ LOGIN_ERROR := "User authorization failure" $ VAXNET_CMD := "SCRIPT SCRIPT.COM" $ VAXNET $ PURGE/LOG 780.LOG ****************************************************************************** Example script file: SCRIPT.COM ---------- .WAIT ^M$ ! ! If no wait string is specified, we simply loop reading characters until ! we become idle. The definition of idle is when we presume the remote ! isn't sending us any further data. We presume we are idle when our ! remote read times out after 'n' seconds (1 by default). The symbol ! SCRIPT_TIMEOUT can be defined to override this timeout. ! ! The remote read routine (READ_DATA) uses timeout count of 1 for the ! number of seconds allowed between receiving each character. This can ! be overridden with the symbol IDLE_TIMEOUT. If running in batch, you ! may want to increase this count to 2. ! ! Since many commands such as a "DIRECTORY" will have 2 seconds delays ! due to system load, you can specify a wait string. In this command ! file, the wait string is defined as "^M$" which is the prompt used by ! VMS. The script loops up to 'n' times (5 by default) looking for this ! string. The symbol SCRIPT_RETRYS can be defined to override this ! default. ! ! If the command line starts with an up arrow (^), all characters on the ! line with the "^char" format are converted to control characters. This ! command file uses an "^Z" to terminate the CREATE command. ! .WAIT create test.dat 1 2 3 4 5 6 7 8 9 10 ^Z .WAIT ^M$ ! ! The format of the .WAIT command is ".W[ait] string". Characters of the ! form ^char are converted to control characters. The string may contain ! contain embedded spaces but can not start with spaces. ! SHOW TERMINAL ! ! Use the .W[ait] with no wait string to prevent script from looking for ! a wait string. This is used when you want to send one line after ! another as in the CREATE command used in this command file. The wait ! string can then be reenabled when you expect a prompt string. ! .WAIT create test1.dat The .WAIT must be in uppercase to be found, otherwise the command is sent to the remote system. .wait string .11 .12 .13 .14 .15 ^Z .WAIT ^M$ TYPE TEST.DAT,TEST1.DAT DELETE TEST.DAT;0,TEST1.DAT;0/LO DIRECTORY .W LOGOUT ****************************************************************************** Log file created by the above script file: 780.LOG ------- Username: ROBIN/NOCOM Password: Welcome to VAX/VMS version V3.2 on node TERRA $! $! If no wait string is specified, we simply loop reading characters until $! we become idle. The definition of idle is when we presume the remote $! isn't sending us any further data. We presume we are idle when our $! remote read times out after 'n' seconds (1 by default). The symbol $! SCRIPT_TIMEOUT can be defined to override this timeout. $! $! The remote read routine (READ_DATA) uses timeout count of 1 for the $! number of seconds allowed between receiving each character. This can $! be overridden with the symbol IDLE_TIMEOUT. If running in batch, you $! may want to increase this count to 2. $! $! Since many commands such as a "DIRECTORY" will have 2 seconds delays $! due to system load, you can specify a wait string. In this command $! file, the wait string is defined as "^M$" which is the prompt used by $! VMS. The script loops up to 'n' times (5 by default) looking for this $! string. The symbol SCRIPT_RETRYS can be defined to override this $! default. $! $! If the command line starts with an up arrow (^), all characters on the $! line with the "^char" format are converted to control characters. This $! command file uses an "^Z" to terminate the CREATE command. $! $ create test.dat 1 2 3 4 5 6 7 8 9 10 ^Z $! $! The format of the .WAIT command is ".W[ait] string". Characters of the $! form ^char are converted to control characters. The string may contain $! contain embedded spaces but can not start with spaces. $! $ SHOW TERMINAL Terminal: _TTA1: Device_Type: Unknown Owner: _TTA1:(ROBIN) Input: 1200 LFfill: 0 Width: 80 Parity: None Output: 1200 CRfill: 0 Page: 24 Terminal Characteristics: Interactive Echo Type_ahead No Escape No Hostsync TTsync Lowercase No Tab Wrap Scope Remote No Holdscreen No Eightbit Broadcast No Readsync No Form Fulldup Modem No Local_echo Autobaud No Hangup No Brdcstmbx No DMA No Altypeahd Set_speed No ANSI_CRT No Regis No Block_mode No Advanced_video No Edit_mode No DEC_CRT $! $! Use the .W[ait] with no wait string to prevent script from looking for $! a wait string. This is used when you want to send one line after $! another as in the CREATE command used in this command file. The wait $! string can then be reenabled when you expect a prompt string. $! $ create test1.dat The .WAIT must be in uppercase to be found, otherwise the command is sent to the remote system. .wait string .11 .12 .13 .14 .15 ^Z $ TYPE TEST.DAT,TEST1.DAT 1 2 3 4 5 6 7 8 9 10 The .WAIT must be in uppercase to be found, otherwise the command is sent to the remote system. .wait string .11 .12 .13 .14 .15 $ DELETE TEST.DAT;0,TEST1.DAT;0/LO %DELETE-I-DELETED, USER2:[ROBIN]TEST.DAT;2 deleted %DELETE-I-DELETED, USER2:[ROBIN]TEST1.DAT;1 deleted $ DIRECTORY Directory USER2:[ROBIN] ANON.DIR;1 BASIC.COM;1 BASIC.DIR;1 BASIC.HLB;2 BATCH.LOG;1 BLISS.DIR;1 BRU.COM;1 CAT.DIR;1 CCP.DIR;1 CLOCK.COM;1 CLOCK.TXT;1 CMD.DIR;1 COM.DIR;1 CONFIG.DIR;1 COPY.MEM;1 COPYRIGHT.MAC;1 CVT.DIR;1 D.JOU;1 DAMMIT.DIR;1 DDT.DIR;1 DECUS.CMD;2 DECUS.CMD;1 DECUS.COM;1 DECUS.LST;3 DIR.DIR;1 EDTINI.EDT;8 EDTKEYS.TXT;4 END.JCL;1 ESTPIESQ.QWK;1 EXE.DIR;1 F4P.JCL;1 FAL.LOG;1 FINGER.PLN;1 FLOPPY.DIR;1 HELP.COM;2 ICE.DIR;1 ICR.DIR;1 JUNK.DIR;1 LBRSHR.EXE;2 LIST.COM;1 LIST.DIR;1 LOGIN.COM;1 M.MAI;1 MAIL.MAI;1 MAR.DIR;1 MASH.DIR;1 MDL.DIR;1 MEMO.DIR;1 MISH.DIR;1 P2.DIR;1 PHONE.DIR;1 PLOT.DIR;1 PNG.DIR;1 PRIV.COM;1 Q.COM;1 R.COM;1 R.MAI;1 RIXON.LOG;1 RNO.DIR;1 ROBIN.MSH;1 RSXV4.DIR;1 SCRATCH.DIR;1 SD.LOG;3 SHOW.DIR;1 SIGNON.JCL;1 SLAUGHTER.EXE;1 SYS11.DIR;1 T.JOB;3 T.JOB;2 TAB.DIR;1 TBL.TXT;1 TEC.DIR;1 TOM.LST;1 TPARS.DIR;1 TRNTBL.TXT;1 UNIX.DIR;1 USERS.DIR;1 VAXNET.DIR;1 VAXNET.NEW;2 VCOM.DIR;1 VTL.DIR;1 VTM.DIR;1 WHO.DIR;1 ZBDRV.DIR;1 ZG.DIR;1 Total of 85 files. $ LOGOUT ROBIN logged out at 26-AUG-1983 14:24:37.53