$TsoCall: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 8: Line 8:
The <var>$TsoCall</var> function accepts five arguments and returns a numeric completion code.  
The <var>$TsoCall</var> function accepts five arguments and returns a numeric completion code.  


The first argument is a string containing the name of the program to be invoked in the TSO address space. This is an optional argument; and if it is null or missing, no processing is performed and a completion code of 0 is returned.


The second argument is a string containing the path name for the program to be invoked in the TSO address space. This is an optional argument.  
==Syntax==
<p class="syntax"><section begin="syntax" />%result = $TsoCall(clist, path, parms, in_image, out_image)
<section end="syntax" /></p>
 
===Syntax terms===
 
<table class="syntaxTable">
<tr><th>%result</th>
<td>Either a completion code from the invoked program or an error code.</td></tr>


The third argument is a string containing the parameters to be passed to the invoked program. This is an optional argument.  
<tr><th>clist</th>
<td>A string containing the name of the program to be invoked in the TSO address space. This is an optional argument; and if it is null or missing, no processing is performed and a completion code of 0 is returned. </td></tr>


The fourth argument is a string containing the name of an image containing input data for the invoked program. This is an optional argument.  
<tr><th>path</th>
<td>A string containing the path name for the program to be invoked in the TSO address space. This is an optional argument. </td></tr>


The fifth argument is string containing the name of an image to receive output data from the invoked program. This is an optional argument.
<tr><th>parms</th>
<td>A string containing the parameters to be passed to the invoked program. This is an optional argument. </td></tr>


==Syntax==
<tr><th>in_image</th>
<p class="syntax"><section begin="syntax" /> %RESULT = $TsoCall(clist, path, parms, in_image, out_image)
<td>A string containing the name of an image containing input data for the invoked program. This is an optional argument. </td></tr>
<section end="syntax" /></p>
 
<p class="caption">$TsoCall Function
<tr><th>out_image</th>
</p>
<td>A string containing the name of an image to receive output data from the invoked program. This is an optional argument.</td></tr>
<p class="caption">%RESULT is set either to the completion code from the invoked program or to an error code.</p>
</table>


===Status codes===
<var>$TsoCall</var> normally returns the completion code from the invoked program. If there is some error that prevents the program from being invoked, however, an error code is returned to indicate the problem.
<var>$TsoCall</var> normally returns the completion code from the invoked program. If there is some error that prevents the program from being invoked, however, an error code is returned to indicate the problem.


<p class="code">
<p class="code">   0 - No program name specified
  0 - No program name specified
-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
-28 - Program name is too long
-28 - Program name is too long
</p>
<p class="caption">$TsoCall return codes
</p>
</p>


==Example==
The following program invokes a program called 'DELETE' in the user's TSO address space with a parameter of 'DSN(TEMP.SAS.DATA)'.
The following program invokes a program called 'DELETE' in the user's TSO address space with a parameter of 'DSN(TEMP.SAS.DATA)'.
<p class="code">B
%RC = $TsoExec( 'DELETE', , 'DSN(TEMP.SAS.DATA)')
END
</p>


<p class="code"> B
%RC = $TsoExec( 'DELETE', , 'DSN(TEMP.SAS.DATA)')
END
</p>


<ul class="smallAndTightList">
<ul class="smallAndTightList">

Revision as of 19:29, 24 October 2012

Call program in user's TSO address space

Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TsoCall function.

This function invokes a program in the user's TSO address space. $TsoCall performs a "synchronous" call to the program. That is, control is not returned from $TsoCall until the invoked program terminates.

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

The $TsoCall function accepts five arguments and returns a numeric completion code.


Syntax

<section begin="syntax" />%result = $TsoCall(clist, path, parms, in_image, out_image) <section end="syntax" />

Syntax terms

%result Either a completion code from the invoked program or an error code.
clist A string containing the name of the program to be invoked in the TSO address space. This is an optional argument; and if it is null or missing, no processing is performed and a completion code of 0 is returned.
path A string containing the path name for the program to be invoked in the TSO address space. This is an optional argument.
parms A string containing the parameters to be passed to the invoked program. This is an optional argument.
in_image A string containing the name of an image containing input data for the invoked program. This is an optional argument.
out_image A string containing the name of an image to receive output data from the invoked program. This is an optional argument.

Status codes

$TsoCall normally returns the completion code from the invoked program. If there is some error that prevents the program from being invoked, however, an error code is returned to indicate the problem.

0 - No program name specified -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 -28 - Program name is too long

Example

The following program invokes a program called 'DELETE' in the user's TSO address space with a parameter of 'DSN(TEMP.SAS.DATA)'.

B %RC = $TsoExec( 'DELETE', , 'DSN(TEMP.SAS.DATA)') END


Products authorizing $TsoCall