Question:

Cobol- Alphanumeric Checks

by  |  earlier

0 LIKES UnLike

 Tags:

   Report

2 ANSWERS


  1. Is this valid in micro focus cobol too?  As it is not working for me and giving compliation error of inva;lid syntax.


  2. IF variable IS ALPHANUMERIC should do the check that you want, any non-alphanumeric characters should fail the test but some cobol may allow a dot hyphen or comma in numeric. Alternative, create a string like PIC X OCCURS 36 TIMES VALUE "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" and check every single character in the variable contents is present in the string using a PERFORM loop or similar construct

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.