Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

AIX COBOL link editing error...
Can anyone help me get past this error message while linking a cobol-db2
program?
Database: DB2 8.1.6 running in AIX
Application: AIX Cobol

Cobol program structure:

procedure division.
call 'subpgm' using var-list.
exec sql
select statement...
end-exec.
stop-run.

commands/paths information used for compilation...

DB2PATH = /apps/db2home/db2ints1/sqllib
CC=cob2
CFLAGS= -qlib -qpgmname\(mixed\) -I$(HOME)/cobol -I$(HOME)/cobol/COPYBOOKS
-I$(DB2PATH)/include/cobol_a
LIBS= -L/usr/opt/db2_08_01/lib -ldb2

pgm.cbl : pgm.sqb
./embprep pgm $(DB) $(UID) $(PWD)
pgm : pgm.cbl checkerr.o
$(CC) -Fcob2.cfg -c pgm pgm.cbl checkerr.o $(CFLAGS) $(LIBS)

When I link-edit the object code produced in the previous step above using
the command
cob2 -o pgm -F ./cob2.cfg pgm.o subpgm.o
it gives the error:

ld: 0711-317 ERROR: Undefined symbol: .sqlgstrt
ld: 0711-317 ERROR: Undefined symbol: .sqlgaloc
ld: 0711-317 ERROR: Undefined symbol: .sqlgstlv
ld: 0711-317 ERROR: Undefined symbol: .sqlgcall
ld: 0711-317 ERROR: Undefined symbol: .sqlgstop
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.

When I comment out the CALL to 'subpgm' the link editing is fine and I'm
able to execute the program! am I missing any path information..

Thanks!


Report this thread to moderator Post Follow-up to this message
Old Post
kprasann
09-04-04 01:55 AM


Re: AIX COBOL link editing error...
If I had to choose something I would say this is the statement that is
killing you.
It looks like there are variables contain various directories.  I would
think you need to make path statement contain these directories to include
these other directories.

./embprep pgm $(DB) $(UID) $(PWD)

"kprasann" <ashprav@rediffmail.com> wrote in message
 news:951c838f0ee74215545d13c74cdf000c@lo
calhost.talkaboutprogramming.com...
> Can anyone help me get past this error message while linking a cobol-db2
> program?
> Database: DB2 8.1.6 running in AIX
> Application: AIX Cobol
>
> Cobol program structure:
>
> procedure division.
> call 'subpgm' using var-list.
> exec sql
>      select statement...
> end-exec.
> stop-run.
>
> commands/paths information used for compilation...
>
> DB2PATH = /apps/db2home/db2ints1/sqllib
> CC=cob2
> CFLAGS= -qlib -qpgmname\(mixed\) -I$(HOME)/cobol -I$(HOME)/cobol/COPYBOOKS
> -I$(DB2PATH)/include/cobol_a
> LIBS= -L/usr/opt/db2_08_01/lib -ldb2
>
> pgm.cbl : pgm.sqb
>         ./embprep pgm $(DB) $(UID) $(PWD)
> pgm : pgm.cbl checkerr.o
>         $(CC) -Fcob2.cfg -c pgm pgm.cbl checkerr.o $(CFLAGS) $(LIBS)
>
> When I link-edit the object code produced in the previous step above using
> the command
> cob2 -o pgm -F ./cob2.cfg pgm.o subpgm.o
> it gives the error:
>
> ld: 0711-317 ERROR: Undefined symbol: .sqlgstrt
> ld: 0711-317 ERROR: Undefined symbol: .sqlgaloc
> ld: 0711-317 ERROR: Undefined symbol: .sqlgstlv
> ld: 0711-317 ERROR: Undefined symbol: .sqlgcall
> ld: 0711-317 ERROR: Undefined symbol: .sqlgstop
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
>
> When I comment out the CALL to 'subpgm' the link editing is fine and I'm
> able to execute the program! am I missing any path information..
>
> Thanks!
>



Report this thread to moderator Post Follow-up to this message
Old Post
Charles W. Cribbs II
09-04-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:57 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.