![]() ![]() |
Reference Type: Supported, Category: Menu Manager, ICR#: 10078
The OP^XQCHK 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 variable if defined or the local XQY variable; the internal number of the option. If XQORNOD is defined, needs to be in the VARIABLE POINTER format:
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: OP^XQCHK cannot return option/protocol information if the job is a task that did not originate from an option.
OP^XQCHK
Make sure to perform the following steps before calling this API:
XQORNOD |
(optional) If this variable is defined, it should be in VARIABLE POINTER format. For example:
XQORNOD="1234;ORD(101," |
XQOPT |
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: -1^Unknown |
>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 |