3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 1994-01-06
8 C ABSTRACT: THIS FUNCTION CHECKS A MNEMONIC TO VERIFY THAT IT HAS A
9 C LENGTH OF BETWEEN ONE AND EIGHT CHARACTERS AND THAT IT ONLY
10 C CONTAINS CHARACTERS FROM THE ALLOWABLE CHARACTER SET.
12 C PROGRAM HISTORY LOG:
13 C 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR
14 C 2003-11-04 J. ATOR -- ADDED DOCUMENTATION
15 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
17 C 2003-11-04 D. KEYSER -- SPLIT NON-ZERO RETURN INTO -1 FOR LENGTH
18 C NOT 1-8 CHARACTERS AND -2 FOR INVALID
19 C CHARACTERS (RETURN ONLY -1 BEFORE FOR ALL
20 C PROBLEMATIC CASES); UNIFIED/PORTABLE FOR
21 C WRF; ADDED HISTORY DOCUMENTATION
23 C USAGE: NEMOCK (NEMO)
24 C INPUT ARGUMENT LIST:
25 C NEMO - CHARACTER*(*): MNEMONIC TO BE CHECKED
27 C OUTPUT ARGUMENT LIST:
28 C NEMOCK - INTEGER: INDICATOR AS TO WHETHER NEMO IS VALID:
30 C -1 = no, length not between 1 and 8 characters
31 C -2 = no, it does not contain characters from the
32 C allowable character set
35 C THIS ROUTINE CALLS: None
36 C THIS ROUTINE IS CALLED BY: RDUSDX SEQSDX SNTBBE SNTBDE
37 C Normally not called by any application
41 C LANGUAGE: FORTRAN 77
42 C MACHINE: PORTABLE TO ALL PLATFORMS
49 DATA CHRSET
/'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.'/
52 C-----------------------------------------------------------------------
53 C-----------------------------------------------------------------------
55 C GET THE LENGTH OF NEMO
56 C ----------------------
61 IF(NEMO
(I
:I
).NE
.' ') THEN
67 1 IF(LNEMO
.LT
.1 .OR
. LNEMO
.GT
.8) THEN
72 C SCAN NEMO FOR ALLOWABLE CHARACTERS
73 C ----------------------------------
77 IF(NEMO
(I
:I
).EQ
.CHRSET
(J
:J
)) GOTO 10