DOCS

$SDCAC

Function:

Generates an item list on the basis of specified conditions, and lists attribute contents.

Format:

$SDCAC {CFG <cnf> | PATH} {D | <ctrlf1> <wa1>} <wa2> <ctrlf2>

[<wa3> <wa4>]

Parameters:

CFG <cnf>

Configuration <cnf> to be considered (if entered as the first parameter).

PATH

Configuration path to be considered (if entered as the first parameter).

D

Specification that all items of the configuration <cnf> or the configuration path are to be considered.

In connection with $QRY, this is the only parameter possible. The specification <ctrlf> <wa> causes an error.

<wa1>

Work area with item list to be considered.

<wa2>

Work area with conditions for selection criteria. For more information, see Syntax of Work Area <wa2>.

<ctrlf1>

Character string that defines the information that is passed in the work area <wa1>; the order in which the characters appear in the string defines the order in which the information is listed in the work area <wa1>.

 

F

Padding characters that are ignored by the command.

 

N

Item name in <i_nm> format as described in Accessing Items.

 

O

Item identification.

 

T

Item type.

 

W

Specification that instructions are given in Rochade words.

 

X=<n_gr>

Specification that namespace ID <ns_id> and item name <i_xnm> are listed in the work area for the naming group <n_gr> in this format: <ns_id> <i_xnm>

The item specified by <ns_id> must exist. If X=<n_gr> is specified, W must also be specified.

<ctrlf2>

Character string that defines the information that is to appear in the result work area (current work area); the order in which the characters appear in the string defines the order in which the information is to be listed in the result work area.

 

A

Attribute contents.

 

G

Configuration in which the item was found.

 

N

Item name in <i_nm> format as described in Accessing Items.

 

O

Item identification.

 

S

Status information for the items found in the current work area; A denotes active and I inactive items

 

T

Item type

 

W

Specification that the result is to be arranged in Rochade words.

 

X=<n_gr>

Specification that namespace ID <ns_id> and item name <i_xnm> are to be listed in the work area for the naming group <n_gr> in this format: <ns_id> <i_xnm>

If an item does not have a name in the specified naming group, NIL NIL is displayed in place of <ns_id> <i_xnm>. If X=<n_gr> is specified, W must also be specified.

<wa3>

Work area containing a list of attributes whose contents are to be listed in <wa4> for each item. In addition, this work area contains instructions as to how those contents are to be presented in <wa4>. For more information, see also Syntax and Semantics of Work Area <wa3>.

<wa4>

Result work area containing the attribute contents for each item. For more information, see Structure of Work Area <wa4>.

Description:

The command lists after the current line in the current work area all items that satisfy the conditions that were specified in <wa2> . For more information, see Searching Items Satisfying Specified Conditions. It also provides the option to read with a single server access the attributes specified for these items in the work area <wa3> and write them to the work area <wa4> Listing Attribute Contents.
The first parameter specifies the item set to be considered:
If CFG <cnf> is specified as the first parameter, the only items to be considered are those contained within the configuration <cnf>.
If PATH is specified as the first parameter, the only items to be considered are those contained within the current configuration path.

See also

Searching Items Satisfying Specified Conditions

To specify the conditions that the items must meet to be included in the list returned by the command, this call syntax is used:

$SDCAC {CFG <cnf> | PATH} {D | <ctrlf1> <wa1>} <wa2> <ctrlf2>

where these are the rules that apply to the individual parameters:

The CFG <cnf> or PATH parameter specifies the view on the item set (see under Description on page If PATH is specified as the first parameter, the only items to be considered are those contained within the current configuration path.).
The D or <ctrlf1> <wa1> parameter specifies which items within the selected view are to be considered.
If D is specified, $SDCAC will consider all items contained within the view of the selected database. Either all items in the configuration specified by the first parameter are considered or all items in the current configuration path.
If <ctrlf1> <wa1> is specified, $SDCAC will consider only the items that are listed in <wa1>.
Through <ctrlf1> you can control the format of the item list in <wa1>.
If W is specified in <ctrlf1>, the information is expected to be organized in words separated by blanks.

If W is not specified, the information is expected to be aligned in columns. The beginning columns for the respective information are then 1, 34, 67, 100.

If X=<n_gr> is specified within <ctrlf1>, W must also be specified.
In order to achieve unique identification of the items in <wa1>, at least T and N or O and, where required, also X=<n_gr> must be specified in <ctrlf1>.
If the letter F is specified within <ctrlf1>, the information in the work area at this position is interpreted as fill characters and is skipped over by the command. You can use the letter F to exclude information that was written to the work area by other commands from the $SDCAC query.
The work area <wa2> contains the conditions for listing the items in the current work area.

If syntax errors are found in <wa2>, the system variables $LN and $COL contain the line and column of the incorrect condition.

For further hints on the syntax and semantics of work area <wa2>, refer to Syntax of Work Area <wa2> and Semantics of Work Area <wa2>.

Through <ctrlf2> you can control the format of the current work area, in which the list of items conforming to the specified conditions is written.

If W is specified in <ctrlf2>, the information is listed word by word, separated by blanks, and with escape symbols preceding word separator characters.

You can find examples for searching for items that meet specified conditions under Examples for Item Search with Specified Conditions.

Listing Attribute Contents

To list the attribute contents of items that satisfy specific conditions, this call syntax is used:

$SDCAC {CFG <cnf> | PATH} {D | <ctrlf1> <wa1>} <wa2> <ctrlf2>

<wa3> <wa4>

where these are the rules that apply to the individual parameters:

