$Setg Sys List: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(33 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Setg_Sys_List}}
{{DISPLAYTITLE:$Setg_Sys_List}}
<span class="pageSubtitle"><section begin="desc" />Get list of system-wide globals<section end="desc" /></span>
<span class="pageSubtitle">Get list of system-wide globals</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Setg_Sys_List function is [[to be entered]].</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Setg_Sys_List function is <var>[[ListOfGlobals (System function)|ListOfGlobals]]</var>.</p>


This function returns names and values from the current set of system global variables. It may be useful in debugging situations.  
This function returns names and values from the current set of system global variables. It may be useful in debugging situations.  


The $Setg_Sys_List function accepts three arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.  
The <var>$Setg_Sys_List</var> function accepts three arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.  


The first argument identifies the $list to which items for the subsystem globals will be added. This is a required argument.  
The first argument identifies the $list to which items for the subsystem globals will be added. This is a required argument.  
Line 13: Line 13:


The third argument is a pattern string; all system global variables matching this pattern are placed on the output $list. This is an optional argument; if omitted, all system global variables are placed on the output $list.
The third argument is a pattern string; all system global variables matching this pattern are placed on the output $list. This is an optional argument; if omitted, all system global variables are placed on the output $list.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RC = $Setg_Sys_List(list_id, sep, glob_pat)
<p class="syntax"><span class="term">%rc</span> = <span class="literal">$Setg_Sys_List</span>(<span class="term">list_id</span>, [<span class="term">sep</span>], [<span class="term">glob_pat</span>])
<section end="syntax" /></p>
<p class="caption">$Setg_Sys_List Function
</p>
</p>
<p class="caption">%RC is set to 0 or to an error indicator.</p>
 
<p class="code">  
<p>
0 - No errors
<var class="term">%rc</var> is set to 0 or to an error indicator.</p>
-3 - No room to create $list items
 
(if LISTFC $SirParm parameter not set)
===Return codes===
-6 - $List identifier invalid
<p class="code"> 0 - No errors
</p>
-3 - No room to create $list items
<p class="caption">$Setg_Sys_List return codes
    (if LISTFC <var>$SirParm</var> parameter not set)
-6 - $List identifier invalid
</p>
</p>


==Usage notes==
<ul>
<li>This function can be used for debugging, to retrieve values of selected system global variables. The names global variables can be specified using the following wildcard characters:


This function can be used for debugging, to retrieve values of selected system global variables. The names global variables can be specified using the following wildcard characters:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>*</th>
<tr><th>*</th>
<td>Matches any number of characters including none</td></tr>
<td>Matches any number of characters including none</td></tr>
<tr><th>?</th>
<tr><th>?</th>
<td>Matches any single character</td></tr>
<td>Matches any single character</td></tr>
<tr><th>"</th>
<tr><th>"</th>
<td>Indicates that the next character must be treated literally even if it is a wildcard character.
<td>Indicates that the next character must be treated literally even if it is a wildcard character.
</td></tr></table>
</td></tr></table>


<li>The format of the items created by $Setg_Sys_List is as follows:


<table>
<tr class="head"><th>Length</th> <th>Description</th></tr>
<tr><th><var>10</var></th> <td>Blanks</td></tr>
<tr><th>gg</th> <td>Global name</td></tr>
<tr><th>ss</th> <td>Separator string</td></tr>
<tr><th>vv</th> <td>Global value</td></tr>
</table>
</ul>


The format of the items created by $Setg_Sys_List is as follows; '''ss''' is the length of the separator string, '''gg''' is the length of the global name, '''vv''' is the length of the global value:
==Example==
<p class="code"> Length Description
The following request displays information about the system global variables whose names start with the string 'DATE' or with the string 'EXPIRE'. A single slash character ("/") is used to separate the global name from the global value. (This example assumes that the combined length of the global name and value is less than 245.)
------ ----------------
10 Blanks
gg Global name
ss Separator string
vv Global value
</p>
 
 


For example, the following request displays information about the system global variables whose names start with the string 'DATE' or with the string 'EXPIRE'. A single slash character ("/") is used to separate the global name from the global value. (This example assumes that the combined length of the global name and value is less than 245.)
<p class="code">BEGIN
<p class="code"> BEGIN
%L FLOAT
%L FLOAT
%X FLOAT
%X FLOAT
%L = $ListNew
%L = $ListNew
%X = $Setg_Sys_List(%L, '/', 'DATE*')
%X = $Setg_Sys_List(%L, '/', 'DATE*')
&#42; Append more globals to $list:
* Append more globals to $list:
%X = $Setg_Sys_List(%L, '/', 'EXPIRE*')
%X = $Setg_Sys_List(%L, '/', 'EXPIRE*')
FOR %X FROM 1 TO $ListCnt(%L)
FOR %X FROM 1 TO $ListCnt(%L)
  PRINT $ListInf(%L, %X)
PRINT $ListInf(%L, %X)
END FOR
END FOR
END
END
</p>
</p>


 
==Products authorizing {{PAGENAMEE}}==
This $function is new in Version 5.5 of the ''[[Sirius Mods]]''.<p>
<ul class="smallAndTightList">
 
<li>[[List of $functions|Sirius functions]]
<ul>
<li>[[Janus Web Server]]
 
</ul>  
<li>&SFUNC
 
<li>&JWEBS
 
</ul>
</p>
<p class="caption">Products authorizing $Setg_Sys_List
</p>




[[Category:$Functions|$Setg_Sys_List]]
[[Category:$Functions|$Setg_Sys_List]]

Latest revision as of 22:52, 20 September 2018

Get list of system-wide globals

Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Setg_Sys_List function is ListOfGlobals.

This function returns names and values from the current set of system global variables. It may be useful in debugging situations.

The $Setg_Sys_List function accepts three arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one.

The first argument identifies the $list to which items for the subsystem globals will be added. This is a required argument.

The second argument is the string which is used to separate the global name from its value in each item of the output $list. This is an optional argument; if omitted, or if the null string is supplied, it defaults to a single byte with value X'00'. This separator value (X'00') can be particularly useful for sorting the output $list; see $Setg_Subsys_List for an example with sorting.

The third argument is a pattern string; all system global variables matching this pattern are placed on the output $list. This is an optional argument; if omitted, all system global variables are placed on the output $list.

Syntax

%rc = $Setg_Sys_List(list_id, [sep], [glob_pat])

%rc is set to 0 or to an error indicator.

Return codes

0 - No errors -3 - No room to create $list items (if LISTFC $SirParm parameter not set) -6 - $List identifier invalid

Usage notes

  • This function can be used for debugging, to retrieve values of selected system global variables. The names global variables can be specified using the following wildcard characters:
    * Matches any number of characters including none
    ? Matches any single character
    " Indicates that the next character must be treated literally even if it is a wildcard character.
  • The format of the items created by $Setg_Sys_List is as follows:
    Length Description
    10 Blanks
    gg Global name
    ss Separator string
    vv Global value

Example

The following request displays information about the system global variables whose names start with the string 'DATE' or with the string 'EXPIRE'. A single slash character ("/") is used to separate the global name from the global value. (This example assumes that the combined length of the global name and value is less than 245.)

BEGIN %L FLOAT %X FLOAT %L = $ListNew %X = $Setg_Sys_List(%L, '/', 'DATE*') * Append more globals to $list: %X = $Setg_Sys_List(%L, '/', 'EXPIRE*') FOR %X FROM 1 TO $ListCnt(%L) PRINT $ListInf(%L, %X) END FOR END

Products authorizing $Setg_Sys_List