Technical

Tips

How to Specify the Receive File Name from the Sending Host

Introduction

When you transfer files by using HULFT, sometimes you might want to dynamically change the receive file name to match the send file name, or you might want to specify the receive file name from the sending host. Today, we're going to show you how you can replace the receive file name.

Advance Preparation

The following items must be specified in the HUFLT System Environment Settings in order to dynamically specify receive file names:

Dynamic Parameter: Enable Dynamic Specification

Message Dynamic Parameter Specification: Always Replace Messages and Variables

Specify the Receive File Name to Match the Send File Name

When you use HULFT to transfer a file, you need to specify the file name in Management Information on both the sending host and the receiving host. However, by using HULFT environment variables, you can also change the file name on the receiving host to be the same as the file name on the sending host.

Let's try it now.

1. Create Send Management Information.
2. Create Receive Management Information. For File Name, specify $SNDFILE. For Receive Mode, specify Single Receive.
3. Send a file, and confirm in the console that the send file name and the receive file name are the same.
4. Confirm that the send file and the receive file are the same.
Dynamically Specify the Receive File Name

By dynamically specifying the receive file name, you can specify a receive file name of your choice from the sending host. The method for doing this is different from the one used above.

This method is also very simple. In Receive Management Information, just specify $MSG0-$MSG5, $MSGL0-$MSGL1 for File Name.

Let's try it now.

1. Create Send Management Information.
2. Create Receive Management Information. For File Name, specify $MSG0. For Receive Mode, specify Single Receive.
3. For the message argument of the utlsend command, specify "test" for the receive file name.
4. In the console, confirm that the receive file has the file name that you specified for the message argument.
5. Confirm that the send file and the receive file are the same.
Conclusion

So, what do you think? By changing the receive file name to match the send file name, or by specifying a receive file name of your choice, you have more freedom in the file names you use during operations.

If you'd like to know more about replacing file names, see the Operation Manual.

Please use this replacement function to help you in your operations.