$PrcLExG: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">$list of information about procedures in group or file</span>
<span class="pageSubtitle">$list of information about procedures in group or file</span>


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


This function returns information about procedures in a procedure file or group into a $list. This function is virtually identical to [[$PrcLEx]]. The main difference between [[$PrcLEx]] and <var>$PrcLExG</var> is that <var>$PrcLExG</var> returns the name of the file containing the procedure. This is useful if <var>$PrcLExG</var> is invoked against a procedure group.  
This function returns information about procedures in a procedure file or group into a $list. This function is virtually identical to <var>[[$PrcLEx]]</var>. The main difference between <var>[[$PrcLEx]]</var> and <var>$PrcLExG</var> is that <var>$PrcLExG</var> returns the name of the file containing the procedure. This is useful if <var>$PrcLExG</var> is invoked against a procedure group.  


Also see [[$Proc_ListG]] and [[$Proc_List]], which return the date of last update with a 4-digit year.  
Also see <var>[[$Proc_ListG]]</var> and <var>[[$Proc_List]]</var>, which return the date of last update with a 4-digit year.  


The <var>$PrcLExG</var> function accepts four arguments and returns a numeric result.  
The <var>$PrcLExG</var> function accepts four arguments and returns a numeric result.  
Line 14: Line 14:
The second argument is the procedure name that is to be selected. The procedure name may contain '*' characters to indicate wildcard matches. This is an optional parameter and defaults to all procedures.  
The second argument is the procedure name that is to be selected. The procedure name may contain '*' characters to indicate wildcard matches. This is an optional parameter and defaults to all procedures.  


The third argument is the account id of the last modifying user for the procedures to be selected. The account id may contain '*' characters to indicate wildcard matches. This is an optional parameter and defaults to all account ids.  
The third argument is the account id of the last modifying user for the procedures to be selected. The account id may contain asterisk (<tt>*</tt>) characters to indicate wildcard matches. This is an optional parameter and defaults to all account ids.  


The fourth argument is a string indicating the last modification date for the procedures to be selected. If specified, this parameter must be 6 bytes long and begin with either a '=', '<' or '>' character to indicate whether the date should be equal to, less than or greater than the following Julian date which is the last 5 characters. '>89200', for example, selects procedures last modified after day 200 of 1989. This is an optional parameter and defaults to all modification dates. Note that this 2-digit year date is interpreted with a CENTSPAN of 1975, so that values between 00000 and 74365 are considered to be in the years 2000-2074.
The fourth argument is a string indicating the last modification date for the procedures to be selected. If specified, this parameter must be 6 bytes long and begin with either a '=', '<' or '>' character to indicate whether the date should be equal to, less than or greater than the following Julian date which is the last 5 characters. '>89200', for example, selects procedures last modified after day 200 of 1989. This is an optional parameter and defaults to all modification dates. Note that this 2-digit year date is interpreted with a CENTSPAN of 1975, so that values between 00000 and 74365 are considered to be in the years 2000-2074.


==Syntax==
==Syntax==
<p class="syntax"><span class="term">%result</span> = <span class="literal">$PrcLExG</span>(<span class="term">file, pname, account, date)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$PrcLExG</span>([<span class="term">file</span>], [<span class="term">pname</span>], [<span class="term">account</span>], [<span class="term">date</span>])
</p>
</p>
<p>
<p>
</p>
<var class="term">%result</var> is a either a $list identifier or a negative error code.</p>
<p>%result is a either a $list identifier or a negative error code.</p>


All invocations of a particular call to <var>$PrcLExG</var> will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created.  
All invocations of a particular call to <var>$PrcLExG</var> will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created.  
Line 29: Line 29:
===Output format===
===Output format===
The output $list produced by <var>$PrcLExG</var> has the following format:
The output $list produced by <var>$PrcLExG</var> has the following format:
<table class="syntaxTable">
<table>
<tr><th>Col 1-10</th>
<tr><td>Col 1-10</td>
<td>Account id of last updater.</td></tr>
<td>Account id of last updater.</td></tr>
<tr><th>Col 12-19</th>
<tr><td>Col 12-19</td>
<td>Size of procedure in bytes.</td></tr>
<td>Size of procedure in bytes.</td></tr>
<tr><th>Col 21-28</th>
<tr><td>Col 21-28</td>
<td>Date of last update (YY/MM/DD).</td></tr>
<td>Date of last update (YY/MM/DD).</td></tr>
<tr><th>Col 30-37</th>
<tr><td>Col 30-37</td>
<td>Time of last update (BH:MI:SS).</td></tr>
<td>Time of last update (BH:MI:SS).</td></tr>
<tr><th>Col 39-46</th>
<tr><td>Col 39-46</td>
<td>File containing proc.</td></tr>
<td>File containing proc.</td></tr>
<tr><th>Col 47-</th>
<tr><td>Col 47-</td>
<td>Procedure name
<td>Procedure name
</td></tr>
</td></tr>
</table>
</table>


