title: Do periods count as numerics (COBOL)
body: <p>I am working on a bit of code at home and that is suppose to find and identify errors is a input file. I got it just about right, but two little errors are hitting me. The major problem though is this. I have to make a code that identifies "3077.B22" as an error because the first 5 columns are suppose to be numeric, but my current code is letting it pass. It hits every thing else though so I have to believe that it is seeing the period as a decimal point. Here is what I got that concerns to this part.</p>
  
  <pre><code>   01  PART-NUMBER-CHECK.
         05 P-N-NUM-1                PIC X(5).
         05 P-N-LETTER               PIC X.
         05 P-N-NUM-2                PIC XX.
  
     300-VALIDATE-PART-NUMBER.
         MOVE 'NO' TO FIELD-ERROR-SWITCH
         MOVE PART-NUMBER TO PART-NUMBER-CHECK
         EVALUATE P-N-NUM-1
             WHEN 00001 THRU 99999  CONTINUE
  
             WHEN OTHER              MOVE 'YES' TO FIELD-ERROR-SWITCH
         END-EVALUATE
         IF P-N-LETTER IS NUMERIC
             MOVE 'YES' TO FIELD-ERROR-SWITCH
         END-IF
         IF P-N-LETTER IS ALPHABETIC-LOWER
             MOVE 'YES' TO FIELD-ERROR-SWITCH
         END-IF
         IF P-N-NUM-2 IS ALPHABETIC
             MOVE 'YES' TO FIELD-ERROR-SWITCH
         END-IF
         IF (P-N-NUM-2 &gt; 00 AND &lt; 69)
             OR (P-N-NUM-2 &gt;77 AND &lt; 100)
                 CONTINUE
         ELSE
             MOVE 'YES' TO FIELD-ERROR-SWITCH
         END-IF
         IF FIELD-ERROR-SWITCH = 'YES'
             MOVE 'YES' TO RECORD-ERROR-SWITCH
             MOVE 'Part Number' TO FIELD-NAME
             MOVE PART-NUMBER TO FIELD-VALUE
             PERFORM 400-WRITE-DETAIL-LINE
         END-IF.
  </code></pre>
  
  <p>My second problem is similar cause it is seeing an * in another field as a alphabetic.
  Here is the paragraph to that:</p>
  
  <pre><code>   340-VALIDATE-INITIAL.
         MOVE 'NO' TO FIELD-ERROR-SWITCH
         INSPECT INITIALS
             TALLYING I-CHECK FOR ALL SPACES
         IF I-CHECK &gt; 0
             MOVE 'YES' TO FIELD-ERROR-SWITCH
             MOVE 0 TO I-CHECK
         END-IF
         IF INITIALS IS NUMERIC
             MOVE 'YES' TO FIELD-ERROR-SWITCH
         END-IF
         IF FIELD-ERROR-SWITCH = 'YES'
             MOVE 'YES' TO RECORD-ERROR-SWITCH
             MOVE 'Initials' TO FIELD-NAME
             MOVE INITIALS TO FIELD-VALUE
             PERFORM 400-WRITE-DETAIL-LINE
         END-IF.
  </code></pre>
  
  <p>Please help, I am done as soon as I get over this little bump in the road.</p>