systemType

The sysVar.systemType system variable identifies the target system in which the program is running. This variable is read-only.

The following table shows the valid values:

Table 1. Valid values for systemType
Value Platform
AIX® AIX
DEBUG You only see this if you are debugging and the EGL debug preference "Set systemType to DEBUG" is YES (the default). Otherwise sysVar.systemType is set according to the system field of the build descriptor you're debugging with.
HPUX HP-UX
IMSBMP IMS™ BMP
IMSVS IMS/VS
ISERIESC iSeries® COBOL
ISERIESJ iSeries Java™
JAVASCRIPT The value in any Rich UI application
LINUX Linux (Intel hardware)
SOLARIS Solaris
USS z/OS® UNIX System Services
VSEBATCH VSE batch
VSECICS CICS® for VSE
WIN Windows 2000/NT/XP
ZLINUX 64–bit Linux on zSeries hardware. This is a target environment for Java generation only.
ZOSBATCH z/OS batch
ZOSCICS z/OS CICS

Characteristics

sysVar.systemType has the following characteristics:
Primitive type
CHAR
Data length
8 (padded with blanks)
Value saved across segmented converse?
Yes

Definition considerations

The value of sysVar.systemType does not affect code validation at generation time. For example, the following add statement is validated even if you are generating for Windows:
  if (sysVar.systemType IS AIX)
    add myRecord;
  end
To avoid validating code that will never run in the target system, take either of the following actions:
  • Set the eliminateSystemDependentCode build descriptor option to YES. In the current example, the add statement is not validated if you set that build descriptor option to YES. Be aware, however, that the generator can eliminate system-dependent code only if the logical expression (in this case, sysVar.systemType IS AIX) is simple enough to evaluate at generation time.
  • Alternatively, move the statements that you do not want to validate to a second program; then, let the original program call the new program conditionally:
      if (sysVar.systemType IS AIX)
        call myAddProgram myRecord;
      end

Example

  if (sysVar.systemType is WIN)
    call myAddProgram myRecord;
  end