How do you end a cobol program that calls a menu(cl)?

5 pts.
Tags:
CL
COBOL
I have a menu that calls another menu. Before the first menu calls the second menu it calls a cobol program which reads a table to verify that the user attempting to access the second menu has authority to the second menu. If the user has authority to the second menu, the cobol program calls the next menu. When we run a program from the second menu the first time, it works and screen returns to the second menu. When we attempt to run the same program again, it abends because the cobol program has never ended.

Answer Wiki

Thanks. We'll let you know when a new response is added.

CL (MENUA) call COBOL (PGMAC) call CL (MENUB)

When the CL MENUB exits (runs command “RETURN”), it should return to the statement in PGMAC (after the call). Have the program PGMAC closes the files (if open) and do a “GOBACK” which should send it back to MENUA. This should cure your problem.

You could have the COBOL program to have a parameter passed to it to let the CL program MENUA can check to see if the user has authority or not , then the CL MENUA can call MENUB. This will allow you to exit the COBOL program before calling MENUB.

THANKS

Michael Dratwa

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following