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

OP^XQCHK: Current Option Check

Reference Type: Supported, Category: Menu Manager, Integration Agreement: 10078

Description

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.

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

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

VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.