Omnis Classic sys() Function Values

The sys(n) function in Omnis Classic and Omnis Studio returns system, environment, and runtime information based on the numeric parameter n.

This is a reference to the most commonly used and historically known values.


Standard sys(n) Return Values

nDescription
1Omnis version number
2Program type flags (full program, runtime, eval, Unicode)
3Company name from installation
4User name from installation
5Serial number entered at install
6Platform code (N = Windows NT/2000+, U = Linux, X = macOS)
7Operating system version string (e.g. 6.2 for Windows 10)
8Omnis platform type (MAC64, WIN32, WIN64, UNIX)
9Path separator (\ or /)
10–20Pathnames of open data segments (10 is library file)
21Print file pathname
22Import file pathname
23Port name
24Report device (Printer, Screen, etc.)
30–49UI menus
50–79Open windows
80Current report name
81Current search name
82Main file name
83Number of records in main file
85–90Method/event context
91–94Separator constants (decimal, thousand, param, field)
101Printer name and network path
104–105Screen width/height (pixels)
106–109Memory details (platform dependent)
110–114Deprecated CPU/Apple ROM/event support data
115Writable files folder path
116Unix lowercase config flag
120–121Windows dialog unit sizes
122WebClient listener started (boolean)
123Omnis executable build number
185, 196, 205, 209, 210, 212, 215–216, 218, 235–256Various newer context/environment/system info like method metadata, library lists, endianness, processors count, UI sort details, executable and app paths, PDF output folders, license count, dark mode, etc.

The Curious Case of Undocumented Extras

Some sys() codes exist outside the official range, often discovered by the community:

nDescription
7 (old use)In earlier Omnis versions, returned OS sub-types (e.g. 4.0 for Win95/NT, 3.10 for Win3.1, 1 for PPC). Modern use: OS version string.
115 (old use)Path of omnis.exe from version 7.3.7 onward in older Classic builds.
202Returns library and omnis.exe directory; "W" marks the working directory (works if .lbr is associated with Omnis).
2000–2003Internal timing and profiling: start, stop, reset timers, and print tick report.

Summary


Tip for Classic Developers:
If you still keep that thick, dog-eared Omnis manual on the shelf, this list will feel like slipping on a favourite old jacket — comfortable and familiar, but still with a few surprises in the pockets.