Issuing a Send File request

To send a file, execute the Send File Issuance command against the Send Acknowledge job.

(1) Send File Issuance command

Program interface

CALL Library name/UTLSEND PARM( ['LIB=Library name'] 'F=fileid' ['P=priority']
['FILE=filename'] ['TGRP=tgrpid'|'H=hostname'] ['SYNC'] ['W=waittime']
['MSG0=message0'] ['MSG1=message1'] ['MSG2=message2'] ['MSG3=message3']
['MSG4=message4'] ['MSG5=message5'] ['MSGL0=lmessage0'] ['MSGL1=lmessage1']
['G'] ['OUTPUT=filename'] ['EXIT' CL variable name])

Explanation of parameters

LIB=Library name

Library name in which HULFT is installed ("HULFT" by default)

Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.

F=fileid

File ID that is used for sending (Mandatory)

Specify this parameter as an alphanumeric character string of 50 bytes or less.

P=priority

Priority of the Send File (Optional)

Specify this parameter within the range of "1" to "256".

Smaller number indicates higher priority.

When omitted, the Transfer Priority registered in the Send Management Information is used.

FILE=filename

Name of the file to be sent (Optional)

For a physical data file, specify the name in the format of Library name/File name(Member name). For an archive file, specify the name in the format of Library name/File name. When omitted, the file name registered in the Send Management Information is used.

TGRP=tgrpid

Transfer Group ID that is used for sending (Optional)

Specify this parameter as an alphanumeric character string of 50 bytes or less.

When omitted, the transfer group ID registered in the Send Management Information is used.

H=hostname

Name of the remote host which is the destination of sending (Optional)

Specify this parameter as an alphanumeric character string of 68 bytes or less.

When omitted, a host name in the specified Transfer Group ID will be set.

MSG0=message0 to MSG5=message5

Messages to be transmitted to the receiving host (Optional)

Specify this parameter as an alphanumeric character string of 50 bytes or less.

When omitted, no message will be transmitted to the host on the receiving side.

You can specify 6 messages at maximum. For example, to transmit message 0, specify a string for "MSG0=" parameter.

MSGL0=lmessage0 to MSGL1=lmessage1

Long message to be transmitted to the receiving host (Optional)

Specify this parameter as an alphanumeric character string of 200 bytes or less.

When omitted, no message will be transmitted to the host on the receiving side.

You can specify 2 messages at maximum. For example, to transmit long message 0, specify a string for "MSGL0=" parameter.

SYNC

Synchronous Transfer Request (Optional)

When omitted, HULFT executes the Send File asynchronously.

W=waittime

Synchronous Transfer Timeout (Seconds) (Optional)

Specify the waiting time to synchronize processing result on executing the Synchronous Transfer. Specify this parameter within the range of "10" to "259200". When it reaches the time that you specified, the application resumes processing even if it is in the middle of sending. If this occurs, note that the transfer result is not returned to the command. When you set "0" for this parameter, HULFT waits for the result infinitely.

To specify this parameter, you must define the "SYNC" parameter.

When omitted, HULFT waits infinitely until the application receives a processing result.

G

Control of error messages that the Send File command outputs (Optional)

When omitted, HULFT displays error messages.

OUTPUT=filename

Destination of the error messages that the Send File command outputs (Optional)

Specify this parameter in the format of Library name/File name(Member name).

When omitted, error messages are not output.

The number of log records that a log file can retain is unlimited.

EXIT CL variable name

Specifies to receive the error code output by the Send File command and specifies the CL variable name to set the error code value (Optional)

The CL variable name must immediately follow the EXIT tag.

HULFT sets an error code to the CL variable only if the command ends unsuccessfully.

When omitted, an error code is not set.

