$TsoCan: Difference between revisions
mNo edit summary |
EllieWiccan (talk | contribs) (Automatically generated page update) |
||
(28 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Cancel program invoked via $TsoAtt</span> | <span class="pageSubtitle">Cancel program invoked via $TsoAtt</span> | ||
<p class=" | <p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TsoCan function.</p> | ||
This function cancels a specific task running a program invoked via $TsoAtt or all such tasks initiated by the current user.< | This function cancels a specific task running a program invoked via <var>$TsoAtt</var> or all such tasks initiated by the current user.<p>'''Note: ''' This function requires the special version of the TSO full screen interface to <var class="product">Model 204</var> that is distributed by Sirius Software. </p> | ||
The $TsoCan function accepts one argument and returns a numeric status code or count | The <var>$TsoCan</var> function accepts one argument and returns a numeric status code or count. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="term">%result</span> = <span class="literal">$TsoCan</span>([<span class="term">task_id</span>]) | ||
< | |||
< | |||
</p> | </p> | ||
$TsoCan normally returns the status code of the cancelled task. If there is some error that prevents the task from being cancelled, however, a negative error code is returned to indicate the problem. | ===Syntax terms=== | ||
<table class="syntaxTable"> | |||
<tr><th>%result</th> | |||
<td>Either the status code for the cancelled task or an [[#Error codes|error code]].</td></tr> | |||
<tr><th>task_id</th> | |||
<td>The number that is the task id of the "task" for which status is requested. This is an optional argument; omitting it indicates that you want all tasks to be cancelled.</td></tr> | |||
</table> | |||
===Error codes=== | |||
<var>$TsoCan</var> normally returns the status code of the cancelled task. If there is some error that prevents the task from being cancelled, however, a negative error code is returned to indicate the problem. | |||
<p class="code"> | <p class="code"> -1 - Connection broken | ||
-4 - Not a TSO full screen IODEV (IODEV 11) | |||
-8 - Incorrect version of TSO interface | |||
-20 - LOUTPB too small | |||
</p> | </p> | ||
The following program invokes a program called | ==Example== | ||
The following program invokes a program called <code>COMPRESS</code> in the user's TSO address space with a parameter of <code>DSN(JUNK.CNTL)</code>, issues a <var>Find</var> while <code>COMPRESS</code> is running, and then cancels the <code>COMPRESS</code> command if it is still running. | |||
<p class="code"> B | <p class="code">B | ||
%taskid = $TsoAtt( 'COMPRESS', , 'DSN(JUNK.CNTL)') | |||
FIND1: IN BIGFILE FIND ALL RECORDS FOR WHICH | |||
NAME IS LIKE 'SM*' | |||
END FIND | |||
%rc = $TsoCan( %taskid ) | |||
... | ... | ||
End | |||
</p> | </p> | ||
==Products authorizing {{PAGENAMEE}}== | |||
<ul class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
<li> | <li>Japanese $functions | ||
</ul> | </ul> | ||
[[Category:$Functions|$TsoCan]] | [[Category:$Functions|$TsoCan]] |
Latest revision as of 23:23, 20 September 2018
Cancel program invoked via $TsoAtt
Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TsoCan function.
This function cancels a specific task running a program invoked via $TsoAtt or all such tasks initiated by the current user.
Note: This function requires the special version of the TSO full screen interface to Model 204 that is distributed by Sirius Software.
The $TsoCan function accepts one argument and returns a numeric status code or count.
Syntax
%result = $TsoCan([task_id])
Syntax terms
%result | Either the status code for the cancelled task or an error code. |
---|---|
task_id | The number that is the task id of the "task" for which status is requested. This is an optional argument; omitting it indicates that you want all tasks to be cancelled. |
Error codes
$TsoCan normally returns the status code of the cancelled task. If there is some error that prevents the task from being cancelled, however, a negative error code is returned to indicate the problem.
-1 - Connection broken -4 - Not a TSO full screen IODEV (IODEV 11) -8 - Incorrect version of TSO interface -20 - LOUTPB too small
Example
The following program invokes a program called COMPRESS
in the user's TSO address space with a parameter of DSN(JUNK.CNTL)
, issues a Find while COMPRESS
is running, and then cancels the COMPRESS
command if it is still running.
B %taskid = $TsoAtt( 'COMPRESS', , 'DSN(JUNK.CNTL)') FIND1: IN BIGFILE FIND ALL RECORDS FOR WHICH NAME IS LIKE 'SM*' END FIND %rc = $TsoCan( %taskid ) ... End
Products authorizing $TsoCan
- Japanese $functions