The CFG <cnf> or PATH parameter specifies the view on the item set (see under Description on page If PATH is specified as the first parameter, the only items to be considered are those contained within the current configuration path.).
The D or <ctrlf1> <wa1> parameter specifies which items within the selected view are to be considered.
If A is specified in <ctrlf2>, the contents of the attributes specified in <wa3> will be listed in work area <wa4>. For more information, see Syntax and Semantics of Work Area <wa3> and Structure of Work Area <wa4>.

If A is specified, W for word-oriented processing must also be specified.

In the current work area, $SDCAC lists two line numbers for each item at the position of A. These describe the first and the last line of the item’s attribute contents listed in <wa4>.

Example:

If the letter combination ATNW has been specified in <ctrlf2>, and if the item DB2/TABLE CUSTOMER satisfies the conditions specified in <wa2>, $SDCAC writes this line to the current work area:

<ln_start> <ln_end> DB2/TABLE CUSTOMER

where:

<ln_start> is the number of the line in work area <wa4> that contains the header line for the DB2/TABLE CUSTOMER item.

<ln_end> is the number of the line in work area <wa4> that contains the last line of attribute contents for the DB2/TABLE CUSTOMER item.

For further hints on the syntax and semantics of work areas <wa3> and <wa4>, see Syntax and Semantics of Work Area <wa3> and Structure of Work Area <wa4>.

You can find an example for listing attribute contents under Example for Listing Attribute Contents.

Syntax of Work Area <wa2>

This section describes the syntax of the work area <wa2>. Details about the individual tokens are presented in Semantics of Work Area <wa2>.

$SDCAC expects the conditions for the selection of items to be given in this format:

<bool_expr>

::=

<bool_expr_1>

| <bool_expr_1> <OR_op> <bool_expr>

| <bool_expr_1> <XOR_op> <bool_expr>

<bool_expr_1>

::=

<bool_expr_2>

| <bool_expr_2> <AND_op> <bool_expr_1>

<bool_expr_2>

::=

'(' <bool_expr> ')'

| <NOT_op> <bool_expr_2>

| <i_cond>

| <att_cond>

<i_cond>

::=

<i_tp_cond>

| <i_nm_cond>

| <ai_nm_cond>

| <i_x_cond>

| <i_ax_cond>

| <i_st_cond>

| <i_ns_state_cond>

| <i_ref_state_cond>

| <i_cre_time_cond>

| <i_upd_time_cond>

| <i_instcnt_cond>

<i_tp_cond>

::=

'TYPE' <op_1> <string_val>

| 'TYPE' <op_5> <wildcard_expr>

<i_nm_cond>

::=

'NAME' <op_1> <string_val>

| 'NAME' <op_5> <wildcard_expr>

<ai_nm_cond>

::=

'A_NAME' <op_1> <string_val>

| 'A_NAME' <op_5> <wildcard_expr>

<i_x_cond>

::=

'XNAME' <n_gr> <ns_id> <op_1> <string_val>

| 'XNAME' <n_gr> <ns_id> <op_5> <wildcard_expr>

<i_ax_cond>

::=

'A_XNAME' <n_gr> <ns_id> <op_1> <string_val>

| 'A_XNAME' <n_gr> <ns_id> <op_5> <wildcard_expr>

<i_st_cond>

::=

 

<i_ns_state_cond>

::=

 

<i_ref_state_cond>

::=

 

<i_cre_time_cond>

::=

'CRE_TIME' <op_4> <date_expr>

<i_upd_time_cond>

::=

'UPD_TIME' <op_4> <date_expr>

<i_instcnt_cond>

::=

'INSTCFGCNT' <op_4> <integer>

<att_cond>

::=

<l_att_cond>

| <n_att_cond>

| <s_att_cond>

| <t_att_cond>

| <v_att_cond>

| <b_att_size_cond>

| <l_att_size_cond>

| <n_att_size_cond>

| <s_att_size_cond>

| <t_att_size_cond>

| <v_att_size_cond>

<l_att_cond>

::=

'LA' <la_att_sel> <l_dir> [<l_itsel_cond>] [<l_seq_cond>] [<l_info_cond>]

<n_att_cond>

::=

'NA' <na_att_sel> <n_dir> [<l_itsel_cond>] [<l_seq_cond>] [<l_info_cond>]

<s_att_cond>

::=

'SA' <att_name> <op_3> <att_val>

| 'SA' <att_name> <op_5> <wildcard_expr>

<t_att_cond>

::=

'TA' <att_name> <op_3> <att_val>

| 'TA' <att_name> <op_5> <wildcard_expr>

<v_att_cond>

::=

'VA' <att_name> <op_3> <att_val>

| 'VA' <att_name> <op_5> <wildcard_expr>

<b_att_size_cond>

::=

'BA_SIZE' <att_name> <op_4> <integer>

<l_att_size_cond>

::=

'LA_SIZE' <la_att_sel> <l_dir> [<l_itsel_cond>][<l_seq_cond>] [<l_info_cond>] <op_4> <integer>

<n_att_size_cond>

::=

'NA_SIZE' <na_att_sel> <n_dir> [<l_itsel_cond>][<l_seq_cond>] [<l_info_cond>] <op_4> <integer>

<s_att_size_cond>

::=

'SA_SIZE' <att_name> <op_4> <integer>

<t_att_size_cond>

::=

'TA_SIZE' <att_name> <op_4> <integer>

<v_att_size_cond>

::=

'VA_SIZE' <att_name> <op_4> <integer>

