Query MDO Components

Once an MDO is connected to a map, it is possible to query its structure (as present in the MDO), or its definition (as defined in the map). The syntax used is part of an &ASSIGN, where the results of the query must be placed into NCL variables.

&ASSIGN OPT={ NAMES
              |TAGS
              |TYPE
              |LENGTH
              |#ITEMS 
              |NAMEDVALUES 
              |VALIDVALUES  }
   VARS=vars...
   { PRESENT_IN | DEFINED_IN | MANDATORY }
   MDO=mdoName

When the PRESENT_IN keyword is specified the information is returned only for those components that are found to be present within the MDO. When the DEFINED_IN keyword is used, the information is returned for all those components defined within the connected map, regardless of their presence or absence in the MDO itself. If the MANDATORY keyword is used then only those defined components that are mandatory are selected.

The various options and their meanings are as follows:

Example 1: Query MDO Components

If there is a component defined as follows:

datax GraphicString ("ABCD" | "xyz" | "QQQ")

then &ASSIGN VARS=X* OPT=VALIDVALUES DEFINED MDO=... datax will return 3 variables set as follows:

&X1=ABCD
&X2=xyz
&X3=QQQ

Example 2: Query MDO Components

If there is a component defined as follows:

datax GraphicString (FROM ( "A"c | "C" | "Y"C | "X" ))

then &ASSIGN VARS=X* OPT=VALIDVALUES DEFINED MDO=... datax will return 4 variables set as follows:

&X1=A
&X2=C
&X3=Y
&X4=X


Copyright © 2010 CA. All rights reserved.