$TSOWait: Difference between revisions
m (1 revision) |
EllieWiccan (talk | contribs) (Automatically generated page update) |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Wait for program invoked via <var>$TsoAtt</var> to complete</span> | <span class="pageSubtitle">Wait for program invoked via <var>$TsoAtt</var> to complete</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 $TSOWait function.</p> | ||
This function waits for a program invoked via <var>$TsoAtt</var> to complete.<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. </ | This function waits for a program invoked via <var>$TsoAtt</var> to complete.<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 $TSOWait function accepts two arguments and returns a numeric completion code or task id. | The $TSOWait function accepts two arguments and returns a numeric completion code or task id. | ||
==Syntax== | |||
<p class="syntax"><span class="term">%result</span> = <span class="literal">$TSOWait</span>(<span class="term"> task_id</span>, [<span class="term">out_image</span>] ) | |||
</p> | |||
===Syntax terms=== | |||
<table class="syntaxTable"> | |||
<tr><th>%result</th> | |||
<td>Either the completion code from the invoked program or an error code.</td></tr> | |||
<tr><th>task_id</th> | |||
<td>A number that is the task id of the "task" to be waited on. This task id is returned by <var>$TsoAtt</var> at program invocation time. </td></tr> | |||
<tr><th>out_image</th> | |||
< | <td>A string containing the name of an image to receive output data from the invoked program. This is an optional argument.</td></tr> | ||
< | <table> | ||
< | |||
<var>$TSOWait</var> normally returns the completion code from the invoked program. If there is some error that prevents the program from being invoked, however, a negative error code is returned to indicate the problem | ===Error codes=== | ||
<var>$TSOWait</var> normally returns the completion code from the invoked program. If there is some error that prevents the program from being invoked, 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 | |||
-16 - Image not found | |||
-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 waits for the <code>COMPRESS</code> command to complete. | |||
<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 = $TSOWait( %TASKID ) | |||
... | ... | ||
END | |||
</p> | </p> | ||
==Products authorizing $TSOWait== | |||
<ul> | <ul> | ||
<li> | <li>Japanese $functions | ||
</ul> | </ul> | ||
[[Category:$Functions|$TSOWait]] | [[Category:$Functions|$TSOWait]] |
Latest revision as of 23:23, 20 September 2018
Wait for program invoked via $TsoAtt to complete
Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TSOWait function.
This function waits for a program invoked via $TsoAtt to complete.
Note: This function requires the special version of the TSO full screen interface to Model 204 that is distributed by Sirius Software.
The $TSOWait function accepts two arguments and returns a numeric completion code or task id.
Syntax
%result = $TSOWait( task_id, [out_image] )
Syntax terms
%result | Either the completion code from the invoked program or an error code. |
---|---|
task_id | A number that is the task id of the "task" to be waited on. This task id is returned by $TsoAtt at program invocation time. |
out_image | A string containing the name of an image to receive output data from the invoked program. This is an optional argument. |
Error codes
$TSOWait normally returns the completion code from the invoked program. If there is some error that prevents the program from being invoked, 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 -16 - Image not found -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 waits for the COMPRESS
command to complete.
B %TASKID = $TsoAtt( 'COMPRESS', , 'DSN(JUNK.CNTL)') FIND1: IN BIGFILE FIND ALL RECORDS FOR WHICH NAME IS LIKE 'SM*' END FIND %RC = $TSOWait( %TASKID ) ... END
Products authorizing $TSOWait
- Japanese $functions