<l_seq_cond>

::=

'SEQN' <op_4> <integer>

<l_info_cond>

::=

'INFO' <op_3> <string_val>

| 'INFO' <op_5> <wildcard_expr>

<l_itsel_cond>

::=

<l_it_cond> | <l_itid_cond> | <l_sel_cond>

<l_it_cond>

::=

'ITEM' <ns_id> <i_tp> <n_gr> <i_nm>

<l_itid_cond>

::=

'ITEMID' <i_id>

<l_sel_cond>

::=

[<l_tp_cond>] [<i_lnm_cond>] [<l_ns_cond>] [<l_ngr_cond>]

<l_tp_cond>

::=

'TYPE' <i_tp>

<i_lnm_cond>

::=

'NAME' <op_3> <string_val>

| 'NAME' <op_5> <wildcard_expr>

<l_ns_cond>

::=

'NS' <ns_id>

<l_ngr_cond>

::=

'GROUP' <n_gr>

<AND_op>

::=

 

<NOT_op>

::=

 

<OR_op>

::=

 

<XOR_op>

::=

 

<op_1>

::=

<op_2> | '~'<op_2>

<op_2>

::=

 

<op_3>

::=

<op_4> | '~'<op_4>

<op_4>

::=

 

<op_5>

::=

<op_6> | '~'<op_6>

<op_6>

::=

 

<la_att_sel>

::=

<att_name> | '*'

<na_att_sel>

::=

<att_name> | '*' | 'NIL'

<att_name>

::=

<string_val>

<att_val>

::=

'ANY' <string_val>

| 'STR' <string_val>

| 'INT' <integer>

| 'REAL' <real>

| 'DATE' <date_expr>

<date_expr>

::=

<string_val>

<i_id>

::=

<string_val>

<i_nm>

::=

<string_val>

<i_tp>

::=

<string_val>

<integer>

::=

<string_val>

<l_dir>

::=

'->' | '<-'

<n_dir>

::=

'HAS' | 'BELONGS_TO'

<n_gr>

::=

'*' | <string_val>

<ns_id>

::=

'*' | <string_val>

<real>

::=

<string_val>

<string_val>

::=

<rochade_word> | ':' <var>

<wildcard_expr>

::=

<string_val>

Semantics of Work Area <wa2>

This table describes how $SDCAC interprets the individual tokens in the work area <wa2>:

Token Description

'/'

Operator for comparisons with wildcard expressions. The result is true if the wildcard expression matches the comparison string.

'~'

Specifies that the search is case-insensitive for the letters A to Z. Exceptions are letters in the extended character set (for example, é, ø, and ü) for which case is significant.

'<', '<=', '=', '<>', '>=', '>'

Comparison operators for formulating conditions within expressions.

With text attributes, comparison operators work in this manner:

  • They apply to the first line of the text attribute if you specify a concrete comparison value in the form <op_3> <att_val>. $SDCAC compares the complete content of the first line with the specified expression.
  • They apply to all lines of the text attribute if you specify a wildcard expression in the form <op_5> <wildcard_expr>. $SDCAC compares each line with the specified expression.

<b_att_size_cond>

Condition for binary attribute size in bytes.

<date_expr>

Date expression, where these are valid expressions:

YYYYMMDDhhmmssYYYYMMDD.hhmmssYYYYMMDDhhmmssmmmYYYYMMDD.hhmmss.mmmYYYYMMDDYYMMDDhhmmssYYMMDDDD.MM.YYYY@ hh:mm:ssDD.MM.YY@ hh:mm:ssDD.MM.YYYYDD.MM.YYMM/DD/YYYY@ hh:mm:ssMM/DD/YY@ hh:mm:ssMM/DD/YYYYMM/DD/YY

Where: YYYY stands for year, MM for month, and DD for day. If the date includes a time expression, hh stands for hours, mm for minutes, and ss for seconds.

If the year is specified as a two-digit number, all dates with YY < 51 are interpreted as 20YY, while all dates with YY >= 51 are interpreted as 19YY. For instance, the date 02/22/02 is interpreted as 02.22.2002, and the date 02/22/99 as 02.22.1999.

<integer>

A whole number in the range from -2147483647 to 2147483647.

Examples for valid expressions:

+0012345; 12345; -012345; 12345

When comparing integer values, 002 is greater than 1. This is in contrast to character comparison, where 002 is less than 1.

<l_it_cond> <l_itid_cond>

Selection conditions for links and namespace relationships for a particular item.

<l_itsel_cond>

Further restricts the selection condition for links and namespace relationships.

  • Forward links (->): The selection conditions apply to the target item.
  • Backward links (<-): The selection conditions apply to the source item.
  • Namespace relationship HAS: The selection conditions apply to the items that span a namespace for other items.
  • Namespace relationship BELONGS_TO: The selection conditions apply to the items that are in the namespace of other items.

<l_sel_cond>

Selection condition for a set of items. Any combinations of <l_tp_cond>, <i_lnm_cond>, <l_ns_cond>, and <l_ngr_cond> are permitted.

The conditions can be stated in any order, and particular conditions may be omitted, but each condition may occur only once at most.

<l_seq_cond><l_info_cond>

Selection conditions concerning the properties of the link or namespace relationship itself:

  • INFO - Links or namespace relationships with a particular qualifier.
  • SEQN - Links or namespace relationships with a particular sequence number.

