$TSOStat: Difference between revisions
(Created page with "{{DISPLAYTITLE:$TSOStat}} <span class="pageSubtitle"><section begin="desc" />Status of program invoked via $TsoAtt<section end="desc" /></span> <p class="warning">Most Sirius $f...") |
m (1 revision) |
(No difference)
|
Revision as of 15:45, 31 January 2011
<section begin="desc" />Status of program invoked via $TsoAtt<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $TSOStat function is to be entered.
This function returns the status of a task running a program invoked via $TsoAtt or returns the number of such programs currently active.
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.
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
<section begin="syntax" /> %RESULT = $TSOStat(task_id) <section end="syntax" />
$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
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
- &JAPF