Fast/Unload SOUL Interface: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- Page name: Fast/Unload SOUL Interface-->
<!-- Page name: Fast/Unload SOUL Interface-->
<p></p>
==Introduction==
The <var class="product">Fast/Unload SOUL Interface</var>, purchased as a separate <var class="product">Fast/Unload</var> option,
The <var class="product">Fast/Unload SOUL Interface (FUSI)</var>, purchased as a separate <var class="product">Fast/Unload</var> option,
allows one to invoke <var class="product">Fast/Unload</var> from a <var class="product">SOUL</var> program.
allows one to invoke <var class="product">Fast/Unload</var> from a <var class="product">[[SOUL]]</var> program.
With this approach, an application builds a set of records to be unloaded,
With this approach, an application builds a set of records to be unloaded,
using standard <var class="product">SOUL</var> statements; for example, you can reduce unload
using standard <var class="product">SOUL</var> statements. For example, you can reduce unload
time by restricting the set of records using indexed <var class="product">Model 204</var> fields.
time by restricting the set of records using indexed <var class="product">Model 204</var> fields.
<p></p>
 
There are two ways two invoke <var class="product">Fast/Unload</var> from a <var class="product">SOUL</var> program:
There are two ways to invoke <var class="product">Fast/Unload</var> from a <var class="product">SOUL</var> program:
<ul>
<ul>
<li>By passing the label of the record set or list to the $Funload function.
<li>By passing the label of the record set or list to the <var>[[$FunLoad]]</var> function.</li>
<li>By invoking the FastUnload or the FastUnloadTask method against a Recordset
 
object.
<li>By invoking the <var>[[FastUnload (Recordset function)|FastUnload]]</var> or the <var>[[FastUnloadTask (Recordset function)|FastUnloadTask]]</var> method against a <var>Recordset</var> object. </li>
</ul>
</ul>
$Funload and the FastUnload/FastUnloadTask methods must be linked into the
 
ONLINE or BATCH204 load module as part of the <var class="product">Model 204</var> installation process.
<var>$Funload</var> or the <var>FastUnload</var> and <var>FastUnloadTask</var> methods send the record set to the <var class="product">Fast/Unload</var> PST,
$Funload or the FastUnload/FastUnloadTask methods send the record set to the <var class="product">Fast/Unload</var> PST,
which invokes the <var class="product">Fast/Unload</var> load module in a subtask (or PST, under CMS) of <var class="product">Model 204</var>.
which invokes the <var class="product">Fast/Unload</var> load module in a subtask (or PST, under CMS) of <var class="product">Model 204</var>.
The full power of the FUEL language is available, including sorts, UAI, etc.
The full power of the FUEL language is available, including sorts, <var>UAI</var>, etc.
<p></p>
 
When invoked via $Funload or the FastUnload/FastUnloadTask methods, <var class="product">Fast/Unload</var>
When invoked via <var>$Funload</var> or the <var>FastUnload</var> or <var>FastUnloadTask</var> methods, <var class="product">Fast/Unload</var> only accesses the records in the passed record set, and it only issues reads
only accesses the records in the passed record set, and only issues reads
for disk tracks containing those records.
for disk tracks containing those records.
Whether or not the <var class="product">Fast/Unload SOUL Interface</var> is employed, <var class="product">Fast/Unload</var> <b>always</b> issues reads
Whether or not the <var class="product">FUSI</var> is employed, <var class="product">Fast/Unload</var> <b>always</b> issues reads
only for disk tracks containing the records accessed, but, except for
only for disk tracks containing the records accessed, but, except for records skipped by the <var>EVERY</var> and <var>SKIPREC</var> parameters, a standalone <var class="product">Fast/Unload</var> accesses all Table B records in a file until
records skipped by the EVERY and SKIPREC
parameters,
a standalone <var class="product">Fast/Unload</var> accesses all Table B records in a file until
<var class="product">Fast/Unload</var> processing ends.
<var class="product">Fast/Unload</var> processing ends.
<p></p>
 
