Hitachi

JP1 Version 12 for UNIX Systems JP1/File Transmission Server/FTP Description, Reference and Operator's Guide


3.4.1 Registering transmission information onto a transmission card

You register transmission information onto a transmission card.

You can edit an existing transmission card and register it as a new transmission card.

The following table lists and describes each item in the transmission information.

Table 3‒5: Items in the transmission information

Item

Setting

Transmission card name

((1 to 20-byte character string))

Specifies a name for the transmission information. If you link to JP1/AJS3, make sure that the specified transmission card name does not contain any spaces. This item is mandatory.

Remote host name

((1 to 256-byte character string))

Specifies the host name or IP address of the remote host. When you specify an IP address, you can specify an IPv4 or IPv6 address. This item is mandatory.

Port number

((1 to 65,535))

<<21>>

Specifies the port number of the remote host. If this item is omitted, 21 is assumed.

  • For transmitting to a JP1/FTP host:

    Specify the port number that was specified in ftss in the port number settings.

  • For transmitting to the OS's default FTP host:

    Specify the default value (21).

Remote user name

((1 to 80-byte character string))

Specifies the name of the login user at the transmission target. This must be a login user name that has been registered. This item is mandatory.

Password

((0 to 80-byte character string))

Specifies the password registered for the login user. If the password was omitted during the registration process, leave this item blank.

Send/receive type

Specifies the transmission type:

  • Send

  • Receive

Transmission mode

Specifies the transmission mode according to the file to be transmitted.

  • ASCII: In this transmission mode, the receiving end adjusts linefeed codes according to the local system. Use this mode to transmit text files.

  • BINARY: This mode achieves transparent transmission without having to be aware of the data contents. Use this mode to transmit data files and executable files.

Size check

Specifies whether to check the size of a transmitted file for errors after file transmission. If a file's transmission data size does not match between the sending and receiving ends, a transmission error results. For the size check to be enabled, the remote FTP host must be JP1/FTP (version 06-00 or later) or uCosminexus Service Platform (version 08-53 or later).

Output type

