Skip to main content

RM/COBOL-85 Compiler - Version 6.09.04 for SCO Unix System V R 3.2.2 is used on a number of systems where the configuration is supposedly identical (aside from registration number) to many other systems, but, on the affected system, the compiler fails to build source files in a standard folder.  For example:

$ cd /PROJECT/25

$ /usr/bin/rmcobol SCH399
RM/COBOL-85 Compiler - Version 6.09.04 for SCO Unix System V R 3.2.2.
Configured for xx users.
Copyright (c) 1985, 1986-1996 by Liant Software Corp.  All rights reserved.
Registration number: TA-xxxx-xxxxx-xx
Open error for file SCH399.

The issue is not permissions related, and the error message is misleading.  Using a system call trace utility, I can see that the problem is one of path translation.  In the partial log below, note that SCH399.CBL is found in the current working directory (/PROJECT/25) but the compiler proceeds to attempt to open the source file at the path "/dev/25/SCH399.CBL".  It obviously fails because this is not where the source file was found:

stat("SCH399", 0x7ffff5c0) = ENOENT
stat("SCH399", 0x7ffff4dc) = ENOENT
open("SCH399", 0x0, 0x1b6) = ENOENT
stat("/PROJECT/25/SCH399", 0x7ffff5c0) = ENOENT
stat("/PROJECT/25/SCH399", 0x7ffff4dc) = ENOENT
open("/PROJECT/25/SCH399", 0x0, 0x1b6) = ENOENT
stat("SCH399.cbl", 0x7ffff5c0) = ENOENT
stat("SCH399.cbl", 0x7ffff4dc) = ENOENT
open("SCH399.cbl", 0x0, 0x1b6) = ENOENT
stat("/PROJECT/25/SCH399.cbl", 0x7ffff5c0) = ENOENT
stat("/PROJECT/25/SCH399.cbl", 0x7ffff4dc) = ENOENT
open("/PROJECT/25/SCH399.cbl", 0x0, 0x1b6) = ENOENT
stat("SCH399.CBL", 0x7ffff5c0) = 0
stat("SCH399.CBL", 0x7ffff4dc) = 0
open("SCH399.CBL", 0x0, 0x1b6) = 5
fcntl(5, 2, 1) = 0
fstat(5, 4231524) = 0
close(5) = 0
open("/dev/25/SCH399.CBL", 0x2, 0x1b6) = ENOENT
open("/dev/25/SCH399.CBL", 0x0, 0x1b6) = ENOENT
lseek(4, 0xb00, 0) = 2816
read(4, "j\\A2 \\00 \\00 \\83 \\A2 \\00 \\00 \\9A \\A2 \\00 \\00 \\9D \\...", 256) = 256
lseek(4, 0xa200, 0) = 41472
read(4, "ipted references...", 512) = 512
Open error for file SCH399.
write(2, "Open error for file SCH399.\\n", 28) = 28

write(2, " \\n", 2) = 2
close(4) = 0
close(3) = 0
close(0) = 0
close(1) = 0
close(2) = 0
Process 609 terminated normally with 250
Child process has exited

From reading the user guide, it appears that some sort of configuration is in place that translates "/PROJECT" to "/dev", as this error occurs for any compilation attempted under /PROJECT regardless of the subdirectory where the source exists.  /PROJECT is not a filesystem link that points to "/dev".

I have searched the entire system for .rmcobolrc and rmcobolrc files, but find none (not even .runcobolrc, runcobolrc, .recover1rc, or recover1rc).  RM/COBOL is installed in /usr/bin and has files in /usr/rmcobol also:

/usr/bin/rmcobol
/usr/bin/rmcobol.ovy
/usr/bin/rmcobol.scl
/usr/bin/rmcobolso/
/usr/rmcobol/

/etc/default does not contain files related to RM/COBOL.

Checksums for /usr/rmcobol, /usr/bin, and /usr/bin/rmcobolso files match between the broken and working systems, except for .MSG files which I presume might be related to license number differences.

No RM* environment variables are set, and PATH does not contain /dev.  There are no environment variables named SCH399 to implement synonym renames.  I have tried setting variables like RM_VERBOSE_BANNER=Y and RM_IGNORE_GLOBAL_RESOURCES=Y with no improvement.

If I set a SCH399 environment variable to attempt a workaround:

$ SCH399=/PROJECT/25/SCH399.CBL; export SCH399

The error related to the source file is removed as it correctly opens /PROJECT/25/SCH399.CBL, but the compile still dies while attempting to create:

/dev/25/SCH399.COB

Compile succeeds if sources are place anywhere else not under the top-level /PROJECT folder. 

$ unset SCH399

$ cp -rp /PROJECT/25 ${HOME}/25

$ cd ${HOME}/25

$ rmcobol SCH399

RM/COBOL-85 Compiler - Version 6.09.04 for SCO Unix System V R 3.2.2.
Configured for xx users.
Copyright (c) 1985, 1986-1996 by Liant Software Corp.  All rights reserved.
Registration number: TA-xxxx-xxxxx-xx

Total generated object size:      10458 (X"000028DA") bytes

Errors: 0, Warnings: 0, Lines: 1545 for program SCH399.

Compilation complete -- Programs: 1, Errors: 0, Warnings: 0.

Can anyone offer a suggestions as to where to look for path translation configuration to remove the translation of /PROJECT to /dev?

Regards,

Kevin Bulgrien


#RMCOBOL