<p class="code">  
===Return codes===
  -1 - File/group not found
<p class="code">-1 - File/group not found
  -2 - No procedures match search criteria
-2 - No procedures match search criteria
  -3 - No room to create $list items
-3 - No room to create $list items
        (if LISTFC <var>$SirParm</var> parameter not set)
    (if LISTFC <var>$SirParm</var> parameter not set)
  -4 - Invalid selection criterion
-4 - Invalid selection criterion
</p>
<p class="caption">$PrcLExG Error Codes
</p>
</p>


==Examples==
==Examples==
The following program displays information for all procedures in group 'HOMER' beginning with the letter 'S' last updated by a user whose account id begins with the letter 'A'.
The following program displays information for all procedures in group 'HOMER' beginning with the letter 'S' last updated by a user whose account id begins with the letter 'A'.
<p class="code"> B
<p class="code">B
%LIST = $PrcLExG('HOMER', 'S*', 'A*')
%LIST = $PrcLExG('HOMER', 'S*', 'A*')
FOR %I FROM 1 TO $ListCnt(%LIST)
  PRINT $ListInf(%LIST, %I)
FOR %I FROM 1 TO $ListCnt(%LIST)
END FOR
PRINT $ListInf(%LIST, %I)
END
END FOR
END
</p>
</p>


==Products authorizing {{PAGENAMEE}}==  
==Products authorizing {{PAGENAMEE}}==  
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius Functions]]
<li>[[List of $functions|Sirius functions]]
<li>[[SirPro]]
<li>[[SirPro]]
<li>[[Janus Web Server]]
<li>[[Janus Web Server]]
</ul>
</ul>
<p>
</p>


[[Category:$Functions|$PrcLExG]]
[[Category:$Functions|$PrcLExG]]

Latest revision as of 22:52, 20 September 2018

$list of information about procedures in group or file

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

This function returns information about procedures in a procedure file or group into a $list. This function is virtually identical to $PrcLEx. The main difference between $PrcLEx and $PrcLExG is that $PrcLExG returns the name of the file containing the procedure. This is useful if $PrcLExG is invoked against a procedure group.

Also see $Proc_ListG and $Proc_List, which return the date of last update with a 4-digit year.

The $PrcLExG function accepts four arguments and returns a numeric result.

The first argument is the file or group name for which information is to be returned. This is an optional argument and defaults to the default file/group at compile time.

The second argument is the procedure name that is to be selected. The procedure name may contain '*' characters to indicate wildcard matches. This is an optional parameter and defaults to all procedures.

The third argument is the account id of the last modifying user for the procedures to be selected. The account id may contain asterisk (*) characters to indicate wildcard matches. This is an optional parameter and defaults to all account ids.

The fourth argument is a string indicating the last modification date for the procedures to be selected. If specified, this parameter must be 6 bytes long and begin with either a '=', '<' or '>' character to indicate whether the date should be equal to, less than or greater than the following Julian date which is the last 5 characters. '>89200', for example, selects procedures last modified after day 200 of 1989. This is an optional parameter and defaults to all modification dates. Note that this 2-digit year date is interpreted with a CENTSPAN of 1975, so that values between 00000 and 74365 are considered to be in the years 2000-2074.

Syntax

%result = $PrcLExG([file], [pname], [account], [date])

%result is a either a $list identifier or a negative error code.

All invocations of a particular call to $PrcLExG will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created.

Output format

The output $list produced by $PrcLExG has the following format:

Col 1-10 Account id of last updater.
Col 12-19 Size of procedure in bytes.
Col 21-28 Date of last update (YY/MM/DD).
Col 30-37 Time of last update (BH:MI:SS).
Col 39-46 File containing proc.
Col 47- Procedure name

Return codes

-1 - File/group not found -2 - No procedures match search criteria -3 - No room to create $list items (if LISTFC $SirParm parameter not set) -4 - Invalid selection criterion

Examples

The following program displays information for all procedures in group 'HOMER' beginning with the letter 'S' last updated by a user whose account id begins with the letter 'A'.

B %LIST = $PrcLExG('HOMER', 'S*', 'A*') FOR %I FROM 1 TO $ListCnt(%LIST) PRINT $ListInf(%LIST, %I) END FOR END

Products authorizing $PrcLExG