Specifies how to output files after transmission:

  • Append: If a file with the same name already exists, the transmitted data will be appended to that file. If there is no file with the same name, a new file will be created. This option is not available when the send/receive type is Receive.

  • Overwrite: If a file with the same name already exists, that file will be overwritten (in which case the file's existing contents will be destroyed). If there is no file with the same name, a new file will be created.

Compression mode

Specifies whether to compress the transmitted files.

About the compression specification:

  • If the remote FTP host does not support the compression mode, data is not compressed during transmission even if you specify compression.

  • The run-length compression method defined in RFC 959 (FILE TRANSFER PROTOCOL) is used as the compression method.

Single/Multiple-file transmission

Specifies whether transmission is to be of a single file or multiple files.

  • Automatic switch: JP1/FTP is to check whether a wildcard character (* or ?) is used in the local file name when the transmission type is Send or in the remote file name when the transmission type is Receive. If the file name contains * or ?, JP1/FTP will perform multiple-file transmission. If the file name does not contain * or ?, JP1/FTP will perform single-file transmission.

  • Multiple-file: JP1/FTP is to perform multiple-file transmission exactly as dictated by the wildcard.

  • Single-file: JP1/FTP is to perform single-file transmission. If a wildcard is specified, JP1/FTP treats it as a character and transmits a single file.

Local file name

Specification depends on the transmission type, as described below. This item is mandatory.

  • Send transmission type ((1 to 256-byte character string))

    Specifies the name of the file to be sent from the local system. You can use wildcard characters to specify multiple files. If you use a wildcard character, the length of the expanded path name must not exceed 256 bytes.

How to specify multiple files:

The specification method depends on the setting for Single/Multiple-file transmission:

When Single/Multiple-file transmission is set to Automatic switch:

You can use the following wildcard characters to specify multiple files:

*: Any number of any characters, including no characters

?: Any single character

If neither * nor ? is used, single-file transmission is performed.

When Single/Multiple-file transmission is set to Multiple-file:

You can specify the [] and ! wildcard characters, in addition to * and ?.

If you send multiple files, specify a directory for the remote file name. If the specified directory contains a file with the same name as the local file name, that file will be overwritten. If there is no file with the same name, a new file will be created.

If Single/Multiple-file transmission is set to Automatic switch or Multiple-file, no wildcard character can be used in the specification of a directory name. If a directory name contains a wildcard character, you must set Single/Multiple-file transmission to Single-file.

  • Receive transmission type ((1 to 256-byte character string))

    Specifies the name of the file to be output at the local system after the file is received. If you have specified a wildcard in the remote file name, specify a directory name (other than the root directory). Note that the length of the expanded path name must not exceed 256 bytes.

When specifying a relative path:

For both sending and receiving, the specified path is relative to the following directory:

/var/opt/jp1_fts/work

Remote file name

Specification depends on the transmission type, as described below. This item is mandatory.

  • Send transmission type ((1 to 256-byte character string))

    Specifies the name of the output file at the remote system. If you have used a wildcard character in the local file name, specify a directory name. Note that the length of the expanded path name must not exceed 256 bytes.

  • Receive transmission type ((1 to 256-byte character string))

    Specifies the name of the input file at the remote system.

    You can use wildcard characters to specify multiple files. Note that the length of the expanded path name must not exceed 256 bytes.

How to specify multiple files:

The specification method depends on the setting for Single/Multiple-file transmission:

When Single/Multiple-file transmission is set to Automatic switch:

You can use one of the following wildcard characters to specify multiple files:

*: Any number of any characters, including no characters

?: Any single character

If neither * nor ? is used, single-file transmission is performed.

When Single/Multiple-file transmission is set to Multiple-file:

You can specify the [] and ! wildcard characters, in addition to * and ?.

If you receive multiple files, specify a directory for the local file name. Files with the same names as the remote files will be created in the specified directory.

How wildcard characters are interpreted:

A wildcard is specified in the NLST command and then sent to the remote FTP host. The file to be transmitted is determined by the response from the FTP host. Therefore, interpretation of the wildcard depends on the remote FTP host.

JP1/FTP supports *, ?, and [] as wildcard characters. Wildcard characters cannot be used in directory names. If a directory name contains a wildcard, set Single/Multiple-file transmission to Single-file.

About the specification of remote files:
  • Browse displays files as viewed from the local system. For the remote file name, specify a file name that is viewed from the remote system.

  • If Japanese characters (double-byte character codes) are specified for the remote file name, the remote FTP host might refuse access or the characters in the file name might become garbled in some cases.

About the directory delimiter:

The directory delimiter \ is treated as part of a file name.

When specifying a relative path:

For both sending and receiving, the specified path is relative to the current directory.

Program to start at normal end

((0 to 256-byte character string))

Specifies the full path name of a program to start automatically at the client when transmission terminates normally. You can also specify arguments to pass as transmission information to the program when the program starts. For details about the arguments, see Parameter keywords in 3.3.1 Registering auto-start programs.

Program to start at abnormal end

((0 to 256-byte character string))

Specifies the full path name of a program to start automatically at the client when transmission terminates abnormally. You can also specify arguments to pass as transmission information to the program when the program starts. For details about the arguments, see Parameter keywords in 3.3.1 Registering auto-start programs.

FTP command

((0 to 300-byte character string))

Specifies an FTP command to be executed prior to transmission after connection is established with the host. To specify multiple commands, separate them with a semicolon (;).

Example: CWD /home/user1;SITE xxxx

You can specify only commands that do not establish a data connection. Whether the specified commands can be executed at the FTP server depends on the FTP server.

When the FTP server is JP1/FTP:

  • Major commands that can be specified:

    CDUP, CWD, DELE, HELP, MDTM, MKD, NOOP, PWD, RMD, SITE, SIZE, STAT, SYST, XCUP, XCWD, XMKD, XPWD, XRMD

  • Commands that can reference the result by means of a protocol trace:

    HELP, MDTM, SIZE, STAT, SYST

About the specification of FTP commands:

  • Some commands require consecutive command transmission. Before using commands, check the FTP specifications.

  • If you use a command accompanied by an argument, note the following: If Japanese characters (double-byte character codes) are specified for the argument, the remote FTP host might refuse access or the characters in the file name might become garbled in some cases.

Comment

((0 to 80-byte character string))

Specifies any comment. Because the comment is displayed in the log information, this option is useful for setting a memo about the transmission. A comment is not passed to the transmission target.

FTPS enable

Specifies whether to use FTPS. When FTPS is not used, the usual FTP is used.

Server certificate expiration check

Specifies whether to check the expiration date of the server certificate used with FTPS. If you enable the checking, the transmission of files with the expired server certificate ends in failure.

Path name of the CA certificate

((0 to 256-byte character string))

Specifies a full path to the file containing the CA certificate used with FTPS.

Path name of the CRL

((0 to 256-byte character string))

Specifies a full path to the file containing the CRL used with FTPS.

Note about the specification of "Program to start at normal end" and "Program to start at abnormal end"

If an argument contains the character \, be aware that some programs might interpret this character as an escape symbol.

Standard input/output

The standard input/output is closed. You can allocate the standard input/output to files. For details, see the JP1FTS_AUTO_STDIO environment variable listed in Table 3-2 in 3.1.3 Using environment variables to define a JP1/FTP environment.

Environment for the process

The JP1/FTP daemon environment is used, not the environment set by .profile of the user who is transmitting the files.

How to start programs when multiple files are transmitted

If a wildcard is used to transmit multiple files, an auto-start program is started as many times as there are file transmissions. Information is inherited to the auto-start program separately for each transmission. The transmission information cannot all be inherited to the auto-start program at once.

Blocking signals

Auto-start programs are started with the signals below masked by sighold(). Therefore, if a program received the following signals, the signals are put on hold:

  • SIGTERM

  • SIGCHLD

  • SIGHUP

By using the environment variable JP1FTS_AUTO_SIGNALMASK_DELETE, auto-start programs can receive the above signals.

The following figure shows an example of using a command to register new transmission information:

[Figure]

This example registers the following information:
  • -TC: The transmission card name is card1.

  • -TH: The connection-target host name is host1.

  • -TU: The login user name is accounting.

  • -TT: The send/receive type is SEND.

  • -TY: The transmission mode is BINARY.

  • -TL: The local file name is /temp/file1.

  • -TR: The remote file name is /temp/file2.

The following figure shows an example of a command that registers transmission information using an existing transmission card:

[Figure]

This example registers the following information:
  • The name of the existing transmission card that is being used is card1.

  • -TC: The name specified for the new transmission card is card2.

  • -TH: The connection-target host name is host1.

  • -TU: The login user name is accounting.

  • -TT: The send/receive type is SEND.

  • -TY: The transmission mode is BINARY.

  • -TL: The local file name is /temp/file1.

  • -TR: The remote file name is /temp/file2.

For details about the ftsregc command, see ftsregc - registers, changes, deletes, and displays transmission information in 6. Commands.