Highlighted
Absent Member.
Absent Member.
598 views

[archive] How to Accept "temp" directory

[Migrated content. Thread originally posted on 24 June 2003]

Hello fellow salt-of-the-earth Cobol types,

Does anyone out there know how to ACCEPT the TEMP directory on a SCO Unix system? I've tried:
ACCEPT WS-TEMP-DIR FROM ENVIRONMENT "TEMP-DIR"
(and "TEMP"), but it's just spaces.
Background: We're compiling some programs with a special config that'll let us run in a Windows environment. For temporary files that we'd rather not store in our standard data directory, we thought we'd extract the temp dir path and use that. It works fine on Windows, where it gives (on my PC):
C:\DOCUME~1\molin\LOCALS~1\Temp

Thanks in advance... Mike
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to Accept "temp" directory

As far as I know, there is no standard TEMP-DIR variable on Unix systems. It is always /tmp.

You could check what operating system you're on in your COBOL program, and if it is Unix, just 'MOVE "/tmp" TO WS-TEMP-DIR' or put the following lines in /etc/profile to set the TEMP-dir variable yourselve:

TEMP_DIR=/tmp
export TEMP_DIR

Note: Mind the use of the underscore '_' in stead of the hyphen '-' in Unix.

Andr? Mathlener
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to Accept "temp" directory

Thanks, Andre
- Mike
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.