Reports concerning link and namespace relationships can be grouped into efficiency categories 1 through 3, where 1 is highest and 3 is lowest:

  • Category 1: Forward direction (->/HAS) without specification of name conditions or with a name condition for a particular item.
  • Category 2: Forward link direction (->/HAS) with specification of name conditions for a group of items.
  • Category 3: Backward link direction (<-/BELONGS_TO).

For categories 2 and 3, it can be more efficient in certain situations to determine an item set by means of $SLI and then apply further restrictions by means of $SDCAC and forward link conditions.

Conditions with forward link direction (->) can be applied more efficiently since all the required information is located in the item currently under consideration. In the case of backward link direction (<-) or in the case of name conditions for a group of items, additional items must be analyzed. In certain situations, it can be more efficient to determine an item set by means of $SLI and then apply further restrictions by means of $SDCAC and forward link conditions.

<l_tp_cond>

Condition to restrict the selection on the basis of these criteria:

  • GROUP - Links to items belonging to a particular naming group.
  • ITEM - Links to an item in a particular namespace and naming group.
  • ITEMID - Links to an item with a particular item identification.
  • NAME - Links to items with a particular item name.
  • NS - Links to items belonging to a particular namespace.
  • TYPE - Links to items of a particular item type.

<real>

A floating-point number with up to 12 places on either side of the decimal point; plus and minus signs are allowed.

If more than 12 digits to the left of the decimal point—not including leading zeros—are specified, an error message is returned.

If more than 12 decimal places are specified, the value is truncated.

These values are examples of valid floating-point expressions:

+00.1234; +.1234; .1234; +1234.00; +1234.; 1234

-00.1234; -.1234; -1234.00; -1234.

<rochade_word> <var>

Both entries represent Rochade words, which are limited only by the length of the work area line. Rochade words can be passed in Rochade variables. In this case, you must specify the evaluation character, colon (:), before the variable name. Multiple evaluations are possible.

When using Rochade separators or special characters within a Rochade word, you must mask them with the Rochade escape character.

For more information on Rochade words and separators, see Using Rochade Words, the Escape Symbol, and Separators.

<t_att_size_cond>

<v_att_size_cond>

The units for the specification of text and value attribute size are characters. This guarantees a uniform interpretation of attribute size by double-byte and single-byte clients.

<wildcard_expr>

A wildcard expression is a Rochade word that contains a search pattern for the comparison of character strings. Asterisk (*) and question mark (?) are permitted as wildcard characters. Wildcard characters can appear in any position in a Rochade word. The wildcard character asterisk (*) must be masked with the Rochade escape character.

The asterisk (*) character represents zero to any number of characters, the question mark (?) represents exactly one character.

To use the characters *, \, and ? as regular characters within a wildcard expression, they must be masked with a backslash (\).

If a wildcard expression contains a character string without a wildcard character, $SDCAC will search exactly for that string.

'A_NAME'

Specifies conditions for the alias names of an item that was created under the classic naming concept with a maximum length of 32 characters. See also Rochade Naming Concept.

If the work area contains an A_NAME condition, $SDCAC reads every item in the database and checks if it has an alias name that meets the conditions specified in A_NAME.

The values of the $NMGRP and $NMSPC system variables are used as the naming group and namespace in such a condition.

For example, to find an item that has both the name B and the alias name B1 in the database, you should formulate such a condition:

NAME = B & A_NAME = B1

This expression returns the value TRUE if an item has both the name B and the name B1. Whether B or B1 is the actual alias name of the item does not matter.

The search for items that have either the name B or the name B1 is best formulated with this expression:

NAME = B | NAME = B1

'A_XNAME'

Specifies conditions for multiple names of an item in different naming groups.

If the work area contains an A_XNAME condition, $SDCAC reads each item in the database and checks if it meets the condition.

For example, a search for an item that has the name B in naming group 1 and the name B1 in naming group 2 should be formulated with this expression:

XNAME 1 * = B & A_XNAME 2 * = B1

This expression returns the value TRUE if an item has the name B in naming group 1 and the name B1 in naming group 2.

 

A search for items having either the name B in naming group 1 or the name B1 in naming group 2 is best formulated with this expression:

XNAME 1 * = B | XNAME 2 * = B1

Since the evaluation of A_NAME or A_XNAME conditions is very time-consuming, you should use them only in connection with searches for alias names or multiple names in different naming groups, preferably specified with additional restrictions via NAME, XNAME, and TYPE conditions.

'ACTIVE'

Returns the value TRUE if the item is active. Use NOT ACTIVE if you want to search for inactive items.

'AND', 'OR', 'XOR', 'NOT'

Logical functions for formulating logical expressions subject to these rules:

<operand_1> AND <operand_2> returns this result:

  • TRUE if both operands have the value TRUE (such as, TRUE-TRUE).
  • FALSE if one of the two operands has the value FALSE (such as, TRUE-FALSE, FALSE-TRUE, FALSE-FALSE).

 

<operand_1> OR <operand_2> returns this result:

  • TRUE if at least one of the two operands has the value TRUE (such as, TRUE-TRUE, TRUE-FALSE, FALSE-TRUE).
  • FALSE if both operands have the value FALSE (such as, FALSE-FALSE).

 

<operand_1> XOR <operand_2> returns this result:

  • TRUE if the two operands have different logical values (such as, TRUE-FALSE, FALSE-TRUE).
  • FALSE if both operands have the same logical values (such as, TRUE-TRUE, FALSE-FALSE).

 

NOT <operand_1> returns this result:

  • TRUE if the operand has the value FALSE.
  • FALSE if the operand has the value TRUE.

For logic functions, these precedence rules apply:

NOT has precedence over AND, followed by XOR and OR.

