Reference Type: Supported, Category: Menu Manager, Integration Agreement: 10078
This API returns the current option or protocol name and menu text in the
first and second pieces of the XQOPT output variable. It looks for the
local XQORNOD if defined or the local XQY variable, the internal number of the
option if XQORNOD is defined it needs to be in the variable pointer format, i.e. XQORNOD=<internal
number of the protocol>;<protocol file>.
If the search is unsuccessful, because the job is not running out of the menu system or is not a tasked option, XQOPT is returned with -1 in the first piece and "Unknown" in the second.
NOTE: XQCHK cannot return option/protocol information if the job is a task that did not originate from an option.
Make sure to perform the following steps before calling this API:
(optional) If this variable is defined, it should be in variable
pointer format. For example:
Returns a string in the following format:
Option/Protocol Name^Menu Text
If neither an option nor a protocol can be identified, XQOPT is returned as:
>K XQORNOD D OP^XQCHK W !,XQOPT >EVE^Systems Manager Menu
>N XQORNOD,XQOPT S XQORNOD="445;ORD(101," D OP^XQCHK W !,XQOPT >XU USER EVENT TERMINATE^Terminate User Event
>N XQORNOD,XQOPT S XQORNOD="9;DIC(19," D OP^XQCHK W !,XQOPT >EVE^Systems Manager Menu
>K XQORNOD,XQY,XQOPT D OP^XQCHK W !,XQOPT >-1^Unknown
August 26, 2011