$TSOStat: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(17 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Status of program invoked via $TsoAtt</span>
<span class="pageSubtitle">Status of program invoked via $TsoAtt</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TSOStat function.</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TSOStat function.</p>


This function returns the status of a task running a program invoked via <var>$TsoAtt</var> or returns the number of such programs currently active.<blockquote> 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. </blockquote>  
This function returns the status of a task running a program invoked via <var>$TsoAtt</var> or returns the number of such programs currently active.<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 $TSOStat function accepts one argument and returns a numeric status code or count.  
The $TSOStat function accepts one argument and returns a numeric status code or count.  
The first argument is a number that is the task id of the "task" for which status is requested. This is an optional argument and if omitted indicates that you want the count of currently active TSO tasks.


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $TSOStat(task_id)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$TSOStat</span>([<span class="term">task_id</span>])
<section end="syntax" /></p>
<p class="caption">$TSOStat Function
</p>
</p>
<p class="caption">%RESULT is set to the status code for the task, a count of running tasks, or an error code.</p>


===Syntax terms===
<table class="syntaxTable">
<tr><th>%result</th>
<td>The status code for the task, a count of running tasks, or an error code.</td></tr>
<tr><th>task_id</th>
<td>A number that is the task id of the "task" for which status is requested. This is an optional argument and if omitted indicates that you want the count of currently active TSO tasks.</td></tr>
</table>
===Error codes===
<var>$TSOStat</var> normally returns the status code of an invoked program or a count of currently active tasks. If there is some error that prevents the status from being returned, however, a negative error code is returned to indicate the problem.
<var>$TSOStat</var> normally returns the status code of an invoked program or a count of currently active tasks. If there is some error that prevents the status from being returned, however, a negative error code is returned to indicate the problem.


<p class="code">
<p class="code"> -1 - Connection broken
  -1 - Connection broken
-4 - Not a TSO full screen IODEV (IODEV 11)
  -4 - Not a TSO full screen IODEV (IODEV 11)
-8 - Incorrect version of TSO interface
  -8 - Incorrect version of TSO interface
-20 - LOUTPB too small
-20 - LOUTPB too small
</p>
<p class="caption">$TSOStat return codes
</p>
</p>


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 checks the status of the 'COMPRESS' command.
==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 checks the status of the <code>COMPRESS</code> command:


<p class="code"> B
<p class="code">B
   
   
%TASKID = $TsoAtt( 'COMPRESS', , 'DSN(JUNK.CNTL)')
%TASKID = $TsoAtt( 'COMPRESS', , 'DSN(JUNK.CNTL)')
   
   
FIND1: IN BIGFILE FIND ALL RECORDS FOR WHICH
FIND1: IN BIGFILE FIND ALL RECORDS FOR WHICH
NAME IS LIKE 'SM*'
NAME IS LIKE 'SM*'
END FIND
END FIND
   
   
IF $TSOStat( %TASKID ) NE 0 THEN
IF $TSOStat( %TASKID ) NE 0 THEN
   
   
  ...
  ...
   
   
END
END
</p>
</p>


==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Japanese $Functions]]
<li>Japanese $functions
</ul>
</ul>
<p class="caption">Products authorizing $TSOStat
</p>


[[Category:$Functions|$TSOStat]]
[[Category:$Functions|$TSOStat]]

Latest revision as of 23:23, 20 September 2018

Status of program invoked via $TsoAtt

Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TSOStat function.

This function returns the status of a task running a program invoked via $TsoAtt or returns the number of such programs currently active.

Note: This function requires the special version of the TSO full screen interface to Model 204 that is distributed by Sirius Software.

The $TSOStat function accepts one argument and returns a numeric status code or count.

Syntax

%result = $TSOStat([task_id])

Syntax terms

%result The status code for the task, a count of running tasks, or an error code.
task_id A number that is the task id of the "task" for which status is requested. This is an optional argument and if omitted indicates that you want the count of currently active TSO tasks.

Error codes

$TSOStat normally returns the status code of an invoked program or a count of currently active tasks. If there is some error that prevents the status from being returned, 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 checks the status of the COMPRESS command:

B %TASKID = $TsoAtt( 'COMPRESS', , 'DSN(JUNK.CNTL)') FIND1: IN BIGFILE FIND ALL RECORDS FOR WHICH NAME IS LIKE 'SM*' END FIND IF $TSOStat( %TASKID ) NE 0 THEN ... END

Products authorizing $TSOStat

  • Japanese $functions