$Proc List: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$Proc_List}} <span class="pageSubtitle"><section begin="desc" />$list of information about procedures in file<section end="desc" /></span> <p class="warning">Most...")
 
(Automatically generated page update)
 
(37 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Proc_List}}
{{DISPLAYTITLE:$Proc_List}}
<span class="pageSubtitle"><section begin="desc" />$list of information about procedures in file<section end="desc" /></span>
<span class="pageSubtitle">$list of information about procedures in file</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Proc_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 $Proc_List function is the [[AppendProcedureList (Stringlist function)]].</p>


This function returns information about procedures in a procedure file or group into a $list.  
This function returns information about procedures in a procedure file or group into a $list.  


Also see $PROC_LISTG, which gets a list of procedures in a group, and $PrcLEx and $PRCLEXG, which return the date of last update with a 2-digit year.  
Also see <var>[[$Proc_ListG]]</var>, which gets a list of procedures in a group, and <var>[[$PrcLEx]]</var> and <var>[[$PrcLExG]]</var>, which return the date of last update with a 2-digit year.  


The $Proc_List function accepts four arguments and returns a numeric result.  
The <var>$Proc_List</var> 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 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.  
Line 17: Line 17:


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"><section begin="syntax" /> %RESULT = $Proc_List(file, pname, account, date)
<p class="syntax"><span class="term">%result</span> = $Proc_List(file, pname, account, date)
<section end="syntax" /></p>
<p class="caption">$Proc_List Function
</p>
</p>
<p class="caption">%RESULT is a either a $list identifier or a negative error code.</p>
All invocations of a particular call to $Proc_List 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.


The output $list produced by $Proc_List has the following format :
<p>
<var class="term">%result</var> is a either a $list identifier or a negative error code.</p>
 
===Return codes===
<p class="code">-1 - File/group not found
-2 - No procedures match search criteria
-3 - No room to create $list items
    (if LISTFC <var>$SirParm</var> parameter not set)
-4 - Invalid selection criterion
</p>
 
==Usage notes==
<ul>
<li>All invocations of a particular call to <var>$Proc_List</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.
 
<li>The output $list produced by <var>$Proc_List</var> has the following format:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>Col 1-10</th>
<tr><th>Col 1-10</th>
Line 38: Line 50:
<td>Procedure name
<td>Procedure name
</td></tr></table>
</td></tr></table>
<p class="code">
</ul>
-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
</p>
<p class="caption">$Proc_List Error Codes
</p>


==Examples==
The following program displays information for all procedures in file '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 file '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 = $Proc_List('HOMER', 'S*', 'A*')
FOR %I FROM 1 TO $ListCnt(%LIST)
%LIST = $Proc_List('HOMER', 'S*', 'A*')
  PRINT $ListInf(%LIST, %I)
END FOR
FOR %I FROM 1 TO $ListCnt(%LIST)
END
PRINT $ListInf(%LIST, %I)
END FOR
END
</p>
</p>
<p class="code">
<ul>
<li>&SFUNC
<li>&SIRPRO
<li>&JWEBS


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


[[Category:$Functions|$Proc_List]]
[[Category:$Functions|$Proc_List]]

Latest revision as of 22:52, 20 September 2018

$list of information about procedures in file

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

This function returns information about procedures in a procedure file or group into a $list.

Also see $Proc_ListG, which gets a list of procedures in a group, and $PrcLEx and $PrcLExG, which return the date of last update with a 2-digit year.

The $Proc_List 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 '*' 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 = $Proc_List(file, pname, account, date)

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

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

Usage notes

  • All invocations of a particular call to $Proc_List 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.
  • The output $list produced by $Proc_List has the following format:
    Col 1-10 Account id of last updater.
    Col 12-19 Size of procedure in bytes.
    Col 21-30 Date of last update (YYYY/MM/DD).
    Col 32-39 Time of last update (BH:MI:SS).
    Col 41- Procedure name

Examples

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

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

Products authorizing $Proc_List