Page 1 of 1

Maximum length of a variable in COBOL

PostPosted: Sat Dec 18, 2010 7:54 pm
by premv12
Recently Somebody asked me this questing.
1. What is the maximum length of a variable that can be defined in COBOL?

Thanks

Re: Maximum length of a variable in COBOL

PostPosted: Sat Dec 18, 2010 8:12 pm
by MrSpock
Look in the section "Appendix B. Compiler Limits":

http://publibfp.boulder.ibm.com/cgi-bin ... /CCONTENTS

Re: Maximum length of a variable in COBOL

PostPosted: Sat Dec 18, 2010 10:24 pm
by dick scherrer
Hello and welcome to the forum,

The limit varies by which release of the compiler is being used. There is a different set of "limits" for each compiler.

Make sure you look at the "Compiler Limits" for your compiler. . .

Re: Maximum length of a variable in COBOL

PostPosted: Sun Dec 19, 2010 3:48 am
by premv12
What's the limit for cobol 85 compiler?

Re: Maximum length of a variable in COBOL

PostPosted: Sun Dec 19, 2010 6:04 am
by Robert Sample
"COBOL 85 compiler" is not a mainframe compiler. It is a reference to one of the standards for COBOL but that does not identify a version of the compiler. Enterprise COBOL, COBOL for MVS & VM, OS/390 COBOL, VS COBOL II, OS/VS COBOL -- these are all mainframe COBOL compiler versions. Notice there is not a single version (85 or any other year) listed.

The link you need to research is http://www-01.ibm.com/software/awdtools/cobol/library/