Software Reference Manual - NetEx
Software Reference Manual - NetEx
Software Reference Manual - NetEx
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4. The record module may return an informational message, an abnormal end message, or an end of information<br />
message. If the message indicates an end of transfer, the record module will have already closed<br />
the file. Forward the message to the control module and free any storage if an end message was passed<br />
up.<br />
5. The control module may call with an abnormal end indication based on a loss of communications or an<br />
abort issued by the receiving BFX module. In that case, call the record module with an abnormal end indication.<br />
On return, the file should have been closed. Free any allocated storage areas and return to the<br />
control module for the last time.<br />
Receiving Record Module (RRM)<br />
The receiving record module is actually responsible for the QSAM I/O that will put the logical records in the<br />
file designated by the user. It opens the file, determines record format and logical record formatting requirements,<br />
and issues PUT macros to write the data when it is delivered by the block module. If I/O errors occur,<br />
it is responsible for analyzing the errors, determining if the error is fatal or not, and returning a comprehensible<br />
error message to the block module in the event of an I/O error.<br />
The BFX default receiving record module operates as follows:<br />
1. When the receiving record module receives control for the first time, it opens the file whose DDNAME is<br />
passed to it from the block module. Using the LRECL parameter produced as a result of the OPEN, it returns<br />
the maximum logical record length to the block module. If the specified BLOCK= parameter is not<br />
large enough to accommodate the largest logical record, then the RCV module will adjust the value of<br />
BLOCK upwards. If the open for the file does not succeed, then the record module will return an open<br />
failure message to the block module for logging.<br />
2. Subsequent calls to the record module will provide the address and length of the logical record. The record<br />
module will PUT (WRITE for VBS format) this record to the file, adding V-format header information<br />
if needed. If record type conversion is called for, then it will truncate or pad the record before it is<br />
written.<br />
3. If the record module is called with an error or EOF indication, then the record module will close the file<br />
and return to the block module.<br />
Sending Record Module (SRM)<br />
The sending record module is responsible for reading logical records from the file to be sent over the network.<br />
On the first call, it will open the file for input. Subsequently, it will provide a logical record every time it is<br />
called. When end of file is reached or a permanent error is detected in reading the file, then it will close the<br />
file, generate a termination message, and return.<br />
SRM flow of control proceeds as follows:<br />
1. When the sending record module receives control for the first time, it opens the file whose DDNAME is<br />
passed to it from the block module. Using the LRECL parameter produced as a result of the OPEN, it returns<br />
the maximum logical record length to the block module. If the specified BLOCK= parameter is not large<br />
enough to accommodate the largest logical record, then the SND module will adjust the value of BLOCK upwards.<br />
If the open for the file does not succeed, then the record module will return an open failure message to<br />
the block module for logging.<br />
2. Subsequent calls to the record module will provide the address and length in which the logical record is to<br />
be placed. The record module will GET the record into this block module provided area.<br />
3. If the record module is called with an error or EOF indication, then the record module will close the file<br />
and return to the block module.<br />
Page 88 Appendix B: BFX Internal Summary MAN-REF-H211-05