C$GETRUNENV
The C$GETRUNENV library routine returns the architecture where the COBOL program is running.
Syntax:
 CALL "C$GETRUNENV" GIVING  env
Parameters:
env
PIC 9(n)
Receives the environment.
Possible values, defined in iscobol.def, are:
 
RUNENV-STANDALONE
RUNENV-CHARVA
RUNENV-REMOTE-CALL
RUNENV-THIN-CLIENT
RUNENV-WEB-CLIENT
RUNENV-WD2
RUNENV-J2EE
RUNENV-MOBILE
Examples:
Example - Check if running in webDirect environment
working-storage section.
copy "iscobol.def".
77 env pic 9.
...
procedure division.
...
call "c$getrunenv" giving env.
if env = runenv-wd2
   display "Running in webDirect"
end-if.