The *Return Code field contains a return code that is passed between all standard functions. This field may be used to communicate with the calling and called functions.
You can add extra conditions to the *Return Code field. A special facility is provided on the Edit Field Conditions panel for this field, which allows you to define conditions by selecting from existing message functions. The conditions created have the same name as the selected message function (for example, user quit requested) and have the message identifier used to implement the message (USR0156) as a condition value.
If you want to specify a fast exit (for example, pressing F15 when using a function that is called by another function exits you from both functions), the *Return Code field would be used in the PGM context as follows:
.—CASE <<< |—CTL.*CMD key is CF15 <<< | Add new records function <<< | *Exit program - return code CND. *User QUIT requested <<< ‘—ENDCASE
Execute subsidiary function
.—CASE <<< |—PGM. *Return code is *User QUIT requested <<< | *Exit program - return code CND. *User QUIT requested <<< ‘—ENDCASE
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |