Can a shell variable be called in a cobol program

Hi All,
I have a file which sets all the variables on unix , based on the hostname. Currently these variables are hardcoded in the cobol programs.I was wondering if unix variables can be used in Cobol programs ?

Example :
I have a variable $SHTEMP which is set based on the following :

Prod server : /lv8/pearl/shprod/shtemp

Test Server : /lv8/pearl/shtest/shtemp

Can I use $SHTEMP variable in the cobol program ?

Any help would be appreciated.

If you exported it as an environment variable perhaps, before running the program.

SHTEMP="..."
export SHTEMP

myprogram

How to retrieve it depends on what cobol compiler/toolset you're using.

Isn't it an option to you, instead of acessing an environment variable from inside COBOL, receive it as an argument to your program?

I don't know a lot about COBOL, I used microfocus a few times and below is a part of one of my programs that received an argument - PROCEDURE DIVISION:

	GET-CMDLINE-ARG.
		ACCEPT PRG-ARGS FROM COMMAND-LINE.
		ACCEPT COUNT-ARGS FROM ARGUMENT-NUMBER.
		DISPLAY "INF: Count arguments  : [", COUNT-ARGS, "]".
		DISPLAY "INF: Program arguments: [", PRG-ARGS, "]".

Hope it helps!