The <var class="product">Fast/Unload SOUL Interface</var> also
The <var class="product">FUSI</var> also provides the ability to unload data from a <var class="product">Model 204</var> group; standalone <var class="product">Fast/Unload</var> provides that functionality by allowing multiple <var class="product">Model 204</var> file names on the <var>[[FUEL#openStmt|OPEN]]</var> statement.
provides the ability to unload data from a <var class="product">Model 204</var> group.
 
<p></p>
Note that the <var class="product">FUSI</var> allows unloading to be performed (at the thread level) either of these ways:
Note that the <var class="product">Fast/Unload SOUL Interface</var> allows unloading to be performed (at the thread
<ul>
level) either <b>synchronously</b>, so that all processing is
<li><b>Synchronously</b>, so that all processing is completed before control is returned from <var>$Funload</var> or the
completed before control is returned from $Funload or the
<var>FastUnload</var> and <var>FastUnloadTask</var> methods.</li>
FastUnload/FastUnloadTask methods, or
 
<b>asynchronously</b> so that control is returned to the User
<li><b>Asynchronously</b>, so that control is returned to the SOUL program as soon as the $function or method parameters are verified
Language program as soon as the $function or method parameters are verified
and accepted.</li>
and accepted.
</ul>
(<var class="product">Fast/Unload</var> processing is <b>never</b> synchronous at the Online level:
 
threads not waiting for the completion of a <var class="product">Fast/Unload SOUL Interface</var> requests will continue
<p class="note"><b>Note:</b> <var class="product">Fast/Unload</var> processing is <b>never</b> synchronous at the Online level:
to run while one or more unloads are progressing.)
threads not waiting for the completion of a <var class="product">FUSI</var> request will continue to run while one or more unloads are progressing.
When processing is asynchronous (at the thread level) it is up to the
When processing is asynchronous (at the thread level), it is up to the user to verify successful completion of the unload, much as a user would verify successful completion of a batch job.
user to verify successful completion of the unload much as a user would
</p>
verify successful completion of a batch job.
 
<p></p>
A SOUL procedure is provided as part of the installation process to monitor and control <var class="product">Fast/Unload</var> requests from the <code>ONLINE</code> region.
A User Language procedure is provided as part of the installation
Specifically, a system manager can cancel or examine <var class="product">Fast/Unload</var> requests.
process to monitor and control <var class="product">Fast/Unload</var> requests from the ONLINE region.
In addition, each user can perform the same functions on asynchronous requests that he or she initiated.
Specifically, a system manager can
 
cancel or examine <var class="product">Fast/Unload</var> requests.
To make it easier to diagnose problems where the <var class="product">FUSI</var> is involved, messages are also sent to the <var class="product">Model 204</var> journal/audit trail at each <var class="product">Fast/Unload</var> request made and at each completed by the <var class="product">FUSI</var>.
In addition, each user
can perform the same functions on asynchronous requests that he or she
The message when the requests are started looks like:
initiated.
<p class="code">MSIR.0890: Asynchronous request 2 made by $funload
<p></p>
</p>
To make it easier to diagnose problems where <var class="product">Fast/Unload SOUL Interface</var> is involved,
 
under <var class="product">Sirius Mods</class>
And the message when the requests are completed looks like:
version 6.7 and and <var class="product">Model 204</var> version 7.5 and
<p class="code">MSIR.0891: Asynchronous request 2 completed, RC = 0
later,
</p>
messages are also sent to the <var class="product">Model 204</var> journal/audit trail at each
 
<var class="product">Fast/Unload</var> request made and at each completed by the <var class="product">Fast/Unload SOUL Interface</var>.
===Name changed from Fast/Unload User Language Interface===
<p></p>
The <var class="product">Fast/Unload Soul Interface</var> was previously called the The <var class="product">Fast/Unload User Language Interface</var>.  The product has remained the same.
The message when the requests are started look like:
 
<p class="code"><nowiki>MSIR.0890: Asynchronous request 2 made by $funload
==When to use the FUSI==
</nowiki></p>
If you have the <var class="product">FUSI</var>, you can use it,
<p></p>
rather then a standalone <var class="product">Fast/Unload</var>, to perform a given unload. In fact,
And the message when the requests are completed look like:
you can usually use the <var class="product">FUSI</var> and expect it will run as well
<p class="code"><nowiki>MSIR.0891: Asynchronous request 2 completed, RC = 0
</nowiki></p>
<p></p>
==When to use the Fast/Unload SOUL Interface==
<p></p>
If you have the <var class="product">Fast/Unload SOUL Interface</var>, you can use it,
rather then a standalone <var class="product">Fast/Unload</var>, to perform a given unload; in fact,
you can usually use the <var class="product">Fast/Unload SOUL Interface</var> and expect it will run as well
or better than the comparable standalone <var class="product">Fast/Unload</var>.
or better than the comparable standalone <var class="product">Fast/Unload</var>.
There are many factors which make use of the <var class="product">Fast/Unload SOUL Interface</var> clearly
Many factors make use of the <var class="product">FUSI</var> clearly
advantageous over a standalone <var class="product">Fast/Unload</var>, such as:
advantageous over a standalone <var class="product">Fast/Unload</var>, such as:
<table>
<table class="thJustBold">
<tr><th>Sparse index-driven record set</th><td>If you can use the FIND statement with indexed fields (i.e., no Table B scan) to determine a small fraction of the file which then can be processed by <var class="product">Fast/Unload</var>, this will be a significant performance advantage.</td></tr>
<tr><th nowrap>Sparse index-driven record set</th>
<tr><th><var class="product">Model 204</var> Boolean processing</th><td>The capabilities of <var class="product">Model 204</var> record list processing, and the ability to combine sets of records in the FIND statement, provide not only efficient index-driven record restriction, but also very powerful application capabilities.</td></tr>
<td>If you can use the <var>FIND</var> statement with indexed fields (that is, no Table B scan) to determine a small fraction of the file which then can be processed by <var class="product">Fast/Unload</var>, this will be a significant performance advantage.</td></tr>
<tr><th>File enqueue</th><td>When a file is open for update in an ONLINE environment, the only way to access that file in a standalone job is to bypass file enqueueing (with the NOENQ parameter, as described in [[Fast/Unload program parameters#noenq|NOEnq]]). A standalone <var class="product">Fast/Unload</var> with NOENQ will only examine pages that have been written to disk, and so will not see any modified pages still in the buffer pool. <p></p> Performing the unload with the <var class="product">Fast/Unload SOUL Interface</var> allows you to use normal <var class="product">Model 204</var> record-level locking so that a file can be unloaded while it is open for update, obtaining a current image of all pages accessed. There is a tradeoff, of course, involved in holding record locks over the duration of an unload job. You can use an unlocked set of records (record lists, or the User Language FIND WITHOUT LOCKS statement) with the <var class="product">Fast/Unload SOUL Interface</var>, and the current disk buffer page image is still used. Note, however, that unloading without a locked record set while the file is open for update is suitable for creating some kind of report or other file extract that can tolerate a degree of inconsistent data, but is generally not advisable if you are unloading in order to reorganize the file.</td></tr>
 
<tr><th>Groups (prior to version 4.4)</th><td>The <var class="product">Fast/Unload SOUL Interface</var> allows you to process a set of records derived from one or more files in a PERManent, TEMPorary, or ad hoc <var class="product">Model 204</var> group. Prior to version 4.4, a standalone <var class="product">Fast/Unload</var> can only access the single file designated on the <var class="product">Fast/Unload</var> OPEN directive.</td></tr>
<tr><th>Model 204 Boolean processing</th>
<tr><th>User Language pre-/post-processing, scheduling</th><td>You can use the features of User Language to prepare the <var class="product">Fast/Unload</var> input program. The program can be dynamically generated, or static and stored in an Html/Text block or in a separate procedure that's read with $procopn and $procdat. The Html/Text block is particularly useful for generating <var class="product">Fast/Unload</var> input programs that are largely static but have some dynamic parts. <p></p> The <var class="product">Fast/Unload SOUL Interface</var> can be used to manipulate and combine the results of one or more $Funload or FastUnload/FastUnloadTask calls. Besides offering the convenience of post-processing with User Language, this can be useful for merging, matching or cross-checking applications. The results can be processed conveniently and efficiently either with $lists, with the $FunImg function, with Stringlist objects, or with a FastUnloadTask object. <p></p> You can combine scheduling and control of all "background" processing in your <var class="product">Model 204</var> online with initiating and controlling <var class="product">Fast/Unload SOUL Interface</var> processing.</td></tr>
<td>The capabilities of <var class="product">Model 204</var> record list processing, and the ability to combine sets of records in the <var>FIND</var> statement, provide not only efficient index-driven record restriction, but also very powerful application capabilities.</td></tr>
 
<tr><th>File enqueue</th>
<td>When a file is open for update in an ONLINE environment, the only way to access that file in a standalone job is to bypass file enqueueing (with the <var>NOENQ</var> parameter, as described in [[Fast/Unload program parameters#noenq|NOEnq]]). A standalone <var class="product">Fast/Unload</var> with <var>NOENQ</var> will only examine pages that have been written to disk, and so will not see any modified pages still in the buffer pool.  
<p>
Performing the unload with the <var class="product">FUSI</var> allows you to use normal <var class="product">Model 204</var> record-level locking, so a file can be unloaded while it is open for update, obtaining a current image of all pages accessed. There is a tradeoff, of course, involved in holding record locks over the duration of an unload job. You can use an unlocked set of records (record lists, or the SOUL <var>FIND WITHOUT LOCKS</var> statement) with the <var class="product">FUSI</var>, and the current disk buffer page image is still used. Note, however, that unloading without a locked record set while the file is open for update is suitable for creating some kind of report or other file extract that can tolerate a degree of inconsistent data, but it is generally not advisable if you are unloading in order to reorganize the file.</p></td></tr>
 
<tr><th>Groups (prior to version 4.4)</th>
<td>The <var class="product">FUSI</var> allows you to process a set of records derived from one or more files in a permanent, temporary, or ad hoc <var class="product">Model 204</var> group. Prior to version 4.4, a standalone <var class="product">Fast/Unload</var> can only access the single file designated on the <var class="product">Fast/Unload</var> <var>OPEN</var> directive.</td></tr>
 
<tr><th>SOUL pre-/post-processing, scheduling</th>
<td>You can use the features of SOUL to prepare the <var class="product">Fast/Unload</var> input program. The program can be dynamically generated, or static and stored in an <var>[[Text and Html statements|Html]]</var> or <var>[[Text and Html statements|Text]]</var> statement block or in a separate procedure that is read with <var>[[$ProcOpn]]</var> and <var>[[$ProcDat]]</var>. The <var>Html</var> or <var>Text</var> block is particularly useful for generating <var class="product">Fast/Unload</var> input programs that are largely static but have some dynamic parts.  
<p>
The <var class="product">FUSI</var> can be used to manipulate and combine the results of one or more <var>$Funload</var> or <var>FastUnload</var> or <var>FastUnloadTask</var> calls. Besides offering the convenience of post-processing with SOUL, this can be useful for merging, matching, or cross-checking applications. The results can be processed conveniently and efficiently with [[$lists|$lists]], with the <var>$FunImg</var> function, with <var>Stringlist</var> objects, or with a <var>FastUnloadTask</var> object. </p>
<p>
You can combine scheduling and control of all "background" processing in your <var class="product">Model 204</var> Online with initiating and controlling <var class="product">FUSI</var> processing.</p></td></tr>
</table>
</table>
<p></p>
 
The CPU time consumed by the <var class="product">Fast/Unload</var> task running under <var class="product">Model 204</var> will not
The CPU time consumed by the <var class="product">Fast/Unload</var> task running under <var class="product">Model 204</var> will not
interfere with online <var class="product">Model 204</var> users: the z/OS dispatching priority of
interfere with online <var class="product">Model 204</var> users: the z/OS dispatching priority of
the <var class="product">Fast/Unload</var> task is 4 less than that of the <var class="product">Model 204</var> main task.
the <var class="product">Fast/Unload</var> task is 4 less than that of the <var class="product">Model 204</var> maintask.
<p></p>
 
In some cases, the only appropriate environment to run <var class="product">Fast/Unload</var> is
In some cases, the only appropriate environment to run <var class="product">Fast/Unload</var> is
a batch environment, but you can still obtain the relevant advantages
a batch environment, but you can still obtain the relevant advantages of the <var class="product">FUSI</var> by invoking it in a single-user <var class="product">Model 204</var> job ("BATCH204").
of the <var class="product">Fast/Unload SOUL Interface</var> by invoking it in a single-user <var class="product">Model 204</var> job ("BATCH204").
Some of the reasons for running in a batch environment are:
Some of the reasons for running in a batch environment are:
<table>
<table class="thJustBold">
<tr><th>Virtual storage use</th><td>The virtual storage requirements of a <var class="product">Fast/Unload</var> task running under <var class="product">Model 204</var> could significantly affect the virtual storage requirements of the whole region, especially if an external sort is being invoked by <var class="product">Fast/Unload</var> as part of its processing. Care should be taken to ensure that these requirements do not cause paging in the <var class="product">Model 204</var> region, paging having potentially disastrous performance impact on a multi-user <var class="product">Model 204</var> region.</td></tr>
<tr><th>Virtual storage use</th>
<tr><th>Below-the-line storage</th><td>If the below-the-line storage requirements of <var class="product">Fast/Unload</var> are large, it may need to run in a separate address space from a <var class="product">Model 204</var> online job, and if they are extremely demanding, this might not even permit a BATCH204 environment.</td></tr>
<td>The virtual storage requirements of a <var class="product">Fast/Unload</var> task running under <var class="product">Model 204</var> could significantly affect the virtual storage requirements of the whole region, especially if an external sort is being invoked by <var class="product">Fast/Unload</var> as part of its processing. Care should be taken to ensure that these requirements do not cause paging in the <var class="product">Model 204</var> region, paging having potentially disastrous performance impact on a multi-user <var class="product">Model 204</var> region.</td></tr>
<tr><th>Communication for current buffers</th><td>As mentioned above under "File enqueue", the <var class="product">Fast/Unload SOUL Interface</var> provides the current copy of any modified pages that the <var class="product">Fast/Unload</var> subtask accesses. If a very large number of modified pages are in the buffer pool when $Funload or the FastUnload/FastUnloadTask method is called, this could, in some cases, lead to a noticable amount of overhead; one measure of this would be the <b>PST wait time</b>, described in [[Fast/Unload job statistics]]. If this overhead is significant, you might evaluate the tradeoffs in either unloading the file in a standalone unload with the NOENQ parameter, or unloading it when there are fewer dirty pages in the buffer pool, for example, when updating activity is lower.</td></tr>
 
<tr><th nowrap>Below-the-line storage</th>
<td>If the below-the-line storage requirements of <var class="product">Fast/Unload</var> are large, it may need to run in a separate address space from a <var class="product">Model 204</var> Online job, and if they are extremely demanding, this might not even permit a <code>BATCH204</code> environment.</td></tr>
 
<tr><th>Communication for current buffers</th>
<td>As mentioned in the table above under "File enqueue", the <var class="product">FUSI</var> provides the current copy of any modified pages that the <var class="product">Fast/Unload</var> subtask accesses. If a very large number of modified pages are in the buffer pool when <var>$Funload</var> or the <var>FastUnload</var> or <var>FastUnloadTask</var> method is called, this could, in some cases, lead to a noticable amount of overhead.
<p>
One measure of this would be the <b>PST wait time</b>, described in [[Fast/Unload job statistics]]. If this overhead is significant, you might evaluate the tradeoffs in either unloading the file in a standalone unload with the <var>NOENQ</var> parameter, or unloading it when there are fewer dirty pages in the buffer pool, for example, when updating activity is lower.</p></td></tr>
</table>
</table>
==Setting up the Fast/Unload SOUL Interface environment==
 
To use the <var class="product">Fast/Unload SOUL Interface</var> the system
==Setting up the FUSI environment==
manager must perform the following steps:
<p class="note"><b>Note:</b> Using the <var class="product">FUSI</var> with Model&nbsp;204 version 7.4 requires <var class="product">Fast/Unload</var> version 4.6 or higher. Version 4.7 or higher is required for full exploitation of Model&nbsp;204 version 7.5.</p>
 
To use the <var class="product">FUSI</var>, the system manager must perform the following steps:
<ol>
<ol>
<li>Create a custom ONLINE or BATCH204
<li>If using a version of Model 204 prior to 7.5:
load module that has the <var class="product">Sirius Functions</var> linked in.
<ul>
<li>Either concatenate the load library containing the <var class="product">Fast/Unload</var>
<li>Include the [[Sirius Mods]] in your <code>ONLINE</code> or <code>BATCH204</code> load module; a load module with the Sirius Mods is necessary to invoke the FUSI.</li>
load module to the load library containing the ONLINE or BATCH204
<li>Concatenate the load library containing the <var class="product">Fast/Unload</var>
load module on the STEPLIB
load module to the load library containing the <code>ONLINE</code> or <code>BATCH204</code> load module on the <code>STEPLIB</code> DD, or copy the <var class="product">Fast/Unload</var> load module into the load library containing the <code>ONLINE</code> or <code>BATCH204</code> load module.
DD or copy the <var class="product">Fast/Unload</var> load module into the load library containing the
<p>
ONLINE or BATCH204 load module.
For example, if the <var class="product">Model 204</var> <code>ONLINE</code> load module
For example, if the <var class="product">Model 204</var> ONLINE load module
resides in <code>M204.LOADLIB</code>, and the <var class="product">Fast/Unload</var> load module resides in <code>SIRIUS.LOAD</code>, then this is an appropriate <code>STEPLIB</code> DD for the <code>ONLINE</code> JCL: </p>
resides in M204.LOADLIB and the <var class="product">Fast/Unload</var> load module resides in
<p class="code">//STEPLIB  DD  DSN=M204.LOADLIB,DISP=SHR
SIRIUS.LOAD then
//        DD  DSN=SIRIUS.LOAD,DISP=SHR </p>
<p class="code"><nowiki>//STEPLIB  DD  DSN=M204.LOADLIB,DISP=SHR
<p>
//        DD  DSN=SIRIUS.LOAD,DISP=SHR
</nowiki></p>
would be an appropriate STEPLIB DD for the ONLINE JCL.
<p></p>
Under CMS, the <var class="product">Fast/Unload</var> TEXT file must be on a disk accessed by the
Under CMS, the <var class="product">Fast/Unload</var> TEXT file must be on a disk accessed by the
<var class="product">Model 204</var> ONLINE service machine.
<var class="product">Model 204</var> <code>ONLINE</code> service machine.</p></li>
<li>Modify the JCL (or EXEC) used to run the <var class="product">Model 204</var> ONLINE
</ul>
or BATCH204 so that
</li>
it invokes the custom load module from step one and so that it contains a
 
DD card (or FILEDEF statement)
<li>Modify the JCL (or EXEC) used to run the <var class="product">Model&nbsp;204</var> <code>ONLINE</code> or <code>BATCH204</code> so that it contains a
for the <var class="product">Fast/Unload</var> audit trail.
DD card (or FILEDEF statement) for the <var class="product">Fast/Unload</var> audit trail.
This audit trail has DDNAME FUNAUDIT.
This audit trail has DDNAME <code>FUNAUDIT</code>.
For initial testing purposes, this DD could simply specify SYSOUT=*.
For initial testing purposes, this DD could simply specify <code>SYSOUT=*</code>.
<li>Modify the user0 parm card to indicate the maximum number
<p>See the [[#audFmt|FUSI audit format below]].</p></li>
 
<li>Modify the User 0 parm card to indicate the maximum number
of concurrent <var class="product">Fast/Unload</var> tasks to be allowed.
of concurrent <var class="product">Fast/Unload</var> tasks to be allowed.
This is specified with the
This is specified with the <var>[[FUNTSKN parameter|FUNTSKN]]</var> parameter.
FUNTSKN parameter.
This parameter has a default of 0 and a maximum of 64.
This parameter has a default of 0 and a maximum of 64.
If this parameter is set to 0, no user will be able to access <var class="product">Fast/Unload</var> via
If this parameter is set to 0, no user will be able to access <var class="product">Fast/Unload</var> via <var>$Funload</var> or the <var>FastUnload</var> or <var>FastUnloadtask</var> method.
$Funload or the FastUnload/FastUnloadtask methods.
<p>
In addition, it might be necessary to specify the name of the
In addition, it might be necessary to specify the name of the
<var class="product">Fast/Unload</var> load module (or TEXT file, in CMS).
<var class="product">Fast/Unload</var> load module (or TEXT file, in CMS).
This is done using the FUNPGM parameter.
This is done using the <var>[[FUNPGM parameter|FUNPGM]]</var> parameter.
The default value of FUNPGM is 'FUNLOAD'.
The default value of <var>FUNPGM</var> is <var>FUNLOAD</var>.</p>
<p></p>
<p>
For example, the following would be valid parameters on user0's parm card :
For example, the following would be valid parameters on User 0's parm card:</p>
<p class="code"><nowiki>FUNTSKN=8,FUNPGM='MYFUN'
<p class="code">FUNTSKN=8,FUNPGM='MYFUN'
</nowiki></p>
</p></li>
<li>The system manager might also need to increase the value of NSUBTKS on
 
user0's parm card.
<li>The system manager might also need to increase the value of <var>[[NSUBTKS parameter|NSUBTKS]]</var> on User 0's parm card.
<var class="product">Fast/Unload</var> requires a
<var class="product">Fast/Unload</var> requires a PST, and when running under CMS an additional PST, for every active <var class="product">Fast/Unload</var> task.
PST and when running under CMS an additional PST for every active <var class="product">Fast/Unload</var> task.
Thus, the <var>NSUBTKS</var> requirement is
Thus, the NSUBTKS requirement is
increased by 1 for <var class="product">Fast/Unload</var> under z/OS, and by <code>1+FUNTSKN</code> under CMS.
increased by 1 for <var class="product">Fast/Unload</var> under z/OS and 1+FUNTSKN under CMS.
<p>
The one exception to this rule is that when <var class="product">Fast/Unload</var> is to be invoked in
The one exception to this rule is that when <var class="product">Fast/Unload</var> is to be invoked in a single-user run, you can avoid the overhead of using the multi-user scheduler by setting <var>NSUBTKS</var> to 0.
a single user run, it is possible to avoid the overhead of using the
This causes the single user
multi-user scheduler by setting NSUBTKS to 0.
to perform the work of the <var class="product">Fast/Unload</var> PST whenever a <var>$FunWait</var>, <var>$FunImg</var>, <var>$FunsStr</var>, or <var>$FunSkip</var> is executed.</p></li>
This will cause the single user
 
to perform the work of the <var class="product">Fast/Unload</var> PST whenever a $FunWait, $FunImg,
<li>If you want to exploit Model 204 zIIP support, see [[Fast/Unload overview#fuhpo|Fast/Unload HPO]].</li>
$FunSStr or $FunSkip is executed.
</ol>
</ol>
<p></p>
 
Once these tasks have been performed by the system manager, <var class="product">Fast/Unload</var> is
Once these tasks have been performed by the system manager, <var class="product">Fast/Unload</var> is
ready
ready for use by the programmer.
for use by the programmer.
Communication with <var class="product">Fast/Unload</var> is achieved by the <var class="product">SOUL</var> $functions or methods
Communication with <var class="product">Fast/Unload</var> is achieved via the <var class="product">SOUL</var> $functions or methods
that are provided when your site purchases the <var class="product">FUSI</var> product.
that are provided when a site purchases the <var class="product">Fast/Unload SOUL Interface</var>.
 
===<b id="audFmt"></b>FUSI audit format===
If <var>FUNAUDIT</var> is allocated to the Online, it will contain messages
(for example, starting a Fast/Unload task for a request, or completing
a request) in the following format:
   
   
<div id="sprmuli"></div>
<p class="code"><nowiki>Col  Len  Data
==System parameters for the Fast/Unload SOUL Interface==
---  ---  --------------------------
<!--Caution: <div> above-->
  1    1  Carriage control character
   
2    11  Date/time (YYDDDHHMMSS)
<p></p>
13    1  Space
The parameters described in the following subsections provide
14    5  User number
useful controls for <var class="product">Fast/Unload SOUL Interface</var> requests.
19    1  Space
20    5  Request number
25    1  Space
26    5  Message number (within request)
31    1  Space
32  101  Output data
</nowiki></p>
   
   
<div id="funparm"></div>
If <var>FUNAUDIT</var> is not allocated to the Online, the messages are instead
===FUNPARM===
produced in the Model&nbsp;204 audit trail as RK messages with the
<!--Caution: <div> above-->
following format:
   
   
<p></p>
<p class="code"><nowiki>Col  Len  Data
The FUNPARM system parameter
---  ---  --------------------------
is a standard <var class="product">Model 204</var> bitmask-style parameter.
1    4  'FUN:'
introduced in <var class="product">Sirius Mods</class> version 6.7.
5    1  Space
Setting the X'01' bit, the only bit currently defined,
6    5  User number
specifies that a synchronous
11    1  Space
<var class="product">Fast/Unload</var> request is not to be allowed while an updating transaction is active.
12    5  Request number
This is to prevent a <var class="product">Fast/Unload</var> request that might take a long time to
17    1  Space
complete from being run while a user has resources enqueued for an updating
18    5  Message number (within request)
transaction.
23    1  Space
These resources would, of course, include the blocking of checkpoints.
24  101  Output data
<p></p>
<p></p>
If the FUNPARM X'01' bit is set, and a thread attempts a synchronous <var class="product">Fast/Unload SOUL Interface</var>
request (via $Funload or the FastUnload method of the Recordset class)
in the middle of an updating transaction, the transaction is cancelled
with a message like the following:
<p class="code"><nowiki>CANCELLING REQUEST: MSIR.0561: $FUNLOAD: Synchronous request during
                    update transaction in line 43, procedure
                    FUNTEST, file ALEXPROC
</nowiki></p>
</nowiki></p>
   
   
<div id="funmaxt"></div>
In the above a "request" is a Fast/Unload request, which corresponds
===FUNMAXT===
to a single invocation of <var>$Funload</var> or of the
<!--Caution: <div> above-->
<var>FastUnload</var> or the <var>FastUnloadTask</var> method.
 
==<b id="sprmuli"></b>System parameters for the FUSI==
The parameters described in the following subsections provide useful controls for <var class="product">FUSI</var> requests.
   
   
<p></p>
===<b id="funmtask"></b>FUNMTASK===
The FUNMAXT system parameter specifies
The <var>FUNMTASK</var> parameter specifies whether Fast/Unload Soul Interface (FUSI) requests are to be executed on a z/OS subtask or on one of these: the Model 204 maintask, an MP/204 subtask, or the zIIP support SRB.
the maximum amount of time, in seconds, a <var class="product">Fast/Unload SOUL Interface</var> request is to be given to
 
complete.
For usage details, see the <var>[[FUNMTASK parameter|FUNMTASK]]</var> page.
The timer begins when the <var class="product">Fast/Unload SOUL Interface</var> is requested, either
 
by $Funload or by the Recordset class FastUnload or FastUnloadTask method.
===<b id="funparm"></b>FUNPARM===
<p></p>
The <var>FUNPARM</var> system parameter is a standard <var class="product">Model 204</var> bitmask-style parameter.
Introduced in <var class="product">Sirius Mods</class> version 6.7,
<p>
FUNMAXT is a numeric parameter with valid values from 0 to 36000.
Setting the X'01' bit specifies that a synchronous
The default value of 0 means no time limit is placed on <var class="product">Fast/Unload SOUL Interface</var> requests.
<var class="product">Fast/Unload</var> request is <i>not</i> to be allowed while an updating transaction is active.
<p></p>
This is to prevent a <var class="product">Fast/Unload</var> request that might take a long time to complete from being run while a user has resources enqueued for an updating transaction.
The purpose of FUNMAXT is to prevent user requests from being "hung up"
</p>
indefinitely while queuing for busy <var class="product">Fast/Unload</var> tasks or for unintentionally
<p>
long-running requests.
The X'02', X'04', and X'08' bits (and the <var>[[FUNPRMU parameter|FUNPRMU]]</var> user parameter) allow the auditing of some of the messages from the <var class="product">FUSI</var> job report to be captured on <code>FUNAUDIT</code> and/or the <var class="product">Model&nbsp;204</var> audit trail, regardless of the report destination specified in the SOUL invocation of the <var class="product">FUSI</var>.</p>
<p></p>
<p>
<p></p>
For more detailed usage information, see the <var>[[FUNPARM parameter|FUNPARM]]</var> page. </p>
To override FUNMAXT for specific requests, you can use either:
 
<ul>
===<b id="funmaxt"></b>FUNMAXT===
<li>The <code>MaxTime</code>
The <var>FUNMAXT</var> system parameter specifies the maximum amount of time, in seconds, a <var class="product">FUSI</var> request is to be given to complete.
named parameter on the FastUnload and FastUnloadTask methods in the
The timer begins when the <var class="product">FUSI</var> is requested,  
Recordset class.
by <var>[[$Funload]]</var> or by the <var>[[FastUnload (Recordset function)|FastUnload]]</var> and <var>[[FastUnloadTask (Recordset function)|FastUnloadTask]]</var> methods the <var>Recordset</var> class.
<li>The sixth parameter on $Funload:
 
<p class="code"><nowiki>* Make sure request completes in one minute
<var>FUNMAXT</var> is a numeric parameter with valid values from 0 to 36000.
%rc = %rs:fastUnload(%listi, %listo, -
The default value, 0, means no time limit is placed on <var class="product">FUSI</var> requests.
                    parameters='NEBUFF=10', maxTime=60)
 
...
The purpose of <var>FUNMAXT</var> is to prevent user requests from being "hung up"
* Make sure request completes in one minute
indefinitely while queuing for busy <var class="product">Fast/Unload</var> tasks or for unintentionally long-running requests.
%rc = $funload('LABEL', %iList, %oList, , 'NEBUFF=10', 60)
 
</nowiki></p>
For more usage information, see the <var>[[FUNMAXT parameter|FUNMAXT]]</var> page.  
</ul>
 
<p></p>
It is a reasonable strategy to set FUNMAXT to a fairly low value, then to
selectively set it higher for requests that need more time.
Of course, it can be very difficult to ensure that short-running requests
complete quickly if the Online also has long-running requests that
might tie up all the <var class="product">Fast/Unload</var> tasks.
You improve the odds of quick completion if you specify more <var class="product">Fast/Unload</var> tasks
(FUNTSKN bigger), but this may still not be enough:
<ul>
<li>All tasks might be tied up anyway, if
there are many long-running requests.
<li>Some of the <var class="product">Fast/Unload</var> tasks might have trouble getting
dispatched, because there are more of them than CPUs to run them.
</ul>
==See also==
==See also==
[[Fast/Unload overview#WIKFUN$$topics|Fast/Unload topics]]
 
===Fast/Unload SOUL Interface topics===
{{Template:Fast/Unload SOUL Interface topic list}}
 
===Fast/Unload topics===
{{Template:Fast/Unload topic list}}
 
[[Category:Fast/Unload SOUL Interface]]

Latest revision as of 21:48, 21 November 2016

Introduction

The Fast/Unload SOUL Interface (FUSI), purchased as a separate Fast/Unload option, allows one to invoke Fast/Unload from a SOUL program. With this approach, an application builds a set of records to be unloaded, using standard SOUL statements. For example, you can reduce unload time by restricting the set of records using indexed Model 204 fields.

There are two ways to invoke Fast/Unload from a SOUL program:

$Funload or the FastUnload and FastUnloadTask methods send the record set to the Fast/Unload PST, which invokes the Fast/Unload load module in a subtask (or PST, under CMS) of Model 204. The full power of the FUEL language is available, including sorts, UAI, etc.

When invoked via $Funload or the FastUnload or FastUnloadTask methods, Fast/Unload only accesses the records in the passed record set, and it only issues reads for disk tracks containing those records. Whether or not the FUSI is employed, Fast/Unload always issues reads only for disk tracks containing the records accessed, but, except for records skipped by the EVERY and SKIPREC parameters, a standalone Fast/Unload accesses all Table B records in a file until Fast/Unload processing ends.

The FUSI also provides the ability to unload data from a Model 204 group; standalone Fast/Unload provides that functionality by allowing multiple Model 204 file names on the OPEN statement.

Note that the FUSI allows unloading to be performed (at the thread level) either of these ways:

  • Synchronously, so that all processing is completed before control is returned from $Funload or the FastUnload and FastUnloadTask methods.
  • Asynchronously, so that control is returned to the SOUL program as soon as the $function or method parameters are verified and accepted.

Note: Fast/Unload processing is never synchronous at the Online level: threads not waiting for the completion of a FUSI request will continue to run while one or more unloads are progressing. When processing is asynchronous (at the thread level), it is up to the user to verify successful completion of the unload, much as a user would verify successful completion of a batch job.

A SOUL procedure is provided as part of the installation process to monitor and control Fast/Unload requests from the ONLINE region. Specifically, a system manager can cancel or examine Fast/Unload requests. In addition, each user can perform the same functions on asynchronous requests that he or she initiated.

To make it easier to diagnose problems where the FUSI is involved, messages are also sent to the Model 204 journal/audit trail at each Fast/Unload request made and at each completed by the FUSI.

The message when the requests are started looks like:

MSIR.0890: Asynchronous request 2 made by $funload

And the message when the requests are completed looks like:

MSIR.0891: Asynchronous request 2 completed, RC = 0

Name changed from Fast/Unload User Language Interface

The Fast/Unload Soul Interface was previously called the The Fast/Unload User Language Interface. The product has remained the same.

When to use the FUSI

If you have the FUSI, you can use it, rather then a standalone Fast/Unload, to perform a given unload. In fact, you can usually use the FUSI and expect it will run as well or better than the comparable standalone Fast/Unload. Many factors make use of the FUSI clearly advantageous over a standalone Fast/Unload, such as:

Sparse index-driven record set If you can use the FIND statement with indexed fields (that is, no Table B scan) to determine a small fraction of the file which then can be processed by Fast/Unload, this will be a significant performance advantage.
Model 204 Boolean processing The capabilities of Model 204 record list processing, and the ability to combine sets of records in the FIND statement, provide not only efficient index-driven record restriction, but also very powerful application capabilities.
File enqueue When a file is open for update in an ONLINE environment, the only way to access that file in a standalone job is to bypass file enqueueing (with the NOENQ parameter, as described in NOEnq). A standalone Fast/Unload with NOENQ will only examine pages that have been written to disk, and so will not see any modified pages still in the buffer pool.

Performing the unload with the FUSI allows you to use normal Model 204 record-level locking, so a file can be unloaded while it is open for update, obtaining a current image of all pages accessed. There is a tradeoff, of course, involved in holding record locks over the duration of an unload job. You can use an unlocked set of records (record lists, or the SOUL FIND WITHOUT LOCKS statement) with the FUSI, and the current disk buffer page image is still used. Note, however, that unloading without a locked record set while the file is open for update is suitable for creating some kind of report or other file extract that can tolerate a degree of inconsistent data, but it is generally not advisable if you are unloading in order to reorganize the file.

Groups (prior to version 4.4) The FUSI allows you to process a set of records derived from one or more files in a permanent, temporary, or ad hoc Model 204 group. Prior to version 4.4, a standalone Fast/Unload can only access the single file designated on the Fast/Unload OPEN directive.
SOUL pre-/post-processing, scheduling You can use the features of SOUL to prepare the Fast/Unload input program. The program can be dynamically generated, or static and stored in an Html or Text statement block or in a separate procedure that is read with $ProcOpn and $ProcDat. The Html or Text block is particularly useful for generating Fast/Unload input programs that are largely static but have some dynamic parts.

The FUSI can be used to manipulate and combine the results of one or more $Funload or FastUnload or FastUnloadTask calls. Besides offering the convenience of post-processing with SOUL, this can be useful for merging, matching, or cross-checking applications. The results can be processed conveniently and efficiently with $lists, with the $FunImg function, with Stringlist objects, or with a FastUnloadTask object.

You can combine scheduling and control of all "background" processing in your Model 204 Online with initiating and controlling FUSI processing.

The CPU time consumed by the Fast/Unload task running under Model 204 will not interfere with online Model 204 users: the z/OS dispatching priority of the Fast/Unload task is 4 less than that of the Model 204 maintask.

In some cases, the only appropriate environment to run Fast/Unload is a batch environment, but you can still obtain the relevant advantages of the FUSI by invoking it in a single-user Model 204 job ("BATCH204"). Some of the reasons for running in a batch environment are:

Virtual storage use The virtual storage requirements of a Fast/Unload task running under Model 204 could significantly affect the virtual storage requirements of the whole region, especially if an external sort is being invoked by Fast/Unload as part of its processing. Care should be taken to ensure that these requirements do not cause paging in the Model 204 region, paging having potentially disastrous performance impact on a multi-user Model 204 region.
Below-the-line storage If the below-the-line storage requirements of Fast/Unload are large, it may need to run in a separate address space from a Model 204 Online job, and if they are extremely demanding, this might not even permit a BATCH204 environment.
Communication for current buffers As mentioned in the table above under "File enqueue", the FUSI provides the current copy of any modified pages that the Fast/Unload subtask accesses. If a very large number of modified pages are in the buffer pool when $Funload or the FastUnload or FastUnloadTask method is called, this could, in some cases, lead to a noticable amount of overhead.

One measure of this would be the PST wait time, described in Fast/Unload job statistics. If this overhead is significant, you might evaluate the tradeoffs in either unloading the file in a standalone unload with the NOENQ parameter, or unloading it when there are fewer dirty pages in the buffer pool, for example, when updating activity is lower.

Setting up the FUSI environment

Note: Using the FUSI with Model 204 version 7.4 requires Fast/Unload version 4.6 or higher. Version 4.7 or higher is required for full exploitation of Model 204 version 7.5.

To use the FUSI, the system manager must perform the following steps:

  1. If using a version of Model 204 prior to 7.5:
    • Include the Sirius Mods in your ONLINE or BATCH204 load module; a load module with the Sirius Mods is necessary to invoke the FUSI.
    • Concatenate the load library containing the Fast/Unload load module to the load library containing the ONLINE or BATCH204 load module on the STEPLIB DD, or copy the Fast/Unload load module into the load library containing the ONLINE or BATCH204 load module.

      For example, if the Model 204 ONLINE load module resides in M204.LOADLIB, and the Fast/Unload load module resides in SIRIUS.LOAD, then this is an appropriate STEPLIB DD for the ONLINE JCL:

      //STEPLIB DD DSN=M204.LOADLIB,DISP=SHR // DD DSN=SIRIUS.LOAD,DISP=SHR

      Under CMS, the Fast/Unload TEXT file must be on a disk accessed by the Model 204 ONLINE service machine.

  2. Modify the JCL (or EXEC) used to run the Model 204 ONLINE or BATCH204 so that it contains a DD card (or FILEDEF statement) for the Fast/Unload audit trail. This audit trail has DDNAME FUNAUDIT. For initial testing purposes, this DD could simply specify SYSOUT=*.

    See the FUSI audit format below.

  3. Modify the User 0 parm card to indicate the maximum number of concurrent Fast/Unload tasks to be allowed. This is specified with the FUNTSKN parameter. This parameter has a default of 0 and a maximum of 64. If this parameter is set to 0, no user will be able to access Fast/Unload via $Funload or the FastUnload or FastUnloadtask method.

    In addition, it might be necessary to specify the name of the Fast/Unload load module (or TEXT file, in CMS). This is done using the FUNPGM parameter. The default value of FUNPGM is FUNLOAD.

    For example, the following would be valid parameters on User 0's parm card:

    FUNTSKN=8,FUNPGM='MYFUN'

  4. The system manager might also need to increase the value of NSUBTKS on User 0's parm card. Fast/Unload requires a PST, and when running under CMS an additional PST, for every active Fast/Unload task. Thus, the NSUBTKS requirement is increased by 1 for Fast/Unload under z/OS, and by 1+FUNTSKN under CMS.

    The one exception to this rule is that when Fast/Unload is to be invoked in a single-user run, you can avoid the overhead of using the multi-user scheduler by setting NSUBTKS to 0. This causes the single user to perform the work of the Fast/Unload PST whenever a $FunWait, $FunImg, $FunsStr, or $FunSkip is executed.

  5. If you want to exploit Model 204 zIIP support, see Fast/Unload HPO.

Once these tasks have been performed by the system manager, Fast/Unload is ready for use by the programmer. Communication with Fast/Unload is achieved by the SOUL $functions or methods that are provided when your site purchases the FUSI product.

FUSI audit format

If FUNAUDIT is allocated to the Online, it will contain messages (for example, starting a Fast/Unload task for a request, or completing a request) in the following format:

Col Len Data --- --- -------------------------- 1 1 Carriage control character 2 11 Date/time (YYDDDHHMMSS) 13 1 Space 14 5 User number 19 1 Space 20 5 Request number 25 1 Space 26 5 Message number (within request) 31 1 Space 32 101 Output data

If FUNAUDIT is not allocated to the Online, the messages are instead produced in the Model 204 audit trail as RK messages with the following format:

Col Len Data --- --- -------------------------- 1 4 'FUN:' 5 1 Space 6 5 User number 11 1 Space 12 5 Request number 17 1 Space 18 5 Message number (within request) 23 1 Space 24 101 Output data

In the above a "request" is a Fast/Unload request, which corresponds to a single invocation of $Funload or of the FastUnload or the FastUnloadTask method.

System parameters for the FUSI

The parameters described in the following subsections provide useful controls for FUSI requests.

FUNMTASK

The FUNMTASK parameter specifies whether Fast/Unload Soul Interface (FUSI) requests are to be executed on a z/OS subtask or on one of these: the Model 204 maintask, an MP/204 subtask, or the zIIP support SRB.

For usage details, see the FUNMTASK page.

FUNPARM

The FUNPARM system parameter is a standard Model 204 bitmask-style parameter.

Setting the X'01' bit specifies that a synchronous Fast/Unload request is not to be allowed while an updating transaction is active. This is to prevent a Fast/Unload request that might take a long time to complete from being run while a user has resources enqueued for an updating transaction.

The X'02', X'04', and X'08' bits (and the FUNPRMU user parameter) allow the auditing of some of the messages from the FUSI job report to be captured on FUNAUDIT and/or the Model 204 audit trail, regardless of the report destination specified in the SOUL invocation of the FUSI.

For more detailed usage information, see the FUNPARM page.

FUNMAXT

The FUNMAXT system parameter specifies the maximum amount of time, in seconds, a FUSI request is to be given to complete. The timer begins when the FUSI is requested, by $Funload or by the FastUnload and FastUnloadTask methods the Recordset class.

FUNMAXT is a numeric parameter with valid values from 0 to 36000. The default value, 0, means no time limit is placed on FUSI requests.

The purpose of FUNMAXT is to prevent user requests from being "hung up" indefinitely while queuing for busy Fast/Unload tasks or for unintentionally long-running requests.

For more usage information, see the FUNMAXT page.

See also

Fast/Unload SOUL Interface topics

Fast/Unload topics