New (ProcedureInfo constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 35: Line 35:
<tr><th>GROUP</th><td>The named group must be open.<ul><li>If a <var>TEMP GROUP</var> by that name is open, the procedure is located in that group's <var>PROCFILE</var>.<li>Otherwise (a <var>PERM GROUP</var> by that name must be open), the procedure is located in that group's <var>PROCFILE</var>.</ul></td></tr>
<tr><th>GROUP</th><td>The named group must be open.<ul><li>If a <var>TEMP GROUP</var> by that name is open, the procedure is located in that group's <var>PROCFILE</var>.<li>Otherwise (a <var>PERM GROUP</var> by that name must be open), the procedure is located in that group's <var>PROCFILE</var>.</ul></td></tr>
<tr><th>TEMP GROUP</th><td>The named <var>TEMP</var> group must be open; the procedure is located in that group's <var>PROCFILE</var>.</td></tr>
<tr><th>TEMP GROUP</th><td>The named <var>TEMP</var> group must be open; the procedure is located in that group's <var>PROCFILE</var>.</td></tr>
<tr><th>PERM GROUP</th><td>The named <var>PERM</var> group must be open; the procedure is located in that group's <var>PROCFILE</var>.
<tr><th nowrap>PERM GROUP</th><td>The named <var>PERM</var> group must be open; the procedure is located in that group's <var>PROCFILE</var>.
  Also, a <var>TEMP GROUP</var> by that name must <b>not</b> be open.</td></tr>
  Also, a <var>TEMP GROUP</var> by that name must <b>not</b> be open.</td></tr>
</table>
</table>

Revision as of 17:03, 25 July 2012

Create a new ProcedureInfo instance (ProcedureInfo class)

[Introduced in Sirius Mods 7.8]


Syntax

%procedureInfo = [%(ProcedureInfo):]New( In= string, Name= string)

Syntax terms

%outProcedureInfo A ProcedureInfo object variable. If the procedure identified by this method's parameters is not found, New returns a Null object.
[%(ProcedureInfo):] The optional class name in parentheses denotes a Constructor. See "Usage notes", below, for more information about invoking a ProcedureInfo Constructor.
In This required, name required parameter is a string that specifies the file or group that contains the procedure whose information is being extracted. See the "Usage notes" below.
Name This required, name required, parameter is a case-sensitive string that contains the exact name of the procedure whose information is being extracted.

Usage notes

  • As described in "Using New or other Constructors", New can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is Null:

    %procInf = new %procInf = %(ProcedureInfo):new %procInf = %procInf:new

  • To provide a single display of the information of multiple procedures, you can use the List method.
  • The In named argument specifies the file or group name containing the procedure; this name can optionally be preceded by:
    FILEThe named file must be open, and the procedure is located in that file.
    GROUPThe named group must be open.
    • If a TEMP GROUP by that name is open, the procedure is located in that group's PROCFILE.
    • Otherwise (a PERM GROUP by that name must be open), the procedure is located in that group's PROCFILE.
    TEMP GROUPThe named TEMP group must be open; the procedure is located in that group's PROCFILE.
    PERM GROUPThe named PERM group must be open; the procedure is located in that group's PROCFILE. Also, a TEMP GROUP by that name must not be open.

    If a single word is provided for In (that is, none of the keywords in the above table precedes the name):

    • If it is the direct result of $Curfile or $Update, then the procedure is located in the file by that name, whether or not a group with the same name is open. The file must be open. An example of the direct use of $Curfile is:

      %proc = new(in=$curfile, name=%s)

      The following is not a direct use; if there is a group open with the same name as the value of $Curfile, the procedure is located in that group:

      %f = $curfile %proc = new(in=%f, name=%s)

    • Otherwise, if the name is that of an open TEMP group, the procedure is located in that group's PROCFILE.
    • Otherwise, if the name is that of an open PERM group, the procedure is located in that group's PROCFILE.
    • Otherwise, the name must be that of an open file, and the procedure is located in that file.

    Wherever the procedure is located, the group (if located in a PERM group) or file must be open with the X'0200' bit set.

Examples

... %procInfo=New(name='SSLP-REQ', in='FILE MYFILE') printText {%procInfo:name} {%procInfo:lastUpdateTime('YYYYMMDDHHMISS') ...

The statements above produce a result like:

SSLP-REQ 20110715094616

See also