0

This is for anyone with experience compiling Cobol programs using CICS on AIX (7.1).

I need to compile a few simple COBOL/CICS programs on AIX. The problem I'm having is on the link.

We run cob2 HELLO.cob and the compile is successful but the link step shows:

ld: 0711-317 ERROR: Undefined symbol: .CICSAPIWSADDRE

ld: 0711-317 ERROR: Undefined symbol: .CICSAPIE

ld: 0711-317 ERROR: Undefined symbol: .CICSAPIEDFINIT

Now obviously these symbols are in a library someplace, but where? I cannot find documentation to locate them and I've searched the IBM world for this.

Thank you for any help. If there is documentation on these symbols please point me to it.

Neeku
  • 3,646
  • 8
  • 33
  • 43
mister270
  • 366
  • 1
  • 15

1 Answers1

0

Please give your compilations commands, exactly you issued on your machine.

You can not simply run "cob2 sourcename". You need some other flags as well e.g. "cob2_r -qLIB -bI:/usr/lpp/cics/lib/cicsprIBMCOB.exp -e _iwz_cobol_main -L/usr/lpp/cics/lib -lsarpc -lpthreads -qAPOST -o HELLO.ibmcob HELLO.cbl". Or you can use simply "cicstcl -lIBMCOB HELLO.ccp".

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
  • You wouldn't ask for people's email "id"s to help them. You'll help them here, since it's a Q/A website to actually help people! Edit your answer, format it properly, and provide further detail to make it look better and more helpful. – Neeku Jun 19 '14 at 12:56
  • Huangism, how are you saying that this does not provide an answer? I have given him the two compilation commands. – user3756353 Jun 19 '14 at 13:19
  • "cob2 sourcename" is exactly how IBM's manuals describe it in running the sample program, cob2_r is the same (although that's for threaded code). As I said the compile goes without error but the missing symbols indicate I need libraries for the -l option; those I don't know, there are lots of archives in /usr/lpp/cics/lib and most of those are archives of a single .o file. – mister270 Jun 19 '14 at 18:08
  • Can you please give me the link where IBM has mentioned "cob2 sourcename" in its manual for compiling TXSeries program? – user3756353 Jun 20 '14 at 05:32
  • The confusion for me was that I didn't see the following information on pg. 236 of COBOL for AIX, V4.1.1 Programming Guide. "The default options used by the cob2 command are obtained from the configuration file, which is by default /etc/cob2.cfg. You can display the options used by cob2 (or cob2_j, or cob2_r) by specifying the -# option on the command." So in my case I needed to specify the options as Brad suggested and/or modify this file. Once again IBM proves that no topic is so confusing it can't be made more so. – mister270 Jun 24 '14 at 21:29