'ANY'

Specifies that the interpretation of the next value is to be carried out in this order and manner:

  • If the next value has a valid date format, it is to be interpreted as a date.
  • If the next value has the format of a floating-point number, it is to be interpreted as a floating-point number.
  • If the next value has the format of an integer, it is to be interpreted as an integer.
  • If the next value is neither in a date format nor a floating-point number nor an integer, it is to be interpreted as a string.

The result of comparing two values depends on their format.

So, for example, the integer 002 is greater than the integer 1. But the string 002 is less than the string 1, due to the fact that the characters are compared from left to right, thus 0 is less than 1.

'BA_SIZE'

Specifies conditions for the size (in bytes) of binary attributes.

'CRE_TIME'

Specifies conditions regarding the time that items were created.

'DATE'

Specifies that the next value is to be interpreted as a date.

'INSTCFGCNT'

Returns for a specific item the number of configurations in the current configuration path that meet these conditions:

  • The configuration contains a version of the item.
  • In the configuration path, the configuration is not located after a configuration to which the item is assigned HIDE mode.

Example:

TYPE= DO & REFERENCED & NOT ACTIVE & INSTCFGCNT > 0

This example returns all items of type DO which are referenced and for which the configuration path contains inactive versions.

Using this feature you can, for instance, distinguish between referenced items with value attributes and referenced items without value attributes.

'INT'

Specifies that the next value is to be interpreted as an integer.

'LA'

Specifies conditions for link attributes. The conditions are fulfilled if at least one link is found that fulfills all the specified conditions (AND operation).

The LA condition requires specification of attribute name and link direction.

If you specify an asterisk (*) as the attribute name, the LA condition applies to all link attributes.

'LA_SIZE'

Specifies conditions for link attribute sizes. The conditions are fulfilled if the number of links in an attribute satisfies the specified relational expression (for example, number of links > 5).

Only links that fulfill all the specified conditions (AND operation) are counted.

The LA_SIZE condition requires specification of attribute name and link direction.

If you specify an asterisk (*) as the attribute name, the sum of the links in all link attributes of the item is entered into the expression.

'NA'

Specifies conditions for namespace relationships. The conditions are fulfilled if at least one namespace relationship is found that fulfills all the specified conditions (AND operation).

The NA condition requires specification of attribute name and relationship direction.

If you specify NIL as the attribute name, $SDCAC considers only items that are not assigned to any namespace attribute (such as, unclassified namespace relationships).

If you specify an asterisk (*) as the attribute name, the NA condition applies to all namespace attributes.

'NA_SIZE'

Specifies conditions for link attribute sizes. The conditions are fulfilled if the number of namespace relationships in an attribute satisfies the specified relational expression (for example, number of namespace relationships > 5).

Only namespace relationships that fulfill all the specified conditions (AND operation) are counted. The NA_SIZE condition requires specification of attribute name and link direction.

If you specify NIL as the attribute name, $SDCAC considers only items that are not assigned to any namespace attribute (such as, unclassified namespace relationships).

If you specify an asterisk (*) as the attribute name, the sum of the namespace relationships in all namespace attributes of the item is entered into the expression.

'NAME'

Specifies conditions for item names. The maximum length of the names can be 512 characters. The values of the $NMGRP and $NMSPC system variables are used as the values for naming group and namespace in such conditions.

The NAME condition is especially suited for items that were created under the classic naming concept. For these items, you can set the system variables $NMGRP and $NMSPC to 0. When searching for items that were created under the extended naming concept, ASG recommends using the XNAME condition, since it permits you to explicitly state the naming group and namespace. See also Rochade Naming Concept and Generated Item Names.

'REAL'

Specifies that the next value is to be interpreted as a floating-point number.

'REFERENCED'

Returns the value TRUE if there is an item relationship that points to the item. In contrast, NOT REFERENCED returns the items that no item relationships point to. See also Reports Involving Inactive Items.

'SA'

Specifies conditions for item-specific system attributes.

'SA_SIZE'

Specifies conditions for the number of characters (including one character per line for the line break) in item-specific system attributes.Attribute size = No_of_characters + No_of_lines

'SCOPE'

Returns the value TRUE if the item spans a namespace.

'STR'

Specifies that the next value is a character string.

'TA'

Specifies conditions for text attributes.

'TA_SIZE'

Specifies conditions for the number of characters (including one character per line for the line break) in text attributes.Attribute size = No_of_characters + No_of_lines

'TYPE'

Specifies conditions for item types.

'UPD_TIME'

Specifies conditions regarding the time when items were updated.

'VA'

Specifies conditions for value attributes.

'VA_SIZE'

Specifies conditions for the size (in characters) of value attributes.

'XNAME'

Specifies conditions for item names with a maximum length of 512 characters.

An XNAME condition always specifies explicitly the naming group, namespace ID, and item name.

If you specify the value * in the namespace ID, $SDCAC considers all items in the naming group that match the specified name.

An XNAME condition is true only if the name of the item is valid within the specified naming group and namespace ID.

If you specify a NAME or XNAME condition, an optimized name search is carried out in the naming catalog, without the item itself being read. The A_NAME or A_XNAME condition is required only if you want to find a combination of alias names or names in different naming groups.

  • Classic item names with a maximum length of 32 characters as well as item names with a maximum of 512 characters can be used when specifying Rochade items. When you use a mix of these item names in work area <wa1>, it can happen that the command $SDCAC will list individual items more than once in the result work area. To avoid this, you need to sort the work area by item identification and then to delete identical items.
  • When using the format specifications INT, REAL or DATE, it can happen that the next value is NIL or that it does not conform to the specified data format. In this case, the result of this condition is undefined. If the overall result depends on this condition, $SDCAC will not return a result.

