IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CICS and GO TOs, are there special considerations?


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Sun Jul 18, 2010 6:41 pm
Reply with quote

I've had very little exposure to CICS in my career but one thing I've noticed is that some shops I've worked in shunned gotos except in CICS applications.

Before I go on, I don't want to rehash the goto debate here.

I'm just curious if gotos have a benefit in CICS which helps override the goto hater's fears. And if someone could point me to something on the matter of gotos as they relate to best practice in CICS applications. I know google is my friend but he's not cooperating with me on this one.

The only real discussion I've found on the matter is a small blurb in two books I have. The problem is the newer of those books is 18 years old and in my quick browsing I found some recommendations in them which google tells me are old techniques and not recommended any more.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Jul 18, 2010 7:08 pm
Reply with quote

I don't think there's a whole lot of benefit -- the few CICS programs I've written in the last years have had no GOTO statements at all. There used to be something of a push to use GOTO over PERFORM due to the overhead of the PERFORM statement, but as machines have gotten faster that push has pretty much died out.
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Sun Jul 18, 2010 7:21 pm
Reply with quote

So a high performance application with sub second SLA's might still get a benefit from the GOTO over perform? So far this is the only reason anyone has offered to me outside the traditional arguments around GOTO EXIT for and against.

Robert Sample wrote:
There used to be something of a push to use GOTO over PERFORM due to the overhead of the PERFORM statement, but as machines have gotten faster that push has pretty much died out.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Jul 18, 2010 8:36 pm
Reply with quote

It might but considering z10 cycle times, I think the application would have to be pretty unusual to require GOTO over PERFORM. The main determinant of response times is going to be I/O -- which is still milliseconds versus nanoseconds for code execution.
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Sun Jul 18, 2010 8:43 pm
Reply with quote

Thanks, Robert. That's enough for me. I'll go without them and see how it goes.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sun Jul 18, 2010 8:53 pm
Reply with quote

FWIW, HANDLE CONDITIONS, catering to multiple errors, expand into a GO TO DEPENDING ON statement. However, since the inception of the RESP keyword (or NOHANDLE), introduced with CICS/MVS 1.7, many applications have had the HANDLE CONDITION API's removed in favor of RESP/NOHANDLE. Also, HANDLE CONDITION API's generate an internal CICS GETMAIN.

Bill
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Jul 18, 2010 9:16 pm
Reply with quote

Bill O'Boyle wrote:
However, since the inception of the RESP keyword (or NOHANDLE), introduced with CICS/MVS 1.7, many applications have had the HANDLE CONDITION API's removed in favor of RESP/NOHANDLE.
Error handling became much better when the RESP keyword was added, but my only complaint is that I wish they had included a four byte field with the CICS abend code that would have been generated so I could issue the correct abcode if really needed......
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts How to avoid duplicating a CICS Web S... CICS 0
Search our Forums:

Back to Top