$oprsys

Return a mnemonic for the operating system used by Uniface.

$oprsys

Return Values

Values returned by $oprsys

Value

Operating system

H

Microsoft Windows 98

L

Microsoft Windows NT

M

Microsoft Windows 8

N

Microsoft Windows Server 2012

P

Microsoft Windows XP

S

Windows Server 2016

T Windows Server 2019

U

Unix

W

Windows 10

Y

Microsoft Windows Vista

2

Microsoft Windows Server 2000

3

Microsoft Windows Server 2003

4

AS/400

7

Microsoft Windows 7

8

Microsoft Windows Server 2008

Note:   If a service or report component is running in a remote environment, the $oprsys function returns the operating system of the server (not of the client).

Use

Allowed in all Uniface component types.

Description

The function $oprsys returns the mnemonic for the operating system that the Uniface application or Application Server is using.

Using $oprsys to Create a Log File

In this example $oprsys is used to create a log file recording user, program and operating system details.

variables
   string localvar
   string filetext
endvariables

selectcase $oprsys
   case "7"
      localvar = "Microsoft Windows 7"
   case "8"
      localvar = "Microsoft Windows 8"
   case "W"
      localvar = "Microsoft Windows 10"
   case "U"
      localvar = "Unix"

   elsecase
      localvar = "a supported operating system"
endselectcase

filetext = "%%$user%%% ran program %%$applname%%% under %%localvar%%%.%%^"
filedump/append filetext, "log.txt"