Syntax and Semantics of Work Area <wa3>

The work area <wa3> can contain instructions in the format described below. The instructions may be positioned in the work area in any desired sequence.

B <i_tp> <att>

C <i_tp>

I <i_tp> <ctrlf3> [$UNCLASSIFIED_ONLY]

L <i_tp> <att> <ctrlf3>

N <i_tp>

SA <i_tp> <att>

T <i_tp> <att>

U <i_tp>

V <i_tp> <att>

where:

B, L, SA, T, V

Attribute type:

  • B - Binary attribute
  • L - Link or namespace attribute
  • SA - item-specific system attribute
  • T - text attribute
  • V - value attribute

C, U

Time when the item version was created or modified

I

Serves to list the items belonging to the namespace

N

Lists the names of the item

<dtp>

Item type

<att>

Attribute name

<ctrlf3>

Specifies the order in which information is listed about link and namespace attributes

$SDCAC interprets the instructions in the work area <wa3> as follows:

The instructions are interpreted word by word. All lowercase letters are converted to uppercase. Conversion to uppercase will be suppressed for words that contain an escape symbol. To protect special characters from conversion, the escape symbol must directly precede the special character.
<i_tp> specifies the item type for which the content of the attribute <att> will be listed in the work area <wa4>.

For <i_tp> as well as for <att>, the asterisk (*) may be specified.

For <i_tp>, * means that all item types of the query result are considered. If * is specified in an instruction for an item type, there must not be any further instructions with concrete item types for this attribute type in the work area.

The following instructions, for instance, must not appear simultaneously in the work area <wa3>:

T * DESCR

T DO SOURCE

For <att>, * means that all attributes of each item in the query result are considered for the specified item type. Specifying * for the attribute of an L instruction means that all links and all namespace relationships are listed. If * is specified in an instruction for an attribute, no further instructions with concrete attribute names must exist for this attribute type in the work area.

The following instructions, for instance, must not appear simultaneously in the work area <wa3>:

T DO *

T DO SOURCE

  • The * specification for <i_tp> and <att> can affect both performance and memory requirements significantly, since all attribute contents of all found items are read and written to the work area <wa4>. Binary attributes, in particular, will be listed in hexadecimal format within the work area, thus leading to an additional increase in the memory that is required in comparison with the binary attribute’s actual size.
  • Therefore, ASG recommends that you specify the conditions for displaying attribute contents as restrictively as possible.
If there exists a C or U instruction in the work area, $SDCAC will list the respective information directly after the header line for the item.
The I instruction specifies that the items that belong to the item’s namespace will be listed. This means both the items that are assigned via a namespace attribute and those assigned through a namespace ID.
For the L instruction and for the I instruction, the information to be listed in the work area <wa4> is specified via <ctrlf3>.

For <ctrlf3>, these values can be specified in any order:

G

Configuration that contains the target item

L

Sequence number

N

Item name of the target item in <i_nm> format as described in Accessing Items

O

Item identification of the target items

P

Qualifier

T

Item type of the target item

W

Alignment according to Rochade words

X=<n_gr>

The item name of the target item in the naming group <n_gr>.

Namespace ID <ns_id> and item name <i_xnm> are listed for the naming group <n_gr> in this format:

<ns_id> <i_xnm>

Structure of Work Area <wa4>

For each item in the current work area, $SDCAC lists the contents of the attributes specified in the work area <wa3> in this format in the work area <wa4>:

H <header_line>

[C <YYYYMMTThhmmss>]

[U <YYYYMMTThhmmssnnnnn>]

<att_type> <att_name> <line_counter> | <value>

[<value>]

...

H <header_line>

Item header line

The item header line in the work area has the line position that was specified in the current work area as the start line for this item’s attribute content.

The item header line contains the information that was specified in <ctrlf2>, followed by the line numbers for the first and last line for the attribute content.

C <YYYYMMTThhmmss>

Time of creation of the item version

U <YYYYMMTThhmmssnnnn>

Time of modification of the item version; nnnn is a counter that makes it possible to differentiate between the updates of two versions of an item when the time stamps are otherwise identical.

<att_type>

Attribute type or information

B - Binary attribute
L - Link attribute
SA - Item-specific system attribute
T - Text attribute
V - Value attribute
I - Namespace content
N - Name list

<att_name>

Attribute name in case of attribute type (B, L, SA, T, or V).

NAMESPACE in case of namespace content (I).

NAMELIST in case of name list (N).

<value>

Attribute content

For value attributes, the attribute content will be written immediately after the attribute name. Since value attributes never occupy more than one line, the number of lines <line_counter> will not be displayed.

For all other attributes, display of the attribute content begins in the line that follows the attribute header line. In this case, the attribute header line contains the number of lines of the attribute content that follow the attribute name.

Which content will be displayed for link attributes is specified via the <ctrl_lnk> entry in work area <wa3>.

The content of binary attributes will be displayed in hexadecimal format.

<line_counter>

Number of lines occupied by attribute content, excluding attribute header line. If the line number is 0, the attribute has no content or the attribute does not exist for that item.

$SDCAC Examples

Examples for Item Search with Specified Conditions

Example 1:

How to use wildcard characters for the item search:

$REDLN COND

$DEL 1 $

$APPEND

TYPE = DO & (NAME ~/ JA@* | NAME ~/ ??A@*)

