Skip to main content

[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

[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
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

[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
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

[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
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

[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
Thanks, Andre
- Mike

[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
Thanks, Andre
- Mike

[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
Thanks, Andre
- Mike