Topic
1 reply Latest Post - ‏2011-01-17T18:27:57Z by SystemAdmin
SystemAdmin
SystemAdmin
308 Posts
ACCEPTED ANSWER

Pinned topic CICSTCL to compile main cobol program with static link to cobol subprogram

‏2011-01-12T20:09:38Z |
Hi,

I'm looking to port a mainframe CICS application down to the TXSeries platform.

I am using CICSTCL to compile a COBOL CICS application program. The program (PROGA) calls a standard COBOL subroutine(PROGB). PROGB is compiled using cob2 since it has NO CICS parameters in it and is a shared program between Batch and CICS applications. (works this way in ZOS CICS).

PROGB has been successfully compiled and generated a '.lst', a '.exe' and a '.obj' file.

I have the PROGB.exe file in a folder called 'loadlib' and the PROGB.obj file in a folder called 'objlib'. Both of these folders are specified in the 'LIB' environment parameter.

PROGA compiles successfully but when attempting to link it provides me the error:

error LNK2029: "_PROB@4" : unresolved external

Any ideas as to what I have done incorrectly? I'm now a bit lost.

Regards,

David
Updated on 2011-01-17T18:27:57Z at 2011-01-17T18:27:57Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    308 Posts
    ACCEPTED ANSWER

    Re: CICSTCL to compile main cobol program with static link to cobol subprogram

    ‏2011-01-17T18:27:57Z  in response to SystemAdmin
    David,

    In a TXSeries environment, we cannot CALL a COBOL executable (.exe) file from a COBOL CICS application program. So the program PROGB must be compiled using the CICSTCL command (even if it doesn't have the CICS statements in it), or by using the cob2 compiler directly to generate a DLL (PROGB.dll) rather than an .exe file.

    HTH

    Cheers,
    Hari