.

$QUIT

$SDCAC PATH D COND TN

$PRINT

The $SDCAC command considers all items of the current configuration path. The entries in the COND work area determine that only items satisfying these conditions will be listed in the current work area:

Items must be of type DO, and their names must begin with JA or have an A in the third character position. Whether the names begin with an upper- or lowercase J is not significant.

The work area is aligned in columns and contains one item type and name per line. Its content might look as follows:

DO JAVAPACK03

DO Jarfi09

DO CLASS07

DO LCARCHIV

DO VPa007

Example 2:

How to escape wildcard characters so that they will be interpreted as regular characters in a Rochade word, in this case, items of type DO that have an asterisk (*) or a question mark (?) in their names:

$REDLN COND

$DEL 1 $

$APPEND

TYPE = DO & (NAME / J\@*@* | NAME ~/ ??\?@*)

&

VA PTF > INT 3 & ACTIVE

.

$QUIT

$SDCAC PATH D COND TN

$PRINT

The $SDCAC command considers all items in the current configuration path. In accordance with the instructions in work area COND, only items that fulfill these conditions are listed in the current work area:

The items must be of type DO, with names beginning with J* or with a question mark (?) in the third position.

The value attribute PTF must be set to an integer value > 3 and the item must be an active item.

The work area is aligned in columns and contains an item type and name per line. Its content might look as follows:

DO J*pack01

DO J*PACK

DO J*cl07

DO AP?Ver1

DO RO?Version_3

Example 3:

How to search for specific strings in an item’s various attributes:

$REDLN CONTRL

$DEL 1 $

$APPEND

TA SOURCE / @*DATE@* | TA SOURCE ~/ @*TIME@*

| TA SOURCE / @*??/??/??@*

| TA EXEC / @*DATE@* | TA EXEC ~/ @*TIME@*

| TA EXEC / @*??/??/??@*

| TA ACTION / @*DATE@* | TA ACTION ~/ @*TIME@*

| TA ACTION / @*??/??/??@*

.

$QUIT

$SDCAC PATH D CONTRL TNOW

$PRINT

The $SDCAC command considers all items in the current configuration path. In accordance with the instructions in work area CONTRL, the text attributes SOURCE, EXEC and ACTION are searched for the presence of character strings that could be date expressions. Because the item type is not specified, all item types in the current configuration path are considered.

Strings such as MANDATE, VALIDATE, etc. also match the wildcard expression @*DATE@*.

The work area is structured in words that are separated by a blank, and each line contains an item type, an item name, and the item identification, as in this example:

DO TEST1 0000000000000D6C

TEMPLATE DO 0000000000000854

GRAPHIC_SHAPE DATE 0000000000000928

GRAPHIC_SHAPE DATE_INACTIVE 0000000000000929

GRAPHIC_SHAPE DATEAREA 000000000000092A

GRAPHIC_SHAPE DATEAREA_INACTIVE 000000000000092B

Example 4:

How NAME and A_NAME conditions may be used effectively. Assuming that an item of type DB2/TABLE is contained within the database with the names FILE, F_ID, and FL:

$REDLN CONTRL

$DEL 1 $

$APPEND

TYPE = DB2/TABLE & NAME = FILE & A_NAME = F_ID

.

$QUIT

$SDCAC PATH D CONTRL TNOW

$PRINT

$SDCAC searches for the item name FILE in the database’s naming catalog. The item type has been restricted to DB2/TABLE. Only when a matching entry can be found will the item corresponding to it be read. If an alias name F_ID exists for this item, then the condition is satisfied and the item will be listed in the current work area.

DB2/TABLE FILE 0000000000064092

In contrast, the condition

TYPE = DB2/TABLE & A_NAME = FILE & A_NAME = F_ID

requires not only that the naming catalog be read, but also the item itself. $SDCAC reads all items of the type DB2/TABLE in the database and checks for each one whether it has both the names FILE and FILE_ID. If there are a great number of items of this type, the command will accordingly take longer time to execute, since reading the items is more time-consuming than searching the naming catalog.

If the condition is satisfied, the work area has content similar to this:

DB2/TABLE FILE 0000000000064092

DB2/TABLE F_ID 0000000000064092

Example 5:

This example is analogous to example 4 but aims to demonstrate the effective use of the XNAME and A_XNAME conditions. This examples assumes that an item of type DB2/TABLE has the name FNAME in naming group 1 and the name F_ID in naming group 2.

$REDLN CONTRL

$DEL 1 $

$APPEND

TYPE = DB2/TABLE & XNAME 1 * = FNAME & A_XNAME 2 * = F_ID

.

$QUIT

$SDCAC PATH D CONTRL TX=1OW

$PRINT

$SDCAC searches the database’s naming catalog for the item name FNAME in naming group 1. The item type has been restricted to DB2/TABLE. Only when a matching entry has been found will the corresponding item be read. If that item also has the name F_ID in naming group 2, the condition is met and the item will be listed in the current work area.

DB2/TABLE 0000000000000000 FNAME 0000000000064092

After replacing the initial condition in work area CNTRL with this condition:

TYPE = DB2/TABLE & A_XNAME 1 * = FNAME & A_XNAME 2 * = F_ID

$SDCAC reads all items of type DB2/TABLE in the database and checks for each one whether it has the name FNAME in naming group 1 and the name F_ID in naming group 2. If there is a great number of items of this type, the command will accordingly take longer time to execute, since reading the items is more time-consuming than searching the naming catalogue.

The current work area will then have this content:

