error running COBOL - ".loader does not exist"


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers error running COBOL - ".loader does not exist"
# 1  
Old 06-30-2006
error running COBOL - ".loader does not exist"

Hello. I am new to the unix environment. Currently, I am taking existing COBOL source code and attempting to compile and run on our new UNIX machine. I have succesfully compiled an object. When I try to run I get the follwing error:

0509-036 Cannot load program abeunix.o because of the following errors:
0509-108 The .loader section does not exist.

Does anyone have an idea of what I am missing?

Thanks in advance for any suggestions.
# 2  
Old 06-30-2006
It looks as if you did not completely compile your code. Some compilers, like microfocus, for example, allow you to have have two steps in compilation. You can, using options, tell it where to stop compiling.

If you set a -c option it tells the compiler to create an object file (myfile.o)
Which is what you seem to be trying to run. .o cannot be loaded. Only executable image files can be loaded and run.

What compiler
# 3  
Old 06-30-2006
When I compile I use the command:

cob2 abeunix.cbl

It creates the abeunix.o object.

Should I be compiling differently??

I am using the IBM COBOL for AIX compiler. On the listing it says

PP 5724-H44 IBM COBOL for AIX 2.0.0
# 4  
Old 06-30-2006
Oh.

By default many compilers produce a file called a.out. The abeunix.o file is an intermedite file made along the way to creating your final executable.

Try:

Code:
cob2 -o abeunix abeunix.cob

Code:
ls -l abeunix

should show a file "abeunix" made a few seconds ago. Try running that.
# 5  
Old 06-30-2006
My source code file is abeunix.cbl

The reason I tried to execute the abeunix.o file is that that was the one created when I compiled that was not the listing (abeunix.lst)

When I ran

cob2 -o abeunix abeunix.cob

it said "cannot find abeunix.cob"

I then figured you were referring to the .cob file as my source so then I issued the command

cob2 -o abeunix abeunix.cbl

That ran and produced the .o but there was not a file that was called "abeunix".

My manual says issuing a "-v" will display and run the compile and link edit steps. I did that and it produced the .o file again and I tried to run and got the same initial error.

Any ideas? And thanks alot for your replies so far - you have been great.
# 6  
Old 06-30-2006
do an ls -lrt on the directory where you are compiling.
compile your file with the -v option
do an ls -lrt again.

There should be new files created by the compiler in that directory - they will be the last ones listed. What are they?
# 7  
Old 06-30-2006
The new files are

abeunix.lst
abeunix.o

BUT - your going to kill me for this. I am getting a return code of 8 which probably means my link step is not working. I looked at the errors and they are not showstoppers so I just need to adjust the compiler to accept a return code of 8 and then run.

I think I saw something about that in the manual.

Thanks for your help. If you know quickly off the top of your head how to tell the compiler that a rc of 8 is acceptable, I would be grateful if you would share that.

Thanks again.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Dummies Questions & Answers

SSHd is running, but cant connect "Network error: Connection refused"

Hi, i checked on rhel VPS is running sshd (service ssh status) But i cant connect via putty: "Network error: Connection refused" Please which log file in my centos rhel linux i need to watch or what are steps to do to discover cause? (3 Replies)
Discussion started by: postcd
3 Replies

3. Shell Programming and Scripting

How to put a "timer" when running df - NFS error

Hi gurus, OS = SunOS 5.8 Not sure whether to post this in the scripting one or to advance and experts. Am posting on both since there is two things that am wanting to achieve. Am currerntly having NFS server errors where it is having problems NFS mounting some of the volumes from the... (1 Reply)
Discussion started by: newbie_01
1 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. UNIX for Dummies Questions & Answers

UNIX Scripts "Load Error" with MicroFocus COBOL subprograms

When running our UNIX job scripts we randomly get the following 198 error below. When we restart the job it works fine. I haven't been able to recreate the problem in test, so I'm wondering if it has something to do with Cron or possibly a memory error or memory leak. I don't see anything... (5 Replies)
Discussion started by: rthiele
5 Replies

6. AIX

AIX cp error: "A file or directory in the path does not exist"

Hello fellow UNIX fans, I'm running AIX 4.3 and getting an error message “cp: /a/file2.db: A file or directory in the path does not exist” when I run the following command: cp /b/file.db /a/file2.db It stops every time about 95% of the way through the copy process at 1,073,741,312 bits. ... (3 Replies)
Discussion started by: Jackson123
3 Replies

7. UNIX for Dummies Questions & Answers

Any options with "cp" to create a folder if it doesn't exist.

I've created a backup and restore script and it's working fine so it's all about making it more robust at the moment for me. Let's say the user has a folder in their home directory for word processing files called "wp". I want to copy the files I made a backup of from this directory back into it.... (2 Replies)
Discussion started by: EwanD
2 Replies

8. Programming

how to simulate "mkdir -p /home/blah1/blah2/blah3" in "c" where only /home exist

I'm trying to make use of mkdir(char *pathname, S_IRWXU) to create the directories. but it only creates one directory at a time. so I have to separate the tokens for "/home/blah1/blah2/blah3" as "home blah1 blah2 blah3" using delimiter "/", but it is again hectic to create such directory... (8 Replies)
Discussion started by: platinumedge
8 Replies

9. Red Hat

error"warning: user owen does not exist - using root"?

I am trying to install openmotif22-2.2.3-18.src.rpm, after I typed in " rpm -i openmotif22-2.2.3-18.src.rpm" the following message comes out: warning: user owen does not exist - using root warning: group owen does not exist - using root I am install openmotif under root account. Do... (2 Replies)
Discussion started by: fishwater00
2 Replies

10. HP-UX

script running with "ksh" dumping core but not with "sh"

Hi, I have small script written in korn shell. When it is called from different script, its dumping core, but no core dump when we run it standalone. And its not dumping core if we run the script using "/bin/sh" instead of "ksh" Can some body please help me how to resolve this issue. ... (9 Replies)
Discussion started by: simhe02
9 Replies
Login or Register to Ask a Question