$Cms: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
m (misc formatting) |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle">Determine if online is running under CMS</span> | <span class="pageSubtitle">Determine if online is running under CMS</span> | ||
<p class="warn"><b>Note: </b> | <p class="warn"><b>Note:</b> Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the <var>$Cms</var> function.</p> | ||
The <var>$Cms</var> function determines if the Model 204 Online is running under CMS. | |||
==Syntax== | ==Syntax== | ||
<p class="syntax">% | <p class="syntax">%cms = $Cms </p> | ||
</p> | |||
<p> | <p> | ||
< | <var>$Cms</var> accepts no arguments; it returns a 1 if the Online is running under CMS, or it returns a 0 otherwise. n</p> | ||
< | |||
==Usage notes== | |||
<p class="code"> | <var>$Cms</var> can be used before running any operating system specific code. For example, the following code fragment sets [[Global features#Global string variables|global variable]] <code>NEXTPROC</code> to <code>PROC.CMS</code> if running under CMS, or it sets <code>NEXTPROC</code> to <code>PROC.MVS</code>, otherwise: | ||
<p class="code">if $cms then | |||
%rc = $setg('NEXTPROC', 'PROC.CMS') | |||
else | |||
%rc = $setg('NEXTPROC', 'PROC.MVS') | |||
end if | |||
</p> | </p> | ||
==Products authorizing {{PAGENAMEE}}== | ==Products authorizing {{PAGENAMEE}}== | ||
Line 33: | Line 30: | ||
<li>Japanese functions</li> | <li>Japanese functions</li> | ||
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | <li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li> | ||
</ul> | </ul> | ||
[[Category:$Functions|$Cms]] | [[Category:$Functions|$Cms]] |
Revision as of 17:04, 24 January 2018
Determine if online is running under CMS
Note: Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Cms function.
The $Cms function determines if the Model 204 Online is running under CMS.
Syntax
%cms = $Cms
$Cms accepts no arguments; it returns a 1 if the Online is running under CMS, or it returns a 0 otherwise. n
Usage notes
$Cms can be used before running any operating system specific code. For example, the following code fragment sets global variable NEXTPROC
to PROC.CMS
if running under CMS, or it sets NEXTPROC
to PROC.MVS
, otherwise:
if $cms then %rc = $setg('NEXTPROC', 'PROC.CMS') else %rc = $setg('NEXTPROC', 'PROC.MVS') end if