$Cms: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (update link)
 
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Cms}}
{{DISPLAYTITLE:$Cms}}
<span class="pageSubtitle"><section begin="desc" />Determine if online is running under CMS<section end="desc" /></span>
<span class="pageSubtitle">Determine if online is running under CMS</span>


<p class="warning">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 $Cms 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"><section begin="syntax" /> %CMS = $Cms
<p class="syntax">%cms = $Cms </p>
<section end="syntax" /></p>
<p>
<p class="caption">$Cms Function
<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 class="caption">%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
==Products authorizing {{PAGENAMEE}}==  
<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.
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[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>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[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>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
<p class="caption">Products authorizing $Cms
</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