In Cobol we may get return code of 4 or 8 or 12 or 16, If th



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

In Cobol we may get return code of 4 or 8 or 12 or 16, If th

Postby arunkumar » Fri Jun 25, 2010 1:43 pm

In Cobol we may get return code of 4 or 8 or 12 or 16, If this is the case why the picture clause of return code in alphanumeric field? why not numeric?
arunkumar
 
Posts: 5
Joined: Thu Jun 17, 2010 3:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: In Cobol we may get return code of 4 or 8 or 12 or 16, If th

 

Re: In Cobol we may get return code of 4 or 8 or 12 or 16, If th

Postby ajuatsgp » Fri Jun 25, 2010 2:44 pm

Hi Arun,

I dont think so....
I ususally define my return code field as numeric and my program handels the return code properly...
Can you please be little more specific in your query.
ajuatsgp
 
Posts: 82
Joined: Thu May 20, 2010 6:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: In Cobol we may get return code of 4 or 8 or 12 or 16, If th

Postby Robert Sample » Fri Jun 25, 2010 4:26 pm

If you check section 1.3.8.6 of the COBOL Language Reference manual, you will find
The RETURN-CODE special register has the implicit definition:


01 RETURN-CODE GLOBAL PICTURE S9(4) USAGE BINARY VALUE ZERO.

So why do you think it would be alphanumeric since COBOL explicitly tells you it is not?
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post