I have not used a SET command before. Where do I put this command before execution. Do I have to do the set on the commnad prompt screen or within the program code.
You have a number of possibilities for this:
1. from a command prompt (the same that is used for starting your program otherwise it won't work): SET EXTFH=... <Enter>, after this start your program from the same command prompt.
2. In your program, before any file is opened:
01 ENVVARNAME PIC X(06) VALUE "EXTFH" & X"00".
01 ENVVARVALUE PIC X(...) VALUE "<Your extfh.cfg>" & X"00".
...
CALL "SetEnvironmentVariableA"
USING BY REFERENCE ENVVARNAME
BY REFERENCE ENVVARVALUE.
3. (NT/2000/XP)
Right-click "My computer" and select "Properties"
Choose page "Advanced"
Click on "Environment" (Must be something like this, i have another language on the system).
Add the environment variable by clicking "New"
4. (95/98/ME)
Add the SET EXTFH=.. to the autoexec.bat file.
I would prefer method 2, because that makes your program always work, without setting things different first. Also it will not bother the rest of the system.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.