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
RUNENV-THIN-CALL-CLIENT
RUNENV-WEB-CALL-CLIENT
Examples:
Example - Check if running in WebClient environment
working-storage section.
copy "iscobol.def".
77 env pic 9.
...
procedure division.
...
call "c$getrunenv" giving env.
if env = runenv-web-client
   display "Running in WebClient"
end-if.