Q
Problem solve Get help with specific problems with your technologies, process and projects.

*CANCL without regard to the stack

We have deeply nested screen applications. If we wanted to exit the program from, say, screen 10, the normal track would be back though 9-8-7, etc. Would there be anything wrong with adding an INFSR routine to the screen ending with "Endsr '*CANCL'" to be called when the exit function is requested? This would avoid having to pass an additional parm back through the entire stack.
If you want to cancel the process back to the first level in the stack, you could probably do this, but it is never advisable. The problems with this type of procedure are many. The system cannot "normally" take programs out of the stack. Files may remain open with records locked. With ILE, you can end up with a "hanging activation group". Debugging becomes a nightmare. The operating system will log every page in memory as having been used until the joblog data is completely written. Not a good idea.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


This was last published in August 2004

Dig Deeper on iSeries ILE programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close