$TsoCmd: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(15 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Invoke command in user's TSO address space</span>
<span class="pageSubtitle">Invoke command in user's TSO address space</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TsoCmd 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 $TsoCmd function.</p>


This function invokes a command in the user's TSO address space.<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>  
This function invokes a command in the user's TSO address space.
<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 <var>$TsoCmd</var> function accepts two arguments and returns a numeric completion code.  
The <var>$TsoCmd</var> function accepts two arguments and returns a numeric completion code.  


The first argument is a string containing the name of the command 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.
==Syntax==
<p class="syntax"><span class="term">%result</span> = <span class="literal">$TsoCmd</span>([<span class="term">clist</span>], [<span class="term">parms</span>])
</p>


The second argument is a string containing the parameters to be passed to the invoked command. This is an optional argument.
<table class="syntaxTable">
<tr><th>%result</th>
<td>Either the completion code from the invoked command or an error code.</td></tr>


==Syntax==
<tr><th>clist</th>
<p class="syntax"><section begin="syntax" /> %RESULT = $TsoCmd(clist, parms)
<td>A string containing the name of the command 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>
<section end="syntax" /></p>
 
<p class="caption">$TsoCmd Function
<tr><th>parms</th>
</p>
<td>A string containing the parameters to be passed to the invoked command. This is an optional argument.</td></tr>
<p class="caption">%RESULT is set either to the completion code from the invoked command or to an error code.</p>
</table>


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


<p class="code">
<p class="code"> 0 - No command name specified
  0 - No command 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
-20 - LOUTPB too small
-20 - LOUTPB too small
-28 - Command name is too long
-28 - Command name is too long
</p>
<p class="caption">$TsoCmd return codes
</p>
</p>


The following program invokes a command called <tt>ALLOCATE</tt> in the user's TSO address space with a parameter of <tt>DSN('M204.DATA') NEW TRACKS SPACE(15,10)</tt>.
==Example==
The following program invokes a command called <code>ALLOCATE</code> in the user's TSO address space with a parameter of <code>DSN('M204.DATA') NEW TRACKS SPACE(15,10)</code>.


<p class="code"> B
<p class="code">B
%RC = $TsoCmd( 'ALLOCATE', -
%RC = $TsoCmd( 'ALLOCATE', -
'DSN(''M204.DATA'') NEW TRACKS SPACE(15,10)')
'DSN(&#39;'M204.DATA&#39;') NEW TRACKS SPACE(15,10)')
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 $TsoCmd
</p>


[[Category:$Functions|$TsoCmd]]
[[Category:$Functions|$TsoCmd]]

Latest revision as of 23:23, 20 September 2018

Invoke command in user's TSO address space

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

This function invokes a command in the user's TSO address space.

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

The $TsoCmd function accepts two arguments and returns a numeric completion code.

Syntax

%result = $TsoCmd([clist], [parms])

%result Either the completion code from the invoked command or an error code.
clist A string containing the name of the command 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.
parms A string containing the parameters to be passed to the invoked command. This is an optional argument.

Error codes

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

0 - No command name specified -1 - Connection broken -4 - Not a TSO full screen IODEV (IODEV 11) -8 - Incorrect version of TSO interface -20 - LOUTPB too small -28 - Command name is too long

Example

The following program invokes a command called ALLOCATE in the user's TSO address space with a parameter of DSN('M204.DATA') NEW TRACKS SPACE(15,10).

B %RC = $TsoCmd( 'ALLOCATE', - 'DSN(''M204.DATA'') NEW TRACKS SPACE(15,10)') END

Products authorizing $TsoCmd

  • Japanese $functions