NCEPLIBS-w3emc 2.12.0
|
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. | |
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:
[in] | COCBUF | Array containing a single packed report in office note 29/124 format. |
[in] | NFLAG | Marker 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] | NSIZE | Maximum number of characters in COCBLK array (should be a multiple of 4) |
[in,out] | COCBLK | Array 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) |
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.