Numeric check for Alphanumeric variable

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Locked
SSgan
Member
Posts: 1
Joined: Mon Mar 04, 2013 4:27 pm

Numeric check for Alphanumeric variable

Post by SSgan » Mon Mar 04, 2013 4:31 pm

Hi,

I am having requirement to check whether Alphanumric variable is having numeric value(just numbers) in it.
Ex- VAR 1 defined as X(4).
It can have value as '1234' OR '12ds'
i need to process based on whether it is having number values or alphanum values.
Can anyone help on this?

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Mon Mar 04, 2013 5:31 pm

Please don't post in multiple sites at the same time.

diwz
Member
Posts: 44
Joined: Sun Feb 10, 2013 10:39 am

Post by diwz » Mon Mar 04, 2013 10:54 pm

Take every X and check for IS NUMERIC using IF condition

Locked

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others