What is the difference between GOBACK and RETURN in CICS?
What is the difference between GOBACK and RETURN in CICS?
Hi,
I am new to CICS and I find GOBACK and return very similar in their function... but I think there must be some difference as they are two differnt verbs. Could you please tell me the Difference between GOBACK and RETURN? It will be a great help.
I am new to CICS and I find GOBACK and return very similar in their function... but I think there must be some difference as they are two differnt verbs. Could you please tell me the Difference between GOBACK and RETURN? It will be a great help.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: What is the difference between GOBACK and RETURN in CICS
Are you talking about the COBOL GOBACK statement compared to the EXEC CICS RETURN statement? The first, and most obvious, difference is that GOBACK is a COBOL verb while EXEC CICS RETURN is part of the CICS API.
Re: What is the difference between GOBACK and RETURN in CICS
Thanks. Yes, I was askig about that. Is that the only difference?
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: What is the difference between GOBACK and RETURN in CICS
There are differences between GOBACK and EXEC CICS RETURN. For example, if you use a COBOL CALL verb to invoke a subprogram (instead of EXEC CICS LINK), an EXEC CICS RETURN in the subprogram will end the calling program while GOBACK returns to the calling program. Discussing GOBACK and EXEC CICS RETURN requires discussion of the method used to invoke the subprogram since the behavior will vary depending upon how the invocation was done.
Re: What is the difference between GOBACK and RETURN in CICS
Thanks.
"an EXEC CICS RETURN in the subprogram will end the calling program", will it end the called program or the calling program itself??if you use a COBOL CALL verb to invoke a subprogram, an EXEC CICS RETURN in the subprogram will end the calling program while GOBACK returns to the calling program.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: What is the difference between GOBACK and RETURN in CICS
If you used a COBOL CALL statement instead of EXEC CICS LINK, as far as CICS is concerned the subprogram and the calling program are the same -- hence EXEC CICIS RETURN will end the CALLING program as well as the called program.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute