You can use either OpenVMS or UNIX command syntax in DCL command procedures that use FTP. You can use command procedures to invoke FTP tasks, connecting to a remote host and performing assorted file operations with the remote host and you can use command procedures to customize the FTP environment.
1 – Initialization Command Files
Initialization command files can customize your FTP sessions with the SET, ENABLE, and DISABLE commands. These command files are optional. They eliminate the need to enter individual FTP commands, and they run automatically when you invoke FTP. Initialization command files have the following characteristics: o Contain only OpenVMS commands. o Contain only one command per line. o Are generally named SYS$LOGIN:FTPINIT.INI.
2 – Examples
The following example shows an FTP initialization command procedure. ! This file, FTPINIT.INI, sets my FTP parameters ! the way I like them. ! ENABLE REPLY ENABLE TRANSFER_VERIFICATION SET DEFAULT/LOCAL [MILLER.WORK] When you invoke FTP, the initialization file generates output such as the following, which displays environment status: $ FTP Reply on. Verbose mode on. Bell off. Hash mark printing on (1024/hash mark). Local directory now SYS$LOGIN_DEVICE:[MILLER.WORK]
3 – Setting Error Level
To change the error level, enter the following command, where x is SUCCESS, WARNING, or ERROR: FTP> SET ERROR_LEVEL x o If x is SUCCESS, then WARNING, ERROR, and FATAL cause FTP to exit. o If x is WARNING, then ERROR and FATAL cause FTP to exit. o If x is ERROR, then only FATAL causes FTP to exit. Fatal errors always cause FTP to exit.