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 :
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, "]".