DB2/TABLE 0000000000000000 FNAME 0000000000064092

DB2/TABLE 0000000000000000 F_ID 0000000000064092

Example 6:

Shows how to search for items of the DB2/COLUMN type that contain an A within their name and that are referenced by the item DB2/TABLE CUSTOMER.

$REDLN COND

$DEL 1 $

$APPEND

TYPE ~/ @DB2/COLUMN & ( NAME / @*A@* )&

( LA DB2/HAS-COLUMN <- ITEM 0 DB2/TABLE 0 @CUSTOMER )

.

$QUIT

$SDCAC PATH D COND STNW

$PRINT

Assuming that there are two items that satisfy the condition in COND, the current work area will look like this:

I DB2/COLUMN ADDRESS

I DB2/COLUMN NAME

Example 7:

Shows how you can have all the students listed whose advisor is a particular faculty member, for example, Roy Snyder:

#$REDLN COND

#$DEL 1 $

BEGIN-DATA

(TYPE ~= U_STUDENT)

AND

(LA ADVISOR -> TYPE U_FACULTY NAME ~= SNYDER_ROY)

END-DATA

#$QUIT

#$SDCAC PATH D COND TNOW

The result could look similar to this:

U_STUDENT ANDREESEN_PAMELA 0000000000008442

U_STUDENT ROUSSEAU_GINA 000000000000848C

Example 8:

Shows how you can list all courses that the student ANDREESEN_PAMELA completed with the grade EXCELLENT. The grade is stored in a qualifier.

#$REDLN COND

#$DEL 1 $

BEGIN-DATA

(TYPE ~= U_COURSE)

AND

(LA COMPLETED_COURSES <- TYPE U_STUDENT

NAME ~= ANDREESEN_PAMELA INFO ~= EXCELLENT)

END-DATA

#$QUIT

#$SDCAC PATH D COND TN0W

The result could look similar to this:

U_COURSE BIO_357 00000000000081CC

U_COURSE CHEM_106 00000000000081ED

U_COURSE MATH_103 000000000000821C

Example for Listing Attribute Contents

Example 9:

Shows how to display all text, link, and value attributes of items of type DB2/TABLE with a name that begins with the letter P:

$REDLN COND

$DEL 1 $

$APPEND

TYPE = DB2/TABLE & (NAME / P@*)

.

$QUIT

$REDLN W_ATT

$DEL 1 $

$APPEND

T DB2/TABLE *

L DB2/TABLE * TWX=0

V DB2/TABLE

C DB2/TABLE

U DB2/TABLE

.

$QUIT

$SDCAC PATH D COND ASTNW W_ATT ATT_CONT

$PRINT

$REDLN ATT_CONT

$PRINT

$QUIT

The $SDCAC command considers all items in the current configuration path. In accordance with the instructions in work area COND, only items that are of the DB2/TABLE type and have a name that begins with the letter P are listed in the current work area.

In the ATT_CONT work area, the content of all text and value attributes of these items will be listed.

Assuming that there are two items that satisfy the condition in COND, the current work area will look similar to this:

1 14 A DB2/TABLE P1CUST

15 23 A DB2/TABLE PLIST_DELIVER

The ATT_CONT work area will have this content:

H 1 14 A DB2/TABLE P1CUST

C 20021209110935

U 2002120911143300003

T DEFINITION 1

Customer List for P1

T DB2/COMMENT_ON_TABLE 2

C01 Product List: Rochade base package Scanners

C02 Product List: Rochade extended package, WebAccess, Busses

T DB2/BASETABLE 2

->DB2/TABLE CUSTOMER

->DB2/TABLE MEMBER

L DB2/BASETABLE 2

DB2/TABLE 0000000000000000 CUSTOMER

DB2/TABLE 0000000000000000 MEMBER

V &OWNER EU

V &STAMP 20070123.090344.EU

H 15 23 A DB2/TABLE PLIST_DELIVER

C 20021209111517

U 2002120911162600002

T DEFINITION 1

Products delivered to customers

T DB2/BASETABLE 1

->DB2/TABLE P1CUST

L DB2/BASETABLE 1

DB2/TABLE 0000000000000000 P1CUST

V &OWNER CS

V &STAMP 20070305.090377.CS

Return Codes

1

Server error

2

Configuration <cnf> invalid

3

Attribute <att_name> in <wa2> does not exist or BACKLINK, PROPERTY or DOCIDENT was specified as the attribute name

4

Syntax error <wa2> - operator was expected

5

Syntax error <wa2> - too many right parentheses

6

Syntax error <wa2> - missing right parenthesis

7

Syntax error <wa2> - elementary condition missing

8

Syntax error <wa2> - value does not match the type specified

9

Syntax error <wa2> - elementary condition invalid; $COL and $LN contain the column and line position where the error occurred

A

<wa2> invalid or does not exist; <wa4> could not be created

B

<wa1> invalid or does not exist or, within a $QRY command, an item list in the form of <ctrlf1> <wa1> was transferred to the command $SDCAC

C

<wa3> invalid or does not exist

D

Redundant entries for an attribute type in <wa3>

E

<wa4> not specified

F

First parameter invalid (neither CFG nor PATH)

I

Command interrupted due to a condition in $QRY

L

One of the entries in <ctrlf1>, <ctrlf2>, <ctrlf3> is invalid or word mode W was not specified for naming group

M

Not enough memory

O

Work area overflow

S

A character specified in <ctrlf1> or <ctrlf2> is invalid

V

The variable specified in <wa2> does not exist

T

Command executed successfully