$FunImg: Difference between revisions
(Automatically generated page update) |
No edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Retrieve data from active Fast/Unload request into image</span> | <span class="pageSubtitle">Retrieve data from active Fast/Unload request into image</span> | ||
This retrieves data from an active | This retrieves data from an active <i>[[Fast/Unload]]</i> 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 | 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 <i>[[Fast/Unload]]</i> data is available in the current record. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><span class="term">%result</span> = <span class="literal">$FunImg</span>(<span class="term">req_num</span>, <span class="term">image_item</span>) | <p class="syntax"><span class="term">%result</span> = <span class="literal">$FunImg</span>(<span class="term">req_num</span>, <span class="term">image_item</span>) | ||
Line 24: | Line 24: | ||
</p> | </p> | ||
If | If <i>[[Fast/Unload]]</i> has not unloaded any records yet, <var>$FunImg</var> will wait for the first record. Each invocation of <var>$FunImg</var> 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 <var>$FunImg</var> 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 <var>$FunImg</var> calls for the different requests mixed freely. | ||
Line 38: | Line 38: | ||
</p> | </p> | ||
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 | 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 <i>[[Fast/Unload]]</i> 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 <i>[[Fast/Unload]]</i> record.<p> | ||
==Products authorizing {{PAGENAMEE}}== | ==Products authorizing {{PAGENAMEE}}== |
Revision as of 21:39, 11 November 2014
Retrieve data from active Fast/Unload request into 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 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
%result = $FunImg(req_num, image_item)
%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
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 $FunImg