Highlighted
Absent Member.
Absent Member.
2837 views

Cobol return code problem after implementing latest CYgwin 1.7

Hi

We execute cobol programs through bash shell

We use C programs to link and call Cobol programs(using cobinit
,cobcall), After executing cobol applications on bash we are getting
return code as zero always. we have displayed the value of the return code just before the stop job in the cobol program and then displayed the return code,its showing correct values like 0001,0002..

This problem occurs after installing latest Cygwin. 
In Cobol program we use STOP RUN RETURN CODE to populate the return codes.

Please suggest


Regards,
Rashi

Tags (1)
0 Likes
5 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Cobol return code problem after implementing latest CYgwin 1.7

Are you linking ACUCOBOL-GT? RETURN CODE can be changed by the routines you call, some routines may return 0 for success or 0 for failure. The best is to explicitly have a value in the STOP RUN statement, that signifies success or failure:

STOP RUN myval

where myval is set to a value that the user determines is right for the program to return. For example, in this simple case, the user should set that variable to 0 (or just execute STOP RUN 0).

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Cobol return code problem after implementing latest CYgwin 1.7

HI am using netexpress cobol. i have used my own value to populate the return code. still the status is zero in bash shell

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Cobol return code problem after implementing latest CYgwin 1.7

You have posted your issue on the Acu COBOL portion of the forum ... please post your issue on the Net Express portion of the forum .. community.microfocus.com/.../net_express__server_express

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Cobol return code problem after implementing latest CYgwin 1.7

I believe you need to use cob to link in your code versus gcc .. I believe with Net Express gcc is not supported for linking .. however the experts on that Forum or Customer Care would know better than I.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Cobol return code problem after implementing latest CYgwin 1.7

Thanks sjerpe.. I have posted query on NET express forum.

Also i am using function like cobcall,cobinit,cobfunct to call cobol in C

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.