$FunSkip: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$FunSkip}} <span class="pageSubtitle"><section begin="desc" />Skip to next output record for $FUNIMG, $FunsStr<section end="desc" /></span> <p class="warning">Mos...")
 
m (UL Interface becomes SOUL Interface)
 
(34 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$FunSkip}}
{{DISPLAYTITLE:$FunSkip}}
<span class="pageSubtitle"><section begin="desc" />Skip to next output record for $FUNIMG, $FunsStr<section end="desc" /></span>
<span class="pageSubtitle">Skip to next output record for $FunImg, $FunsStr</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $FunSkip function is [[to be entered]].</p>
This skips the current <var class="product">[[Fast/Unload]]</var> output record for a request, so subsequent <var>[[$FunImg]]</var> and <var>[[$FunsStr]]</var> calls operate on the next record.


The <var>$FunSkip</var> function accepts one argument and returns a numeric result.


This skips the current ''[[Fast/Unload]]'' output record for a request so that subsequent $FunImg and $FunsStr calls will operate on the next record.
The $FunSkip function accepts one argument and returns a numeric result.
The only argument is the request identifier returned by $FunLoad for the request from which data is to be retrieved. This is a required argument.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $FunSkip(req_num)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$FunSkip</span>(<span class="term">req_num</span>)</p>
<section end="syntax" /></p>
<p class="caption">$FunSkip Function
</p>
<p class="caption">%RESULT is set to 1, or it is set to an error code if there is no record to skip.</p>
<p class="code">
1 - Record skipped
0 - &FUNL. completed with return code 0; no more data
-1 - Request not found
<-1 - &FUNL. completed with non-zero return code, value
returned is negative of return code; no more data
</p>
<p class="caption">$FunSkip Error Codes
</p>


The only argument is the request identifier returned by <var>$FunLoad</var> for the request from which data is to be retrieved. This is a required argument.
<p>
<var class="term">%result</var> is set to either of these:</p>
<ul>
<li>1</li>


If ''[[Fast/Unload]]'' has not unloaded any records yet, $FunSkip will wait for the first record. If $FunSkip returns a value less than or equal to 0, the request has completed.
<li>An error code, if there is no record to skip:
<p class="code">  1 &mdash; Record skipped
  0 &mdash; Fast/Unload completed with return code 0; no more data
-1 &mdash; Request not found
<-1 &mdash; Fast/Unload completed with non-zero return code, value
      returned is negative of return code; no more data </p></li>
</ul>


$FUNSKIPs can be mixed with $FunsStr and $FunImg calls for the same request. In addition, multiple unloads can be performed simultaneously with $FunSkip calls for the different requests mixed freely.  
==Usage notes==
<ul>
<li>If <var class="product">Fast/Unload</var> has not unloaded any records yet, <var>$FunSkip</var> waits for the first record. If <var>$FunSkip</var> returns a value less than or equal to 0, the request has completed. </li>


<li><var>$FunSkips</var> can be mixed with <var>$FunsStr</var> and <var>$FunImg</var> calls for the same request. In addition, multiple unloads can be performed simultaneously with <var>$FunSkip</var> calls for the different requests mixed freely. </li>
</ul>


The following example compares the first two bytes of each unloaded record with 'XX'. If they are equal, the record is copied into image 'IMAGE' and then processed; otherwise the record is simply skipped.
==Example==
<p class="code"> %REQ = $FunLoad('DATA', , , '*')
The following example compares the first two bytes of each unloaded record with <code>XX</code>. If they are equal, the record is copied into image <code>IMAGE</code> and then processed; otherwise the record is simply skipped.
IF %REQ LE 0 THEN
<p class="code">%REQ = $FunLoad('DATA', , , '*')
STOP
IF %REQ LE 0 THEN
END IF
STOP
END IF
%RC = 1
REPEAT WHILE %RC > 0
%TEST = $FunsStr( %REQ, 1, 2)
IF %TEST EQ 'XX' THEN
%RC = $FunImg( %REQ, %IMAGE:ITEM )
CALL PROCESS
ELSE
%RC = $FunSkip
END IF
END REPEAT
   
   
%RC = 1
REPEAT WHILE %RC > 0
%TEST = $FunsStr( %REQ, 1, 2)
IF %TEST EQ 'XX' THEN
%RC = $FunImg( %REQ, %IMAGE:ITEM )
CALL PROCESS
ELSE
%RC = $FunSkip
END IF
END REPEAT
</p>
</p>
<p class="code">
<ul>
<li>&FUNULI


==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<li>[[Fast/Unload SOUL Interface]]
</ul>
</ul>
</p>
<p class="caption">Products authorizing $FunSkip
</p>


[[Category:$Functions|$FunSkip]]
[[Category:$Functions|$FunSkip]]
[[Category:Fast/Unload SOUL Interface]]

Latest revision as of 20:17, 16 March 2015

Skip to next output record for $FunImg, $FunsStr

This skips the current Fast/Unload output record for a request, so subsequent $FunImg and $FunsStr calls operate on the next record.

The $FunSkip function accepts one argument and returns a numeric result.

Syntax

%result = $FunSkip(req_num)

The only argument is the request identifier returned by $FunLoad for the request from which data is to be retrieved. This is a required argument.

%result is set to either of these:

  • 1
  • An error code, if there is no record to skip:

    1 — Record skipped 0 — Fast/Unload completed with return code 0; no more data -1 — Request not found <-1 — Fast/Unload completed with non-zero return code, value returned is negative of return code; no more data

Usage notes

  • If Fast/Unload has not unloaded any records yet, $FunSkip waits for the first record. If $FunSkip returns a value less than or equal to 0, the request has completed.
  • $FunSkips can be mixed with $FunsStr and $FunImg calls for the same request. In addition, multiple unloads can be performed simultaneously with $FunSkip calls for the different requests mixed freely.

Example

The following example compares the first two bytes of each unloaded record with XX. If they are equal, the record is copied into image IMAGE and then processed; otherwise the record is simply skipped.

%REQ = $FunLoad('DATA', , , '*') IF %REQ LE 0 THEN STOP END IF %RC = 1 REPEAT WHILE %RC > 0 %TEST = $FunsStr( %REQ, 1, 2) IF %TEST EQ 'XX' THEN %RC = $FunImg( %REQ, %IMAGE:ITEM ) CALL PROCESS ELSE %RC = $FunSkip END IF END REPEAT

Products authorizing $FunSkip