Receiving from multiple hosts
Data of the same type can be received from multiple hosts, and the data from multiple places can be assembled and processed together after receiving. This is called 'Multiple Receive' in HULFT.
In addition, you can extract only the data you need and process it, because the Multiple Receive Information file (FileID.str) manages information about which host the data is received from and where it is stored in the Receive file.
The flow of receiving from multiple hosts is illustrated in Figure 2.15 .
1) Waiting for connection from the sending side
The Receive daemon waits for the connection from the sending side.
2) Starting up the Receive process
When the Receive daemon is connected to from the host on the sending side, the daemon starts a Receive process. A Receive process is started for each connection from the remote host.
3) Carrying out Receive processing
The Receive process receives the data from the sending side. If you specified 'Multiple Receive' in the Receive Management Information, the Receive process receives data in a work file for receiving ('Receive work file') in accordance with the Receive Management Information on the receiving side and with the file information related to the transfer from the sending side. When receiving from multiple hosts, a Receive work file is created for each transfer file, and transmission proceeds in a parallel manner.
4) Accumulating received data in the Receive file
The Receive process writes the data that is in the Receive work files to the Receive file. If an error occurs while data is being received in the Receive work files, HULFT does not write any received data up to that point to the Receive file.
5) Registering Multiple Receive Information
The Receive process registers information such as from which remote host the data was received and where it is saved in the Receive file in the Multiple Receive Information file. This information is not written when the Receive processing ends unsuccessfully.
6) Writing the result to the Receive Log file
After the receiving is complete, the Receive process writes the result of the processing to the Receive Log file (hulrcvlog.db).
7) Starting up the Post-receive Job
The Receive process starts a job that is registered in the Job Information according to the conditions registered in the Receive Management Information. Jobs can be started either when the receiving ends successfully or when it ends unsuccessfully.
This job is started each time the receiving for one of the remote hosts is completed.
8) Writing the result to the Post-receive Job Execution Log file
The Receive process writes the job execution result in the Post-receive Job Execution Log file (hulrcvlog.db).
To extract the received data for each remote host and process it, perform the extraction based on the information in the Multiple Receive Information file (FileID.str).