i am getting a runtime error "Load error : file '_EXTNAME'". I am using external Variables.
Ubuntu cobol server 7.0 (Update 4). On V6.0 it works fine.
Is there a path or a file missing?
i am getting a runtime error "Load error : file '_EXTNAME'". I am using external Variables.
Ubuntu cobol server 7.0 (Update 4). On V6.0 it works fine.
Is there a path or a file missing?
i am getting a runtime error "Load error : file '_EXTNAME'". I am using external Variables.
Ubuntu cobol server 7.0 (Update 4). On V6.0 it works fine.
Is there a path or a file missing?
Hello @wgherm,
Welcome to the Micro Focus Community Site. Below, I have a few questions to help learn more about your issue.
. $COBDIR/bin/cobsetenv
myexecutable
ldd myexecutable
Blair
Hello @wgherm,
Welcome to the Micro Focus Community Site. Below, I have a few questions to help learn more about your issue.
. $COBDIR/bin/cobsetenv
myexecutable
ldd myexecutable
Blair
Load error : file '_EXTNAME'
error code: 173, pc=6B5, call=1, seg=0
173 Called program file not found in drive/directory
cobol@zzz4:/usr/zup/pgm/03/an$ ldd z03an001.int
not a dynamic executable
INT is built with a windows Compiler, patchlevel 0 or 1. Dev Hub on Ubuntu is not installed (but on V6)
Load error : file '_EXTNAME'
error code: 173, pc=6B5, call=1, seg=0
173 Called program file not found in drive/directory
cobol@zzz4:/usr/zup/pgm/03/an$ ldd z03an001.int
not a dynamic executable
INT is built with a windows Compiler, patchlevel 0 or 1. Dev Hub on Ubuntu is not installed (but on V6)
Thanks for your response.
Unfortunately, I have not been able to reproduce the error you described. I've tested with a pair of small programs which include both external files and external variables. The programs were compiled to .int on Windows with Visual COBOL 6.0, and then run on Ubuntu using COBOL Server 7.0 Patch Update 4. I'll provide the source for these programs below. Please try them in your environment and let me know if they run without error.
mainprog.cbl
identification division.
program-id. mainprog.
select test-file assign to "testfile.txt"
organization is line sequential
file status is file-status.
data division.
fd test-file external.
01 test-record pic x(20).
working-storage section.
01 file-status pic x(2) is external.
01 ext-item pic x(10) is external.
procedure division.
move "mainprog" to ext-item
open output test-file
if file-status = "00"
display "open OK"
else
display "open failed = " file-status
end-if
move all "1" to test-record
write test-record
if file-status = "00"
display "write OK"
else
display "write failed = " file-status
end-if
call "subprog"
display "return from subprog"
display "ext-item = " ext-item
read test-file
if file-status = "00"
display "read OK - rec = " test-record
else
display "read failed = " file-status
end-if
close test-file
goback.
end program mainprog.
Subprog.cbl
identification division.
program-id. subprog.
select test-file assign to "testfile.txt"
organization is line sequential
file status is file-status.
data division.
fd test-file external.
01 test-record pic x(20).
working-storage section.
01 file-status pic x(2) is external.
01 ext-item pic x(10) is external.
procedure division.
display "in subprog"
display "ext-item = " ext-item
move "subprog" to ext-item
move all "2" to test-record
write test-record
if file-status = "00"
display "write OK"
else
display "write failed = " file-status
end-if
close test-file
open input test-file
if file-status = "00"
display "open OK"
else
display "open failed = " file-status
end-if
goback.
If these programs do not reproduce the problem, feel free to modify them so that they reproduce the issue you've described.
i am getting a runtime error "Load error : file '_EXTNAME'". I am using external Variables.
Ubuntu cobol server 7.0 (Update 4). On V6.0 it works fine.
Is there a path or a file missing?
I've found it. My program uses "_EXTNAME" to read value from environment variable
556 CALL "_EXTNAME" USING USRNAME2-FILE-SET USRNAME-FILE-LOC
557 CANCEL "_EXTNAME"
I've found it. My program uses "_EXTNAME" to read value from environment variable
556 CALL "_EXTNAME" USING USRNAME2-FILE-SET USRNAME-FILE-LOC
557 CANCEL "_EXTNAME"
maybe, this is the better way:
display "USERNAME" upon environment-name accept val from environment-value
I've found it. My program uses "_EXTNAME" to read value from environment variable
556 CALL "_EXTNAME" USING USRNAME2-FILE-SET USRNAME-FILE-LOC
557 CANCEL "_EXTNAME"
Can you please clarify if the problem is now solved or it is still occurring even if program _EXTNAME exists?
i am getting a runtime error "Load error : file '_EXTNAME'". I am using external Variables.
Ubuntu cobol server 7.0 (Update 4). On V6.0 it works fine.
Is there a path or a file missing?
code is changed, problem is solved.
code is changed, problem is solved.
Just fyi,
_EXTNAME is not a program, it is an entry point in the COBOL run-time system on Windows that exists purely for compatibility with old products, probably predating the syntax for handling environment variables that the code has been changed to use. I don't think that it was ever in Unix/Linux products and is no longer documented so the change that you have made is correct.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.