$TSOWait: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />Wait for program invoked via $TsoAtt to complete<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Wait for program invoked via $TsoAtt to complete<section end="desc" /></span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $TSOWait function is [[to be entered]].</p>
<p class="warning">Most Sirius $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 $TsoAtt to complete.<blockquote> This function requires the special version of the TSO full screen interface to ''Model 204'' that is distributed by Sirius Software. </blockquote>  
This function waits for a program invoked via $TsoAtt to complete.<blockquote> This function requires the special version of the TSO full screen interface to ''Model 204'' that is distributed by Sirius Software. </blockquote>  
Line 11: Line 11:


The second argument is string containing the name of an image to receive output data from the invoked program. This is an optional argument.
The second argument is string containing the name of an image to receive output data from the invoked program. This is an optional argument.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $TSOWait( task_id, out_image )
<p class="syntax"><section begin="syntax" /> %RESULT = $TSOWait( task_id, out_image )
Line 18: Line 19:
<p class="caption">%RESULT is set either to the completion code from the invoked program or to an error code.</p>
<p class="caption">%RESULT is set either to the completion code from the invoked program or to an error code.</p>


$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.


$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.<p>
<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
  -16 - Image not found
  -16 - Image not found
  -20 - LOUTPB too small
  -20 - LOUTPB too small
Line 29: Line 31:
</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 waits for the 'COMPRESS' command to complete.


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.
<p class="code"> B
<p class="code"> B
   
   
Line 45: Line 47:
  END
  END
</p>
</p>
<p class="code">


<ul>
<ul>
 
<li>[[Japanese $Functions]]
<li>&JAPF
 
</ul>
</ul>
</p>
<p class="caption">Products authorizing $TSOWait
<p class="caption">Products authorizing $TSOWait
</p>
</p>


[[Category:$Functions|$TSOWait]]
[[Category:$Functions|$TSOWait]]

Revision as of 20:35, 8 February 2011

<section begin="desc" />Wait for program invoked via $TsoAtt to complete<section end="desc" />

Most Sirius $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.

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.

The first argument is 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.

The second argument is string containing the name of an image to receive output data from the invoked program. This is an optional argument.

Syntax

<section begin="syntax" /> %RESULT = $TSOWait( task_id, out_image ) <section end="syntax" />

$TSOWait Function

%RESULT is set either to the completion code from the invoked program or to an error code.

$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

$TSOWait return codes

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