SUBROUTINE DB_CKRP ( dburpt, igrsz, mszrpt, iret ) C************************************************************************ C* DB_CKRP * C* * C* This subroutine checks the length of the groups within the report. * C* If the length of a group is less than 3 characters or more than the * C* max number of characters allowed for a group within the report, then * C* the group and all the groups that follow it are tossed out. * C* * C* DB_CKRP ( DBURPT, IGRSZ, MSZRPT, IRET ) * C* * C* Input parameters: * C* DBURPT CHAR* Current report * C* IGRSZ INTEGER Maximum size of group * C* * C* Input and output parameters: * C* MSZRPT INTEGER Length of report * C* * C* Output parameters: * C* IRET INTEGER Return code * C* 0 = normal return * C* 1 = report rejected * C* * C** * C* Log: * C* R. Hollern/NCEP 12/99 * C* C. Caruso Magee/NCEP 03/2000 remove print of bulletin header * C************************************************************************ INCLUDE 'dbcmn.cmn' C* CHARACTER*(*) dburpt C* LOGICAL more C----------------------------------------------------------------------- iret = 0 more = .true. iloc = 0 ict = 0 imxsz = igrsz + 1 C C* Find first blank which comes after report ID. C DO WHILE ( more ) C iloc = iloc + 1 IF ( iloc .gt. 10 ) THEN loglvl = 3 CALL DC_WLOG ( loglvl, 'DB', 1, dburpt(1:mszrpt), ier ) iret = 1 RETURN END IF C IF ( dburpt (iloc:iloc ) .eq. ' ' ) more = .false. END DO C more = .true. C DO WHILE ( more ) ict = ict + 1 iloc = iloc + 1 IF ( dburpt ( iloc:iloc ) .eq. ' ' .or. + iloc .ge. mszrpt ) THEN IF ( ict .lt. 4 .or. ict .gt. imxsz ) THEN C C* The group is bad. Reject the rest of the report. C loglvl = 3 CALL DC_WLOG ( loglvl, 'DB', -3, dburpt(1:mszrpt), + ier ) mszrpt = iloc - ict IF ( mszrpt .lt. 20 ) iret = 1 RETURN ELSE ict = 0 END IF END IF IF ( iloc .ge. mszrpt ) RETURN END DO C* RETURN END