$FunForc: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:
<span class="pageSubtitle">Cancel running or waiting [[Fast/Unload]] request</span>
<span class="pageSubtitle">Cancel running or waiting [[Fast/Unload]] request</span>


This cancels a ''[[Fast/Unload]]'' request which is either running or enqueued to run.  
This cancels a <i>[[Fast/Unload]]</i> request which is either running or enqueued to run.  


The <var>$FunForc</var> function accepts one argument and returns a numeric result.  
The <var>$FunForc</var> function accepts one argument and returns a numeric result.  
Line 27: Line 27:
==Usage notes==
==Usage notes==
<ul>
<ul>
<li><var>$FunForc</var> immediately DETACH'es a ''[[Fast/Unload]]'' task, while <var>[[$FunPurg]]</var> allows the ''[[Fast/Unload]]'' task to do a "clean" termination. Indiscriminate use of <var>$FunForc</var> could result in certain resources (such as sort work files) being left "in use".  
<li><var>$FunForc</var> immediately DETACH'es a <i>[[Fast/Unload]]</i> task, while <var>[[$FunPurg]]</var> allows the <i>[[Fast/Unload]]</i> task to do a "clean" termination. Indiscriminate use of <var>$FunForc</var> could result in certain resources (such as sort work files) being left "in use".  
Use <var>$FunForc</var> when <var>$FunPurg</var> cannot purge the request cleanly.
Use <var>$FunForc</var> when <var>$FunPurg</var> cannot purge the request cleanly.
</ul>
</ul>

Revision as of 21:38, 11 November 2014

Cancel running or waiting Fast/Unload request

This cancels a Fast/Unload request which is either running or enqueued to run.

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

The only argument is a string that identifies the request number for the request to be cancelled. To cancel a request, a user must either have initiated the request or have system manager privileges. For example, the following code creates an asynchronous unload request, and then immediately cancels it:

%RC = $FunLoad('DATA',..,'ASYNC') IF %RC GE 0 THEN %RC = $FunForc(%RC) END IF

Syntax

%result = $FunForc(req_num)

%result is set either to 0, if the request number req_num was found and cancelled, or to an error code, if the request could not be found or cancelled.

Return codes

5 - User does not have privilege to cancel request 6 - Request not found

Usage notes

  • $FunForc immediately DETACH'es a Fast/Unload task, while $FunPurg allows the Fast/Unload task to do a "clean" termination. Indiscriminate use of $FunForc could result in certain resources (such as sort work files) being left "in use". Use $FunForc when $FunPurg cannot purge the request cleanly.

Products authorizing $FunForc