$ProcDat: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
(Automatically generated page update)
 
(32 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$ProcDat}}
{{DISPLAYTITLE:$ProcDat}}
<span class="pageSubtitle"><section begin="desc" />Add lines from procedure to $list<section end="desc" /></span>
<span class="pageSubtitle">Add lines from procedure to $list</span>


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


The $ProcDat function accepts three arguments, and returns a numeric code.  
The <var>$ProcDat</var> function accepts three arguments, and returns a numeric code.  


The first argument identifies the $list to which lines from the currently open procedure will be added as $list items. This is a required argument.  
The first argument identifies the $list to which lines from the currently open procedure will be added as $list items. This is a required argument.  
Line 13: Line 13:


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $ProcDat ( list_identifier, num_lines, seq_inc )
<p class="syntax"><span class="term">%result</span> = $ProcDat ( list_identifier, num_lines, seq_inc )
<section end="syntax" /></p>
<p class="caption">$ProcDat Function
</p>
</p>
<p class="caption">%RESULT is set to indicate the success of the function.</p>


The third argument to $ProcDat is intended for use in conjunction with the [[$ListUpd]] and [[$ListCmp]] functions.  
<p>
<var class="term">%result</var> is set to indicate the success of the function.</p>
 
The third argument to <var>$ProcDat</var> is intended for use in conjunction with the <var>[[$ListUpd]]</var> and <var>[[$ListCmp]]</var> functions.  
 
===Return codes===
<p class="code">-1 - Current include level not opened by $ProcOpn
-3 - No room to create $list items
    (if LISTFC <var>$SirParm</var> parameter not set)
-5 - Required parameter missing
-6 - Invalid $list identifier
</p>


==Examples==
==Examples==
If procedure 'SUTPENS_HUNDRED' in file 'JACKSON' contains:
If procedure 'SUTPENS_HUNDRED' in file 'JACKSON' contains:
<p class="code"> B
<p class="code">B
FOR %I FROM 1 TO 10
FOR %I FROM 1 TO 10
PRINT %I
PRINT %I
END FOR
END FOR
END
END
</p>
</p>


This program:
This program:


<p class="code"> B
<p class="code">B
%LIST = $ListNew
   
   
%LIST = $ListNew
%RESULT = $ProcOpn('SUTPENS_HUNDRED', 'JACKSON')
%RESULT = $ProcDat(%LIST, ,5000)
   
   
%RESULT = $ProcOpn('SUTPENS_HUNDRED', 'JACKSON')
FOR %I FROM 1 TO $ListCnt(%LIST)
%RESULT = $ProcDat(%LIST, ,5000)
  PRINT $ListInf(%LIST, %I)
END FOR
FOR %I FROM 1 TO $ListCnt(%LIST)
END
PRINT $ListInf(%LIST, %I)
END FOR
END
</p>
</p>


Prints the following:
Prints the following:


<p class="code"> 00005000B
<p class="code">00005000B
00010000FOR %I FROM 1 TO 10
00010000FOR %I FROM 1 TO 10
00015000 PRINT %I
00015000 PRINT %I
00020000END FOR
00020000END FOR
00025000END
00025000END
</p>
 
==Error codes==
<p class="code"> -1 - Current include level not opened by $ProcOpn
-3 - No room to create $list items
        (if LISTFC $SirParm parameter not set)
-5 - Required parameter missing
-6 - Invalid $list identifier
</p>
<p class="caption">$ProcDat return codes
</p>
</p>


==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]
<li>[[Sirius Functions]]
<li>[[Fast/Unload User Language Interface]]
<li>[[Fast/Unload User Language Interface]]
<li>[[Janus Web Server]]
<li>[[Janus Web Server]]
</ul>
</ul>
<p class="caption">Products authorizing $ProcDat
</p>


[[Category:$Functions|$ProcDat]]
[[Category:$Functions|$ProcDat]]

Latest revision as of 22:41, 20 September 2018

Add lines from procedure to $list

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

The $ProcDat function accepts three arguments, and returns a numeric code.

The first argument identifies the $list to which lines from the currently open procedure will be added as $list items. This is a required argument.

The second argument is an optional number of lines to be read. If the second argument is not provided, reading continues from the input procedure to the end of the procedure.

The third argument specifies a sequence number increment for 8 byte sequence numbers to be placed in front of each line in the output $list. This sequence number indicates both the starting sequence number and the sequence number increment. If this parameter is not provided, no sequence numbers are placed in front of the input lines.

Syntax

%result = $ProcDat ( list_identifier, num_lines, seq_inc )

%result is set to indicate the success of the function.

The third argument to $ProcDat is intended for use in conjunction with the $ListUpd and $ListCmp functions.

Return codes

-1 - Current include level not opened by $ProcOpn -3 - No room to create $list items (if LISTFC $SirParm parameter not set) -5 - Required parameter missing -6 - Invalid $list identifier

Examples

If procedure 'SUTPENS_HUNDRED' in file 'JACKSON' contains:

B FOR %I FROM 1 TO 10 PRINT %I END FOR END

This program:

B %LIST = $ListNew %RESULT = $ProcOpn('SUTPENS_HUNDRED', 'JACKSON') %RESULT = $ProcDat(%LIST, ,5000) FOR %I FROM 1 TO $ListCnt(%LIST) PRINT $ListInf(%LIST, %I) END FOR END

Prints the following:

00005000B 00010000FOR %I FROM 1 TO 10 00015000 PRINT %I 00020000END FOR 00025000END

Products authorizing $ProcDat