NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fi66.f File Reference

Office note 29 report blocker. More...

Go to the source code of this file.

Functions/Subroutines

subroutine w3fi66 (cocbuf, cocblk, nflag, nsize)
 Blocks reports which have been packed into nmc office note 29 character format into fixed-length records.
 

Detailed Description

Office note 29 report blocker.

Author
L. Marx
Date
1990-01

Definition in file w3fi66.f.

Function/Subroutine Documentation

◆ w3fi66()

subroutine w3fi66 ( character*10, dimension(*)  cocbuf,
character*10, dimension(*)  cocblk,
  nflag,
  nsize 
)

Blocks reports which have been packed into nmc office note 29 character format into fixed-length records.

A report cannot span two records; If there is not enough room to fit the current report in the record, the subroutine returns to the calling program without any movement of data.

Program history log:

  • L. Marx 1990-01 Converted code from assembler to vs fortran; Expanded error return codes in 'NFLAG'.
  • Dennis Keyser 1991-08-23 Use same arguments as w3ai05(); streamlined code; Docblocked and commented; diag- nostic print for errors.
  • Dennis Keyser 1992-06-29 Convert to cray cft77 fortran.
Parameters
[in]COCBUFArray containing a single packed report in office note 29/124 format.
[in]NFLAGMarker indicating relative location (in bytes) of end of last report in COCBLK. Exception: NFLAG must be set to zero prior to blocking the first packed report into a new block. Subsequently, the value of NFLAG returned by the previous call to w3fi66() should be used as input. (see output argument list below.) If NFLAG is negative, w3fi66() will return immediately without action.
[in]NSIZEMaximum number of characters in COCBLK array (should be a multiple of 4)
[in,out]COCBLKArray holding a block of packed reports up to and including the previous (IN) / current (OUT) one ag marker indicating relative location (in bytes) of end of current report in COCBLK. NFLAG will be set to -1 if w3fi66() cannot fit the current packed report into the remainder of the block (i.e., the block is full). NFLAG will not change from its input argument value if the string "end report" is not found at the end of the current report. (current packed report has invalid length and is not blocked)
Note
The user must set NFLAG to zero each time the array is to be filled with packed reports in office note 29/124 format. w3fi66() will then insert the first report and fill the remainder of the output array COCBLK with the string 'end record'.

An attempt is made to insert a report in the output array each time w3fi66() is called. If the remaining portion of the output array is not large enough to hold the current report, w3fi66() sets NFLAG to -1. The user should then output the blocked record, set NFLAG to zero, and call w3fi66() again with the same report in the input array.

After a given report is successfully blocked into COCBLK, w3fi66() sets NFLAG as a pointer for the next report to be blocked. this pointer is a relative address and a character count.

The three characters specifying the length of the report are checked for valid character numbers and the value is tested for pointing to the end of the report (string "end report"). If invalid, the report is not inserted into the block and there is an immediate return to the user. In this case, the value of NFLAG does not change from its input value.

Note
Entry w3ai05() duplicates processing in w3fi66() since no assembly language code in cray w3lib.
Author
L. Marx
Date
1990-01

Definition at line 69 of file w3fi66.f.