Message transmission

It is possible to transmit what is called "message" at the same time as when a file is transferred from the Send system to the Receive system. You can use the message to output arbitrary information to the Send Log file and the Receive Log file, to change various specifications in the management information dynamically (for instance, change the Receive file name dynamically), to pass information to a startup job as an environment variable, and so on.

(1) Message Transmission Function

To transmit a message, specify a parameter for the message in the issued request command. The message should be specified in the Send File command (utlsend.exe) when sending, while it should be specified in the Send Request command (utlrecv.exe) when executing the Send Request.

To dynamically modify the setting values in the management information using messages, use the following environment variables, which will replace the values to be modified.

'$MSG0' to '$MSG5'

You can specify a message up to 50 bytes for each of the six variables from '$MSG0' to '$MSG5.'

They are replaced with the messages specified for parameters -msg0 to -msg5 in the Send File command or the Send Request command.

'$MSGL0' to '$MSGL1'

You can specify a long message up to 200 bytes for each of the two variables from '$MSGL0' to '$MSGL1.'

They are converted to the long messages specified for parameters -msgl0 to -msgl1 in the Send File command or the Send Request command.

 

When the environment variable that is specified in the management information is not specified on the sending side, it is handled as a 0 byte message on the receiving side.

To replace messages, Message Dynamic Parameter Specification (msgdynparam) of the System Environment Settings should be made effective. For details on the System Environment Settings, refer to System Environment Settings.

Note

When carrying out replacement with a message that was specified on the sending side, in the following cases, an error occurs before the execution of file transfer:

  • The size of the replacement result exceeds the number of bytes that is allowed for the field in the management information

  • The message cannot be applied as a file name when the variable for File Name is to be replaced with the message

(2) Information that can be specified in messages

The following list shows the settings and IDs in the management information that can be specified by replacement with message:

[Send Management Information]
  • Send File Name

  • Transfer Group ID

  • Pre-send Job ID

  • Successful Job ID

  • Format ID

  • Multi Format ID

  • Mail Interface ID

[Receive Management Information]
  • Receive File Name

  • Successful Job ID

  • Transfer Group ID

  • Mail Interface ID

[Job Information]
  • Argument of Startup Jobs

[Mail Interface Information]
  • Title

  • Address

  • CC

  • Text

Note

Each setting value or ID of HULFT for Mainframe and HULFT for IBMi is registered in uppercase alphabetic characters. If you specify the messages in lowercase alphabetic characters, the messages remain in lower case. When specifying a message that is to be replaced with setting values and IDs, specify the messages in uppercase alphabetic characters.

For details on the replacement of the Receive file name, refer to Operation Manual.

(3) Message replacement process for sending

Figure 2.19 Message Transmission (for Sending)

1) Message transmission instruction from the Send File command

The Send File command issues the Send File request to the Send system. At that time, the request is sent with a file ID and specified messages.

2) Modification to Send Management Information content

The Send system first finds environment variables (from '$MSG0' to '$MSG5' and from '$MSGL0' to '$MSGL1') in the Send Management Information record with the target file ID, and replaces them with the messages (specified with the Send File command as explained in 1) above). The Send system then uses the replaced values when carrying out sending.

3) Message transmission to the receiving side

Before starting the data transfer, the Send system notifies the Receive system of the messages as specified with the Send File command.

4) Setting environment variables for a subsequent job

The Send system assigns the messages that are specified in the Send File program to environment variables ('$MSG0' to '$MSG5' and '$MSGL0' to '$MSGL1') so that, when the job that is specified as the Post-send Job is executed, HULFT can carry out replacement of the contents of the startup job according to the assignment.

(4) Message replacement process for receiving

Figure 2.20 Message Transmission (for Receiving)

1) Acknowledgment of message notification sent from Send system

The Receive system receives the notification of the File ID and the Message from the Send system.

2) Modification to Receive Management Information contents

Based on the notification from the Send system, the Receive system first finds environment variables (from '$MSG0' to '$MSG5' and from '$MSGL0' to '$MSGL1') in the Receive Management Information record with the notified file ID, and replaces them with the notified messages. The Receive system then uses the replaced values when carrying out receiving.

3) Setting environment variables for a subsequent job

The Receive system assigns the messages from the Send system to the corresponding environment variables (from '$MSG0' to '$MSG5' and from '$MSGL0' to '$MSGL1') so that variable substitution can be made in the Job Information record when the Post-receive Job is executed.

(5) Message replacement process for Send Request

Figure 2.21 Message Transmission (for Send Request)

1) Message transmission instruction from the Send Request command

When using the Send Request command, specify a file ID and messages with it. The Send Request command replaces the environment variables (from '$MSG0' to '$MSG5' and from '$MSGL0' to '$MSGL1') with the specified messages when it finds some of the variables in the relevant Receive Management Information record.

2) Issuance of the Send Request

The Send Request command notifies the Send system of the Send File request together with the specified messages.

3) Modification to Send Management Information content

Based on the notification from the Send Request command, the Send system first finds environment variables (from '$MSG0' to '$MSG5' and from '$MSGL0' to '$MSGL1') in the Send Management Information record with the notified file ID, and replaces them with the notified messages. The Send system then uses the replaced values when carrying out sending.

4) Message transmission to the receiving side

Before starting the data transfer, the Send system notifies the Receive system of the messages notified by the Send Request command.

5) Acknowledgment of message notification from the Send system

The Receive system receives the notification of the File ID and the Message from the Send system.

6) Modification to Receive Management Information contents

Based on the notification from the Send system, the Receive system first finds environment variables (from '$MSG0' to '$MSG5' and from '$MSGL0' to '$MSGL1') in the Receive Management Information record with the notified file ID, and replaces them with the notified messages. The Receive system then uses the replaced values when carrying out receiving.

(6) Points to be noted regarding message transmission

Points to be noted when you specify multibyte characters in messages

  • When the language used on the local host is different from the language used on the remote host, if you send a message that contains multibyte characters, the transfer may fail or the message may not be replaced correctly.

  • When the remote host meets one of the following conditions, the only multibyte characters that you can use are Japanese characters:

    • The version of HULFT on the remote host is lower than Ver.8.1.0.

    • The version of HULFT on the remote host is Ver.8.1.0 or higher and "Yes" is specified for Use HULFT7 Comm. Mode for the remote host.