Skip to main content

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


#COBOL

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


#COBOL

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).


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


#COBOL

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


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


#COBOL

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


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


#COBOL

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.


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


#COBOL

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

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