For Programmers: Free Programming Magazines  


Home > Archive > Cobol > September 2004 > AIX COBOL link editing error...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AIX COBOL link editing error...
kprasann

2004-09-03, 8:55 pm

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!

Charles W. Cribbs II

2004-09-03, 8:55 pm

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!
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com