$FunImg: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 1: Line 1:
{{DISPLAYTITLE:$FunImg}}
{{DISPLAYTITLE:$FunImg}}
<span class="pageSubtitle"><section begin="desc" />Retrieve data from active &FUNL request into image<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Retrieve data from active [[Fast/Unload]] request into image<section end="desc" /></span>
 
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $FunImg function is [[to be entered]].</p>
 
 


This retrieves data from an active ''[[Fast/Unload]]'' request into an image.  
This retrieves data from an active ''[[Fast/Unload]]'' request into an image.  


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


The second argument is the image item to which data is to be returned. Data is returned starting at that image item and continuing to the end of the image or until no more ''[[Fast/Unload]]'' data is available in the current record.
The second argument is the image item to which data is to be returned. Data is returned starting at that image item and continuing to the end of the image or until no more ''[[Fast/Unload]]'' data is available in the current record.
Line 27: Line 23:
<p class="caption">$FunImg Error Codes
<p class="caption">$FunImg Error Codes
</p>
</p>


If ''[[Fast/Unload]]'' has not unloaded any records yet, $FunImg will wait for the first record. Each invocation of $FunImg skips over the record processed so that the next invocation will retrieve the next unloaded record.  
If ''[[Fast/Unload]]'' has not unloaded any records yet, $FunImg will wait for the first record. Each invocation of $FunImg skips over the record processed so that the next invocation will retrieve the next unloaded record.  


$FUNIMG's can be mixed with $FunSkip and $FunsStr calls for the same request. In addition, multiple unloads can be performed simultaneously with $FunImg calls for the different requests mixed freely.  
$FunImg's can be mixed with [[$FunSkip]] and [[$FunsStr]] calls for the same request. In addition, multiple unloads can be performed simultaneously with $FunImg calls for the different requests mixed freely.  


For example
For example
Line 46: Line 41:


<ul>
<ul>
 
<li>[[Fast/Unload User Language Interface]]
<li>&FUNULI
 
</ul>
</ul>
   
   
</p>
</p>
<p class="caption">Products authorizing $FunImg
<p class="caption">Products authorizing $FunForc
</p>
</p>


 
[[Category:$Functions|$FunForc]]
[[Category:$Functions|$FunImg]]
[[Category:Fast/Unload $functions]]

Revision as of 16:33, 1 February 2011

<section begin="desc" />Retrieve data from active Fast/Unload request into image<section end="desc" />

This retrieves data from an active Fast/Unload request into an image.

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

The second argument is the image item to which data is to be returned. Data is returned starting at that image item and continuing to the end of the image or until no more Fast/Unload data is available in the current record.

Syntax

<section begin="syntax" /> %RESULT = $FunImg(req_num, image_item) <section end="syntax" />

$FunImg Function

%RESULT is set either to the number of bytes returned, or to an error code if no data was returned.

>0 - Number of bytes in unloaded record 0 - &FUNL completed with return code 0; no more data -1 - Request not found -2 - Invalid image item <-2 - &FUNL completed with non-zero return code, value returned is negative of return code; no more data

$FunImg Error Codes

If Fast/Unload has not unloaded any records yet, $FunImg will wait for the first record. Each invocation of $FunImg skips over the record processed so that the next invocation will retrieve the next unloaded record.

$FunImg's can be mixed with $FunSkip and $FunsStr calls for the same request. In addition, multiple unloads can be performed simultaneously with $FunImg calls for the different requests mixed freely.

For example

%REQ = $FunLoad('DATA', , , '*') IF %REQ LE 0 THEN STOP END IF %RC = $FunImg( %REQ, %IMAGE:ITEM )

starts an unload request and then returns the first record into image 'IMAGE', starting at item 'ITEM' in the image. If the record is shorter than the rest of the image (starting at 'ITEM'), then only as much data as is in the Fast/Unload record is used to overlay the image. All other data in the image is left unchanged. If the record is longer than the rest of the image, the record is truncated before overlaying the image. In all cases, when %RC is positive, it contains the length of the original Fast/Unload record.

Products authorizing $FunForc