PUSHUTABLE and POPUTABLE commands: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (minor formatting)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The PUSHUTABLE command saves the current UTABLE settings for easy restoration and the POPUTABLE command restores UTABLE settings saved by PUSHUTABLE.
The <var>PUSHUTABLE</var> command saves the current <var>UTABLE</var> settings for easy restoration, and the <var>POPUTABLE</var> command restores <var>UTABLE</var> settings saved by <var>PUSHUTABLE</var>.
 
===Command syntax===
The general form of the commands is:
The general form of the commands is:
 
<p class="syntax"><span class="literal">PUSHUTABLE </span><span class="squareb">[</span><span class="term">tableSettings</span><span class="squareb">]</span>
===PUSHUTABLE and POPUTABLE command syntax===
<span class="literal">POPUTABLE</span> </p>
  PUSHUTABLE [tableSettings]
  POPUTABLE


Where:
Where:
<ul>
<ul>
<li>The <var>tableSettings</var> are simply the values one would specify on a UTABLE command. While it makes no sense to use PUSHUTABLE unless some server tables sizes are to be changed, those changes could be specified in subsequent UTABLE commands instead of on the PUSHUTABLE command. They are allowed on PUSHUTABLE simply as a convenience.  
<li><var class="term">tableSettings</var> are simply the values one would specify on a <var>UTABLE</var> command. While it makes no sense to use <var>PUSHUTABLE</var> unless some server tables sizes are to be changed, those changes could be specified in subsequent <var>UTABLE</var> commands instead of on the <var>PUSHUTABLE</var> command. They are allowed on <var>PUSHUTABLE</var> simply as a convenience.  
</ul>
</ul>


Only one PUSHUTABLE command can be active in a single INCLUDE level. When the INCLUDE level is closed, the table settings saved by the active PUSHUTABLE command are automatically restored. They can also be explcitly restored with a POPUTABLE command at the same INCLUDE level. A typical use of the PUSHUTABLE command would be to set table settings for a specific procedure in a subsystem so that the standard subsystem table settings are restored when the request had completed. For example:
Only one <var>PUSHUTABLE</var> command can be active in a single <var>INCLUDE</var> level. When the <var>INCLUDE</var> level is closed, the table settings saved by the active <var>PUSHUTABLE</var> command are automatically restored. They can also be explcitly restored with a <var>POPUTABLE</var> command at the same <var>INCLUDE</var> level. A typical use of the <var>PUSHUTABLE</var> command would be to set table settings for a specific procedure in a subsystem so that the standard subsystem table settings are restored when the request had completed. For example:
<p class="code">PUSHUTABLE LSTBL 190000 LQTBL 40000 LVTBL 20000
<p class="code">PUSHUTABLE LSTBL 190000 LQTBL 40000 LVTBL 20000
begin
begin
  ... procedure code
  ... <i>procedure code</i>
end
end
</p>
</p>
When the procedure containing the PUSHUTABLE command is closed, whether or not the code inside the Begin/End block ran successfully, got a request canceling error or even a compile error, the table settings are restored to what they were before the PUSHUTABLE command. Note that adding a POPUTABLE command after the end, while harmless, doesn't help as such a command would never be executed anyway in the case of errors. The above can also be code as:
When the procedure containing the <var>PUSHUTABLE</var> command is closed, whether or not the code inside the <var>Begin/End</var> block ran successfully or got a request canceling error or even a compile error, the table settings are restored to what they were before the <var>PUSHUTABLE</var> command. Note that adding a <var>POPUTABLE</var> command after the <code>End</code>, while harmless, doesn't help, as the end of procedure restores the saved <var>PUSHUTABLE</var> settings anyway and the explicit <var>POPUTABLE</var> would never be seen in the case of errors. The above can also be coded as:
<p class="code">PUSHUTABLE
<p class="code">PUSHUTABLE
UTABLE LSTBL 190000 LQTBL 40000 LVTBL 20000
UTABLE LSTBL 190000 LQTBL 40000 LVTBL 20000
begin
begin
  ... procedure code
  ... <i>procedure code</i>
end
end
</p>
</p>


In the unlikely event that the procedure containing the PUSHUTABLE command was closed while still compiling or evaluating, the table settings will not be restored since table sizes can't be changed in the middle of a compile or request evaluation.
In the unlikely event that the procedure containing the <var>PUSHUTABLE</var> command was closed while still compiling or evaluating, the table settings are not restored, since table sizes cannot be changed in the middle of a request compilation or evaluation.
 
