$Cms: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 10: Line 10:
<p class="syntax"><section begin="syntax" />%CMS = $Cms
<p class="syntax"><section begin="syntax" />%CMS = $Cms
<section end="syntax" /></p>
<section end="syntax" /></p>
<p class="caption">$Cms Function
<p>
</p>
</p>
<p class="caption">%CMS is set to either 0 or 1.</p>
<p class="caption">%CMS is set to either 0 or 1.</p>

Revision as of 00:15, 26 October 2012

Determine if online is running under CMS

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

This function can be used to determine if the 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

<section begin="syntax" />%CMS = $Cms <section end="syntax" />

%CMS is set to either 0 or 1.

This function can be used to test if running under CMS before running any operating system specific code. For example, the program

IF $Cms THEN %RC = $SETG('NEXTPROC', 'PROC.CMS') ELSE %RC = $SETG('NEXTPROC', 'PROC.MVS') END IF

would set global variable NEXTPROC to 'PROC.CMS' if running under CMS and to 'PROC.MVS', otherwise.

Products authorizing $Cms