Note
  • When a Pre-send Job is registered in the Send Management Information, note the following points:

    • When the Pre-send Job ends unsuccessfully, the Send File is not executed and the command ends unsuccessfully.

    • Pre-send Job is executed only once in the case of multicasting (sending to multiple hosts).

    • The Pre-send Job is executed even if there is an error in the Send Management Information settings (omission of the Transfer Group, absence of the specified record of the Host Information etc.).

  • When the wait time in the Synchronous Transfer Request is longer than the value that is set for the Socket Read Timeout (SOCKTIME), the socket connection may be cut off before the processing result is returned.

  • If the Send File request is issued in Synchronous Transfer mode and an auto resend is performed after a communication error occurs, the Send File command does not end until the resending operation is complete.

  • To assign messages that are specified for the parameters from MSG0 to MSG5 and from MSGL0 to MSGL1, you must specify "1", "2", or "3", for Message Dynamic Parameter Specification (MSGDYNPARM) in the System Environment Settings.

    Depending on the language setting of a remote host, the messages may not be assigned properly and the replacement messages may cause transfer to end with an error.

    For notes on message transmissions, refer to Administration Manual.

  • HULFT handles the replacement messages that are assigned by parameters from MSG0 to MSG5 and from MSGL0 to MSGL1 in accordance with the CCSID (Coded Character Set Identifier) that is specified for HULFT Character Set (HULCHARSET) of the System Environment Settings. When you want to handle the data using the same character set as the one used in HULFT for IBMi lower than Ver.8, modify the value of the Character Set Options for Messages (CHARSETOPTMSG) of the System Environment Settings.

    For details of settings, refer to the explanation on the System Environment Settings in Administration Manual.

= Remarks =

You cannot specify parameters "TGRP=" and "H=" at the same time.

Command interface

UTLSEND FILEID( ) PRIORITY( ) DYNAFILE( ) DYNAMBR( ) DYNAFATR( ) DYNATGRP( )
DYNAHOST( ) MSG0( ) MSG1( ) MSG2( ) MSG3( ) MSG4( ) MSG5( ) MSGL0( ) MSGL1( )
SYNC( ) WAITTIME( ) LIBRARY( ) MSG( ) FILE( ) MBR( )

Explanation of parameters

FILEID

File ID that is used for sending (Mandatory)

Specify this parameter as an alphanumeric character string of 50 bytes or less.

PRIORITY

Priority of the Send File (Optional)

Specify this parameter within the range of "001" to "256".

When omitted, the Transfer Priority registered in the Send Management Information is used.

DYNAFILE

Name of the file to be sent (Optional)

Specify this parameter in the format of Library name/File name.

Specify these names as an alphanumeric character string of 10 bytes or less starting with an alphabet, respectively.

When omitted, the file name registered in the Send Management Information is used.

DYNAMBR

Member name of the file to send ("*FILE" by default)

Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.

When omitted, the same file name as the file that is specified for the DYNAFILE parameter is used.

DYNAFATR

Attribute of the file to send (*PF by default)

*PF :

Physical file

*SAVF :

Archive file

If you specify "*SAVF" for this parameter, HULFT does not use the value of the DYNAMBR.

DYNATGRP

Transfer Group ID that is used for sending (Optional)

Specify this parameter as an alphanumeric character string of 50 bytes or less.

When omitted, the transfer group ID registered in the Send Management Information is used.

DYNAHOST

Destination host name of sending (Optional)

Specify this parameter as an alphanumeric character string of 68 bytes or less.

When omitted, the transfer group ID registered in the Send Management Information is used.

MSG0 to MSG5

Messages to be transmitted to the receiving host (Optional)

Specify this parameter as an alphanumeric character string of 50 bytes or less.

When omitted, no message will be transmitted to the host on the receiving side.

MSGL0 to MSGL1

Messages to be transmitted to the receiving host (Optional)

Specify this parameter as an alphanumeric character string of 200 bytes or less.

When omitted, no message will be transmitted to the host on the receiving side.

SYNC

Synchronous Transfer Request ("*NO" by default)

*NO :

Asynchronous Transfer

*YES :

Synchronous Transfer

WAITTIME

Synchronous Transfer Timeout (Seconds) (Optional)

Specify the waiting time to synchronize processing result on executing the Synchronous Transfer. Specify this parameter within the range of "000010" to "259200". When you set "000000" for this parameter, HULFT waits for the result infinitely.

To specify this parameter, you must define the "SYNC(*YES)" parameter.

When omitted, HULFT waits infinitely until the application receives a processing result.

LIBRARY

Library name in which HULFT is installed ("HULFT" by default)

Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.

MSG

Control of error messages ("*YES" by default)

*NO :

Suppress error messages.

*YES :

Show error messages.

FILE

Name of the library and the file to which error messages are output (Optional)

Specify this parameter in the format of Library name/File name.

Specify these names as an alphanumeric character string of 10 bytes or less starting with an alphabet, respectively.

When omitted, error messages are not output. The number of log records that a log file can retain is unlimited.

MBR

Member name of the file to which error messages are output ("*FILE" by default)

Specify this parameter as an alphanumeric character string of 10 bytes or less starting with an alphabet.