$Cms: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
m (update link)
 
(6 intermediate revisions by 3 users not shown)
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>Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Cms function.</p>
<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>


This function can be used to determine if the online is running under CMS.  
The <var>$Cms</var> function determines if the Model&nbsp;204 Online is running under CMS.  


The <var>$Cms</var> function accepts no arguments and returns either a 1 if the online is running under CMS or a 0 otherwise.
==Syntax==
==Syntax==
<p class="syntax">%CMS = $Cms
<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==
<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>
<p>%CMS is set to either 0 or 1.</p>


This function can be used to test if running under CMS before running any operating system specific code. For example, the program
<p class="code"> IF $Cms THEN
%RC = $SETG('NEXTPROC', 'PROC.CMS')
ELSE
%RC = $SETG('NEXTPROC', 'PROC.MVS')
END IF
</p>
would set global variable NEXTPROC to 'PROC.CMS' if running under CMS and to 'PROC.MVS', otherwise.
==Products authorizing {{PAGENAMEE}}==  
==Products authorizing {{PAGENAMEE}}==  
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[List of $functions|Sirius functions]]</li>
<li>[[Release notes for Model 204 version 7.5#Former Sirius $functions|Sirius Functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>Japanese functions</li>
<li>Japanese functions</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4b/SirfieldNew.pdf Sir2000 Field Migration Facility]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
<p>
</p>


[[Category:$Functions|$Cms]]
[[Category:$Functions|$Cms]]

Latest revision as of 17:53, 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

Products authorizing $Cms