Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

OP^XQCHK: Current Option Check

Reference Type: Supported, Category: Menu Manager, ICR#: 10078

Description

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.

Format

  OP^XQCHK

Make sure to perform the following steps before calling this API:

  1. NEW all non-namespaced variables.

  2. Set all input variables.

  3. Call the API.

Input Variables

XQORNOD (optional) If this variable is defined, it should be in VARIABLE POINTER format. For example:
  XQORNOD="1234;ORD(101,"

Output Variables

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

Examples

Example 1

>K XQORNOD D OP^XQCHK W !,XQOPT

>EVE^Systems Manager Menu

 

Example 2

>N XQORNOD,XQOPT S XQORNOD="445;ORD(101," D OP^XQCHK W !,XQOPT

>XU USER EVENT TERMINATE^Terminate User Event

 

Example 3

>N XQORNOD,XQOPT S XQORNOD="9;DIC(19," D OP^XQCHK W !,XQOPT

>EVE^Systems Manager Menu

 

Example 4

>K XQORNOD,XQY,XQOPT D OP^XQCHK W !,XQOPT

>-1^Unknown