Bull DPX/20 Guía de instalación Pagina 130

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 334
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 129
Host Connection Program Guide and Reference
3-28
Creating HCON File Transfer Shell Procedures
The following sections describe the procedures for creating and using an HCON file transfer
shell procedure.
Prerequisite
To run the file transfer shell procedure, you must be registered as an HCON user.
Shell Procedure
An HCON file transfer can be invoked in a shell procedure by entering the user interface
commands into a file and running the procedure. The procedure can inspect the return code
from the fxfer command by testing the $? environment variable after the command runs. A
return code of 1 indicates that an error has occurred, and a return code of 0 indicates that
the transfer has completed.
The following example shell procedure accepts the name of the local system file as the first
command line parameter (the $1 procedure variable) and the name of the host file as the
second parameter (the $2 procedure variable). The shell procedure instructs the fxfer
command to:
Perform an automatic logon if necessary (if session a is not already established on the
local system) and log into the host as user matthew, using the SYSvm6 AUTOLOG
script.
Upload the local system file to the host.
Perform ASCII-to-EBCDIC translation. The file transfer process translates the file using
the table specified by the Language characteristic in the session profile.
Place messages from the file transfer command in the $HOME/transfer.stat file.
The shell procedure checks the error code environment variable (the $? variable) to see if
the transfer is successful and echoes this information to the user.
Notes:
1. When running the shell procedure, include the appropriate quotation marks when
entering the host file name.
2. The file transfer process prompts the user for the host password.
Shell Procedure Example
Following is the fx sample shell procedure:
## fx shell procedure ##
# This procedure accepts two command line parameters:
# $1 – local file name
# $2 – host file name
#
# This procedure uploads the local file to the host specified
# in HCON session profile a, and translates the file from
# ASCII to EBCDIC.
#
# If necessary, the procedure logs into the host automatically.
# Status messages are placed in the $HOME/transfer.stat file.
# After the procedure runs, the file transfer prompts for
# the host password.
#
fxfer –n a –utf $HOME/transfer.stat –x matthew,vm6 ”$1” ”$2”
if test $? != 0
then
echo ”File transfer return value indicates an error.”
echo ”See the $HOME/transfer.stat file for information.”
Vista de pagina 129
1 2 ... 125 126 127 128 129 130 131 132 133 134 135 ... 333 334

Comentarios a estos manuales

Sin comentarios