REG: SPACES KEYWORD IN COBOL

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

Post Reply
babi.priya
Member
Posts: 1
Joined: Sat Jan 03, 2009 11:53 am

REG: SPACES KEYWORD IN COBOL

Post by babi.priya » Sat Jan 03, 2009 12:04 pm

Can a numeric value be checked with spaces? Does spaces have any specific datatype?

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sat Jan 03, 2009 12:50 pm

Hi,

SPACES represents one or more blanks or spaces. They are treated as a nonnumeric literal. SPACES represent one or more double-byte spaces when used with DBCS data items. SPACES represent one or more single-byte UCS-2 spaces when used with national data items.
Last edited by Anuj Dhawan on Sat Jan 03, 2009 12:54 pm, edited 1 time in total.
Regards,
Anuj

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sat Jan 03, 2009 12:53 pm

Hi,

By the way, why there is such a need ?
Can a numeric value be checked with spaces?
What business requirement need this ?
Regards,
Anuj

Post Reply

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