Message transmission
When files are transferred from the Send system to the Receive system, it is possible to simultaneously send optional messages.
Messages can be used for the following operations:
-
Output to the Send Log and the Receive Log
-
Dynamic change of various management information
Example: Dynamic change of the Receive file
-
Passing environment variables to Post-send Jobs or Post-receive Jobs
Message Transmission Function
To transmit a message for the Send File, specify the message on the definition card of the Send File program (XRSNDGO).
To transmit a message for the Send Request, specify the message on the definition card of the Send Request program (XRRCVREQ).
To use messages to dynamically modify settings in the management information, use the following environment variables so that the settings to be modified are replaced with messages:
&MSG0 to &MSG5
You can specify a message of up to 50 bytes for each of the six environment variables from &MSG0 to &MSG5.
These variables are replaced with the messages specified with parameters MSG0 to MSG5 in the XRCRD definition card of the Send File program (XRSNDGO) or the Send Request program (XRRCVREQ).
&MSGL0 to &MSGL1
You can specify a message of up to 200 bytes for each of the two environment variables &MSGL0 and &MSGL1.
These variables are replaced with the messages specified with parameters MSGL0 and MSGL1 in the XRCRD definition card of the Send File program (XRSNDGO) or the Send Request program (XRRCVREQ).
When the environment variable specified in the management information is not specified on the sending side, it is handled as 0-byte message on the receiving side.
To carry out replacement with message, the Message Dynamic Parameter Specification (MSGDYNPARM) in the System Environment Settings should be set to enable replacement. For details about the System Environment Settings, refer to System Environment Settings.
Single-byte code in messages is handled as Japan (Latin) Extended for IBM
-
When replacement with the message specified on the side sending the message is carried out, an error occurs before the execution of file transfer if the byte count of the message exceeds the value allowed for the management information.
-
You cannot describe multiple messages consecutively or use a combination of a message and a static string in the JCL Library (DSNAME) or the Member Names (MEMBER DEF - DEFEND) in the Job Information.
Wrong: &MSG0.JCL
Correct: &MSG0
Information which 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]
-
-
Mainframe DSN
-
Volume Serial
-
UNIT
-
Work Volume Serial
-
Transfer Group ID
-
Pre-send Job ID
-
Successful Job ID
-
Format ID
-
Multi Format ID
-
- [Receive Management Information]
-
-
Mainframe DSN
-
Volume Serial
-
UNIT
-
Transfer Group ID
-
Successful Job ID
-
- [Job Information]
-
-
JCL Library
-
Member Names
-
For HULFT for Mainframe or HULFT for IBMi, each setting or ID is registered in uppercase alphabetic characters. Messages specified in lowercase alphabetic characters are used as they are. Specify messages in uppercase alphabetic characters when specifying a message that is to replace a setting or ID.
Replacement with Message Processing for Sending

Figure 2.19 Message Transmission (of Sending)
1) Message transmission order from Send File program (XRSNDGO)
The Send File program (XRSNDGO) executes the Send File to the Send system after the program specifies the file ID and messages.
2) Modification of Send Management Information content
The Send system replaces '&MSG0' to '&MSG5' and '&MSGL0' to '&MSGL1' that are specified in the Send Management Information of the specified File ID with the messages specified in the Send File program (XRSNDGO). The Send processing is carried out according to the strings that replaced the variables.
3) Message transmission to host on receiving side
The Send system sends the messages which are specified in the Send File program (XRSNDGO) to the Receive program (XRRCV) before the file transfer starts.
4) Setting of environment variables of Post-send Job
The Send system specifies the messages specified in the Send File program (XRSNDGO) for the environment variables ('&MSG0' to '&MSG5' and '&MSGL0' to '&MSGL1') so that the Post-send Job can replace the variables in the Job Information with the specified messages.
Replacement with Message Processing for Receiving

Figure 2.20 Message Transmission (of Receiving)
1) Acknowledgment of message notification
The Receive system receives the notification of the File ID and messages from the Send system.
2) Modification to Receive Management Information content
The Receive system replaces '&MSG0' to '&MSG5' and '&MSGL0' to '&MSGL1' that are specified in the Receive Management Information of the File ID which is sent from the Send system with the messages. The Receive processing is carried out according to the strings that replaced the variables.
3) Setting of environment variables of Post-receive Job
The Receive system specifies the messages sent from the Send system for the environment variables ('&MSG0' to '&MSG5' and '&MSGL0' to '&MSGL1') so that the Post-receive Job can replace the variables in the Job Information with the specified messages.
Replacement with Message Processing for Send Request

Figure 2.21 Message Transmission (of Send Request)
1) Message transmission order from Send Request program (XRRCVREQ)
The Send Request program (XRRCVREQ) specifies the File ID and messages. The Send Request program (XRRCVREQ) replaces '&MSG0' to '&MSG5' and '&MSGL0' to '&MSGL1' that are specified in the Receive Management Information with the specified messages.
2) Execution of Send Request
The Send Request program (XRRCVREQ) also sends the specified messages to the Send system when it executes the Send Request.
3) Modification of Send Management Information content
The Send system replaces '&MSG0' to '&MSG5' and '&MSGL0' to '&MSGL1' that are specified in the Send Management Information of the File ID which is sent from the Send Request program (XRRCVREQ) with the messages. The Send processing is carried out according to the strings that replaced the variables.
4) Message transmission to host on receiving side
The Send system sends the messages which are sent from the Send Request program (XRRCVREQ) to the Receive system before the file transfer starts.
5) Acknowledgment of message notification
The Receive system receives the notification of the File ID and messages from the Send system.
6) Modification to Receive Management Information content
The Receive system replaces '&MSG0' to '&MSG5' and '&MSGL0' to '&MSGL1' that are specified in the Receive Management Information of the File ID which is sent from the Send system with the messages. The Receive processing is carried out according to the strings that replaced the variables.
Points to be Noted Regarding Message Transmission
Points to be noted when a message contains multibyte characters
-
When the languages of the local host and the remote host are different, if you send a message that contains multibyte characters, the transfer may be terminated unsuccessfully or the message may not be converted correctly.
-
Only Japanese multibyte characters can be used in the following cases:
-
The remote host is HULFT lower than Ver.8.1.0.
-
The remote host is HULFT Ver.8.1.0 or higher and 'Yes' is specified for the Use HULFT7 Comm. Mode of the remote host.
-