Common cobol errors



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Common cobol errors

Postby pearl » Tue Mar 26, 2013 10:34 pm

Please could anyone provide me a list of the common errors occurring in COBOL?
pearl
 
Posts: 21
Joined: Fri Mar 15, 2013 12:55 pm
Has thanked: 0 time
Been thanked: 0 time

Re: common cobol errors

Postby Quasar » Tue Mar 26, 2013 10:49 pm

Pearl,

Though it's very naïve to ask, what are the most common errors, you'd face when writing a Cobol program, here's a post, that might be of interest to you - External link removed. And moderators, pardon me for referring an external URL.

Also, to generate a complete listing of all possible errors in Cobol, along with the error-codes and their descriptions, write a Cobol program, with the PROGRAM-ID ERRMSG, compile it and look at the listing in the Spool.

        IDENTIFICATION DIVISION.
        PROGRAM-ID. ERRMSG.


Thank you very much.
Quasar Chunawala,
Software Engineer, Lives at Borivali, Mumbai
User avatar
Quasar
 
Posts: 102
Joined: Wed Nov 10, 2010 7:11 pm
Location: Borivali, Mumbai
Has thanked: 13 times
Been thanked: 2 times

Re: common cobol errors

Postby enrico-sorichetti » Tue Mar 26, 2013 11:00 pm

posting links to a <competitor> site is considered everywhere bad manners!
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: common cobol errors

Postby Robert Sample » Tue Mar 26, 2013 11:07 pm

You have asked a strange question where the reply will depend upon how the question is interpreted. If you merely want to know the more common COBOL errors while executing a program, they would include S0C4, S0C7, and a few others (depending upon the site and the experience level of its COBOL coders and whether you are talking about batch/online programs and file/database programs and there are other ways to look at this question not yet mentioned), and not all execution-time errors are the coder's fault such as Sx37 space problems. If you want instead to know the more common COBOL errors encountered when compiling a program, that depends entirely upon the individual coder and his/her skill set.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: common cobol errors

Postby c62ap90 » Wed Mar 27, 2013 12:54 am

Good question.

The NOT statement will get you into trouble. Even when it looks correct, it may not be doing what you intended. Test it!
IF field NOT EQUAL 'A' OR 'B'
IF field NOT EQUAL ('A' OR 'B')
IF field NOT EQUAL 'A' AND 'B'
IF field NOT EQUAL ('A' AND 'B')
...
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 7 times

Re: common cobol errors

Postby dick scherrer » Wed Mar 27, 2013 1:23 am

Hello,

Please could anyone provide me a list of the common errors occurring in COBOL?
I have not seen such a list. Depending on the environment, the features/tools used (ie DB2 rather than IMS - or both and Many, Many more), the standards in effect, etc.

Also, errors that are common to coders with little or no experience will most likely not be common to the experienced staff.

There is a considerable between compiler errors and run-time errors.

When you have something more specific to ask, someone should be able to answer.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: common cobol errors

Postby c62ap90 » Wed Mar 27, 2013 1:59 am

Not a complete list but a list...
http://www.tek-tips.com/viewthread.cfm?qid=875413
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 7 times

Re: common cobol errors

Postby c62ap90 » Wed Mar 27, 2013 2:01 am

enrico-sorichetti wrote:posting links to a <competitor> site is considered everywhere bad manners!

Who are the competitor sites? Never heard of this before!
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 7 times

Re: common cobol errors

Postby dick scherrer » Wed Mar 27, 2013 2:11 am

Hello,

Who are the competitor sites?
There are hundreds of these . . . And no, we won't be naming them :)

Some sites will ban a user for posting link(s) to competitor site(s).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: common cobol errors

Postby c62ap90 » Wed Mar 27, 2013 4:48 am

enrico-sorichetti wrote:posting links to a <competitor> site is considered everywhere bad manners!

How can it be bad manners if we don't know who the competitors are? Basic logic, you know!
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 7 times

Next

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post