FastUnload (Recordset function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (fix "boolean enumerations" link)
m (ah, there was three of them)
Line 45: Line 45:
</td></tr>
</td></tr>
<tr><th><b>Asynch=</b>bool</th>
<tr><th><b>Asynch=</b>bool</th>
<td>A Boolean enumeration value: <ul> <li>If <var>True</var>, the request is to be run asynchronously: the method should return immediately, returning a request number, rather than waiting for the unload to complete. If <var>Asynch</var> is set to <var>True</var>, neither the <var>Output</var> nor <var>Report</var> parameters can be <var>Stringlist</var> objects. <li>If <var>False</var>, the <var>FastUnload</var> method does not return until the unload is completed, if no errors are detected. In such a case, the return code from the method is the return code from <var class="product">Fast/Unload</var>. </ul>
<td>A [[Enumerations#Using_Boolean_enumerations|"Boolean Enumeration"]] value: <ul> <li>If <var>True</var>, the request is to be run asynchronously: the method should return immediately, returning a request number, rather than waiting for the unload to complete. If <var>Asynch</var> is set to <var>True</var>, neither the <var>Output</var> nor <var>Report</var> parameters can be <var>Stringlist</var> objects. <li>If <var>False</var>, the <var>FastUnload</var> method does not return until the unload is completed, if no errors are detected. In such a case, the return code from the method is the return code from <var class="product">Fast/Unload</var>. </ul>
<var>Asynch</var> is the required name for the parameter. The parameter itself is an optional parameter, and it defaults to <var>False</var>.
<var>Asynch</var> is the required name for the parameter. The parameter itself is an optional parameter, and it defaults to <var>False</var>.
</td></tr>
</td></tr>
<tr><th><b>Notify=</b>bool</th>
<tr><th><b>Notify=</b>bool</th>
<td>A Boolean enumeration value: <ul> <li>If <var>True</var>, the user that initiated the request should be notified at its completion with a <var class="product">Model 204</var> message, if the request is asynchronous (Asynch=True). <li>If <var>False</var>, the initiating user will not be notified at the completion of the request. </ul>
<td>A [[Enumerations#Using_Boolean_enumerations|"Boolean Enumeration"]] value: <ul> <li>If <var>True</var>, the user that initiated the request should be notified at its completion with a <var class="product">Model 204</var> message, if the request is asynchronous (Asynch=True). <li>If <var>False</var>, the initiating user will not be notified at the completion of the request. </ul>
<var>Notify</var> is the required name for the parameter. The parameter itself is an optional parameter, and it defaults to <var>False</var>.
<var>Notify</var> is the required name for the parameter. The parameter itself is an optional parameter, and it defaults to <var>False</var>.
</td></tr>
</td></tr>

Revision as of 09:20, 19 May 2011

Unload Recordset using Fast/Unload User Language Interface (Recordset class)

[Requires Fast/Unload Soul Interface]


This callable method performs synchronous or asynchronous unloads using the Fast/Unload User Language Interface of the record set data in the method object.

This method is only available to customers that are also licensed for the Fast/Unload User Language Interface, and it is only available in Sirius Mods version 6.7 and later.

The FastUnload function also requires at least one FastUnload task to be available in the Online in which it is running, which means that the FUNTSKN system parameter must be set to 1 or higher. For more information about Fast/Unload User Language Interface environmental considerations, see the Fast/Unload Reference Manual.

Syntax

[%number =] recordset:FastUnload( [Input=] input, [Output=] output, - [[Report=] report], [[Parameters=] string], - [AllMessages= boolean], [Asynch= boolean], - [Notify= boolean], [MaxTime= number])

Syntax terms

%result A numeric value, as follows:
  • For asynchronous requests, the request number. Request numbers are assigned serially, starting at 1.
  • For synchronous requests, the return code from Fast/Unload. If the request is cancelled because the timeout period (MaxTime parameter, or FUNMAXT system parameter) is exceeded, the return code is 32.
%rs A reference to an instance of a Recordset object.
Input=inlist A Stringlist object that contains the Fast/Unload FUEL program for the unload. Input is the allowed name for the parameter.
Output=output A Stringlist object that is to receive the unloaded data, or a string that contains the DD name that is to receive the unloaded data. Output is the allowed name for the parameter.

If the request is asynchronous, and this parameter is a Stringlist object, the request is cancelled.

Report=report A Stringlist object that is to receive the Fast/Unload report, or a string containing the DD name that is to receive the report. Report is the allowed name for the parameter.

If the request is asynchronous, and this parameter is a Stringlist object, the request is cancelled. This is an optional parameter. If it is not specified, the report goes to FUNAUDIT; if there is no FUNAUDIT, the report is simply discarded.

Parameters=parms A string that contains the parameters that are to be passed to Fast/Unload. Parameters is the allowed name for the parameter.

This is an optional parameter; if it is not specified, no parameters are passed to Fast/Unload.

AllMessages=bool A "Boolean Enumeration", providing functionality similar to the $Funload ALLMSG parameter: if True, all messages that would go in the Fast/Unload report are sent to the report dataset, report Stringlist, or FUNAUDIT. Informational messages ordinarily suppressed by Fast/Unload User Language Interface are included by this setting.

AllMessages is the required name for the parameter. The parameter itself is an optional parameter, and it defaults to False. That is, many informational messages are suppressed from the report output.

Asynch=bool A "Boolean Enumeration" value:
  • If True, the request is to be run asynchronously: the method should return immediately, returning a request number, rather than waiting for the unload to complete. If Asynch is set to True, neither the Output nor Report parameters can be Stringlist objects.
  • If False, the FastUnload method does not return until the unload is completed, if no errors are detected. In such a case, the return code from the method is the return code from Fast/Unload.

Asynch is the required name for the parameter. The parameter itself is an optional parameter, and it defaults to False.

Notify=bool A "Boolean Enumeration" value:
  • If True, the user that initiated the request should be notified at its completion with a Model 204 message, if the request is asynchronous (Asynch=True).
  • If False, the initiating user will not be notified at the completion of the request.

Notify is the required name for the parameter. The parameter itself is an optional parameter, and it defaults to False.

MaxTime=sec A numeric value that indicates the maximum number of seconds after initiation of the request that the request is given to complete. If the request has not even started running in a Fast/Unload task, or if the task is running, but hasn't completed after the timeout period, the request is cancelled (resulting in a return code 32 from Fast/Unload).

A value of 0 for MaxTime means that the request will never timeout. MaxTime is the required name for the parameter. The parameter itself is an optional parameter, and it defaults to the setting of the FUNMAXT system parameter. FUNMAXT is described in the Fast/Unload Reference Manual.
Note: A request can timeout through no fault of its own if all the Fast/Unload tasks are taken up by other long-running requests.

Usage notes

  • Any errors in the method parameter list (%rs, above), or any environmental errors that would prevent the request from being run, result in the request being cancelled.

Example

In the following example, the FastUnload method uses Fast/Unload to do a PAI unload to a Stringlist of all the records in file sirFiled, and then it displays the Stringlist:

b %rs is object recordSet in file sirFiled %listi is object stringList %listo is object stringList %rc is float find records to %rs end find %listi = new text to %listi FOR EACH RECORD PUT '*' OUTPUT PAI END FOR end text %listo = new %rc = %rs:fastUnload(%listi, %listo, parameters='NEBUFF=10') %listo:print end

See also