08.11.2014 Views

Software Reference Manual - NetEx

Software Reference Manual - NetEx

Software Reference Manual - NetEx

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FORTRAN Entry<br />

The entry to the record module should be declared as shown in Figure 17<br />

SUBROUTINE rmod (BUF,BUFLEN,BUFLEV,MSG,MSGLEN,MSGLEV,<br />

+ RPARM,MODE,DDNAME)<br />

type BUF(1)<br />

INTEGER*4 BUFLEN,BUFLEV,MSGLEN,MSGLEV,MODE<br />

CHARACTER*128 MSG<br />

CHARACTER*64 RPARM<br />

CHARACTER*8 DDNAME<br />

. FORTRAN Record Module Entry Parameters<br />

Figure 17. FORTRAN Record Module Entry Parameters<br />

The following parameters appear in Figure 17<br />

rmod<br />

This parameter is the record module name.<br />

BUF<br />

This parameter specifies the start of the logical record information. For a receiving record module,<br />

the logical record information will start at the beginning of the BUF array. For a sending record<br />

module, the record should be placed starting at the beginning of the BUF array.<br />

BUFLEN<br />

BUFLEV<br />

This parameter specifies the length of the logical record in bytes. When the record module is called<br />

for the first time, BUFLEN will have the maximum logical record length permissible with the user’s<br />

BLOCK parameter. If the record module decides this value it can change the value of BUFLEN (and<br />

hence the BFX buffer size) before returning to the block module. On subsequent calls, the receiving<br />

record module will obtain the logical record length in this parameter. Sending block modules should<br />

specify the length of the outgoing record with this variable.<br />

This parameter specifies a binary number that contains the delimiter level of the record to be sent or<br />

accepted. This is a binary value in the range of 0 to 15. Normally, this value is one to indicate the<br />

normal end of a logical record. A value of 15 indicates that this record is to be the last record transferred,<br />

referred to as End of Information in the BFX specifications. Intermediated values are used by<br />

computer operating systems that have a hierarchy of end delimiters in their file structure, such as the<br />

EOR, EOF, and EOI indications in CDC CYBER data files.<br />

BUFLEV has a second use: to signal when the record module is entered for the first time. On that<br />

first entry, BUFLEV will have a value of -1. On all other entries, it will have a value greater than or<br />

equal to zero. Thus BUFLEV < 0 can be used as a conclusive test for first time (initialization) entry<br />

to the record module.<br />

If the record module is receiving data, then BUFLEV will contain the delimiter level of the file delimiter<br />

following the record provided in BUF. A record may or may not accompany this delimiter; if it<br />

does not, then BUFLEN will be set to zero. If the passed BUFLEV is 15, then this will be the last<br />

Page 60 Appendix A: User Modules MAN-REF-H211-05

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!