$FunWait: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:
<span class="pageSubtitle">Wait until asynchronous Fast/Unload request completes</span>
<span class="pageSubtitle">Wait until asynchronous Fast/Unload request completes</span>


This requests that the user wait until an asynchronous ''[[Fast/Unload]]'' request is completed.  
This requests that the user wait until an asynchronous <i>[[Fast/Unload]]</i> request is completed.  


The <var>$FunWait</var> function accepts one argument and returns a numeric result.  
The <var>$FunWait</var> function accepts one argument and returns a numeric result.  
Line 8: Line 8:
The only argument is a string that identifies the request number to be waited on. To wait on a request, the user must have initiated the request.  
The only argument is a string that identifies the request number to be waited on. To wait on a request, the user must have initiated the request.  


In the following example, two ASYNCH ''[[Fast/Unload]]'' requests are placed and then their completion is waited for. If FUNTSKN is 2 or greater, these requests can run in parallel.
In the following example, two ASYNCH <i>[[Fast/Unload]]</i> requests are placed and then their completion is waited for. If FUNTSKN is 2 or greater, these requests can run in parallel.
<p class="code"> %RNUM1 = $FunLoad('DATA1',..,'ASYNC')
<p class="code"> %RNUM1 = $FunLoad('DATA1',..,'ASYNC')
  IF %RNUM1 < 0 THEN
  IF %RNUM1 < 0 THEN

Revision as of 21:50, 11 November 2014

Wait until asynchronous Fast/Unload request completes

This requests that the user wait until an asynchronous Fast/Unload request is completed.

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

The only argument is a string that identifies the request number to be waited on. To wait on a request, the user must have initiated the request.

In the following example, two ASYNCH Fast/Unload requests are placed and then their completion is waited for. If FUNTSKN is 2 or greater, these requests can run in parallel.

%RNUM1 = $FunLoad('DATA1',..,'ASYNC') IF %RNUM1 < 0 THEN JUMP TO FUNERR END IF %RNUM2 = $FunLoad('DATA2',..,'ASYNC') IF %RNUM2 < 0 THEN %RC = $FunPurg(%RNUM1) JUMP TO FUNERR END IF %RC1 = $FunWait(%RNUM1) %RC2 = $FunWait(%RNUM2) END IF

Syntax

%result = $FunWait(req_num)

%result is set to the return code from Fast/Unload, or it is set to -1 if the request cannot be found.

-1 - request not found

$FunWait Error Codes

Products authorizing $FunWait