1 SUBROUTINE GETNTBE
( LUNT
, IFXYN
, LINE
, IRET
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: ATOR ORG: NP12 DATE: 2007-01-19
8 C ABSTRACT: THIS SUBROUTINE GETS THE FIRST LINE OF THE NEXT ENTRY IN
9 C THE SPECIFIED ASCII MASTER TABLE B OR MASTER TABLE D FILE. THIS
10 C LINE CONTAINS, AMONG OTHER THINGS, THE FXY NUMBER CORRESPONDING TO
13 C PROGRAM HISTORY LOG:
14 C 2007-01-19 J. ATOR -- ORIGINAL AUTHOR
16 C USAGE: CALL GETNTBE ( LUNT, IFXYN, LINE, IRET )
17 C INPUT ARGUMENT LIST:
18 C LUNT - INTEGER: FORTRAN LOGICAL UNIT NUMBER OF ASCII FILE
19 C CONTAINING MASTER TABLE B OR MASTER TABLE D INFORMATION
21 C OUTPUT ARGUMENT LIST:
22 C IFXYN - INTEGER: BIT-WISE REPRESENTATION OF FXY NUMBER FOR
24 C LINE - CHARACTER*(*): FIRST LINE OF NEXT TABLE ENTRY
25 C IRET - INTEGER: RETURN CODE:
27 C -1 = end-of-file encountered while reading
29 C -2 = I/O error encountered while reading
33 C THIS ROUTINE CALLS: BORT2 IGETNTBL IGETFXY IFXY
35 C THIS ROUTINE IS CALLED BY: RDMTBB RDMTBD
36 C Normally not called by any application
40 C LANGUAGE: FORTRAN 77
41 C MACHINE: PORTABLE TO ALL PLATFORMS
46 CHARACTER*128 BORT_STR1
, BORT_STR2
50 C-----------------------------------------------------------------------
51 C-----------------------------------------------------------------------
53 C Get the first line of the next entry in the file.
55 IRET
= IGETNTBL
( LUNT
, LINE
)
56 IF ( IRET
.EQ
. 0 ) THEN
58 C The first field within this line should contain the
61 CALL PARSTR
( LINE
(1:20), TAGS
, 4, NTAG
, '|', .FALSE
. )
62 IF ( NTAG
.LT
. 1 ) GOTO 900
63 IF ( IGETFXY
( TAGS
(1), ADSC
) .NE
. 0 ) GOTO 900
65 C Store the bit-wise representation of the FXY number.
72 900 BORT_STR1
= 'BUFRLIB: GETNTBE - CARD BEGINNING WITH: ' //
74 BORT_STR2
= ' HAS BAD OR MISSING FXY NUMBER'
75 CALL BORT2
(BORT_STR1
,BORT_STR2
)