The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script running with "ksh" dumping core but not with "sh" simhe02 HP-UX 9 11-04-2008 08:52 PM
Running command "md5" on remote host not working. ynilesh UNIX for Advanced & Expert Users 1 02-01-2008 08:15 AM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM
"syntax error at line 21 :'done' unexpected." error message" ibroxy Shell Programming and Scripting 3 08-08-2007 07:45 AM
Help! "Bus error" and "CPU Panic" box wont boot hcclnoodles SUN Solaris 3 10-05-2006 05:38 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-30-2006
jbrubaker jbrubaker is offline
Registered User
  
 

Join Date: Jun 2006
Location: New York
Posts: 25
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 (permalink)  
Old 06-30-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,762
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 (permalink)  
Old 06-30-2006
jbrubaker jbrubaker is offline
Registered User
  
 

Join Date: Jun 2006
Location: New York
Posts: 25
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 (permalink)  
Old 06-30-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,762
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 (permalink)  
Old 06-30-2006
jbrubaker jbrubaker is offline
Registered User
  
 

Join Date: Jun 2006
Location: New York
Posts: 25
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 (permalink)  
Old 06-30-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,762
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?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0