<var>POPUTABLE</var> is probably most useful for restoring table sizes saved by a <var>PUSHUTABLE</var> command at command level (not inside a procedure). For example, it might be useful in a batch stream that contains many <var>Begin/End</var> blocks  where maybe only one has unusual table size requirements. That request could be enclosed inside a <var>PUSHUTABLE/POPUTABLE</var> bracket.


POPUTABLE is probably most useful for restoring table sizes saved by a PUSHUTABLE command at command level (not inside a procedure). For example, it might be useful in a batch stream that contains many Begin/End blocks  where maybe only one has unusual table size requirements. That request could be enclosed inside a PUSHUTABLE/POPUTABLE bracket.
<blockquote class="note">
<p>'''Note:''' In cases where you make frequent use of the the <var>PUSHUTABLE</var> and <var>POPUTABLE</var> commands, you may want to consider using [[Relative values for Model 204 numeric parameters|relative value settings]] for the table size parameters. For example: </p>
<p class="code">UTABLE LSTBL 10000+ LVTBL 400- LQTBL 120% </p>
<p>
This statement requests that <var>LSTBL</var> be increased by 10000, <var>LVTBL</var> decreased by 400, and <var>LQTBL</var> multiplied by 120%, that is, increased by 20% or multiplied by 1.2. So, if the settings of <var>LSTBL</var>, <var>LVTBL</var>, and <var>LQTBL</var> were <code>200000</code>, <code>50000</code>, and <code>150000</code> respectively before the above command, they would be <code>210000</code>, <code>49600</code>, and <code>180000</code> after. </p>
</blockquote>


[[Category: User commands]]
[[Category: User commands]]
[[Category: Commands]]
[[Category: Commands]]

Latest revision as of 15:50, 7 August 2017

The PUSHUTABLE command saves the current UTABLE settings for easy restoration, and the POPUTABLE command restores UTABLE settings saved by PUSHUTABLE.

Command syntax

The general form of the commands is:

PUSHUTABLE [tableSettings] POPUTABLE

Where:

  • tableSettings are simply the values one would specify on a UTABLE command. While it makes no sense to use PUSHUTABLE unless some server tables sizes are to be changed, those changes could be specified in subsequent UTABLE commands instead of on the PUSHUTABLE command. They are allowed on PUSHUTABLE simply as a convenience.

Only one PUSHUTABLE command can be active in a single INCLUDE level. When the INCLUDE level is closed, the table settings saved by the active PUSHUTABLE command are automatically restored. They can also be explcitly restored with a POPUTABLE command at the same INCLUDE level. A typical use of the PUSHUTABLE command would be to set table settings for a specific procedure in a subsystem so that the standard subsystem table settings are restored when the request had completed. For example:

PUSHUTABLE LSTBL 190000 LQTBL 40000 LVTBL 20000 begin ... procedure code end

When the procedure containing the PUSHUTABLE command is closed, whether or not the code inside the Begin/End block ran successfully or got a request canceling error or even a compile error, the table settings are restored to what they were before the PUSHUTABLE command. Note that adding a POPUTABLE command after the End, while harmless, doesn't help, as the end of procedure restores the saved PUSHUTABLE settings anyway and the explicit POPUTABLE would never be seen in the case of errors. The above can also be coded as:

PUSHUTABLE UTABLE LSTBL 190000 LQTBL 40000 LVTBL 20000 begin ... procedure code end

In the unlikely event that the procedure containing the PUSHUTABLE command was closed while still compiling or evaluating, the table settings are not restored, since table sizes cannot be changed in the middle of a request compilation or evaluation.

POPUTABLE is probably most useful for restoring table sizes saved by a PUSHUTABLE command at command level (not inside a procedure). For example, it might be useful in a batch stream that contains many Begin/End blocks where maybe only one has unusual table size requirements. That request could be enclosed inside a PUSHUTABLE/POPUTABLE bracket.

Note: In cases where you make frequent use of the the PUSHUTABLE and POPUTABLE commands, you may want to consider using relative value settings for the table size parameters. For example:

UTABLE LSTBL 10000+ LVTBL 400- LQTBL 120%

This statement requests that LSTBL be increased by 10000, LVTBL decreased by 400, and LQTBL multiplied by 120%, that is, increased by 20% or multiplied by 1.2. So, if the settings of LSTBL, LVTBL, and LQTBL were 200000, 50000, and 150000 respectively before the above command, they would be 210000, 49600, and 180000 after.