From: John R. C. <jo...@we...> - 2006-12-28 16:52:38
|
I am converting a batch of programs from a Microfocus for Unix system to TinyCobol (Linux) and am having trouble with subprogram linkages. Here is the situation: In main program "general" I have calls to subprogram maps03 in the form: CALL "maps03" USING MAPS03-WS. This is a WORKING STORAGE copybook with the contents 310 61 [00]: 000000 COPY "wsmaps03.cob". 311 1 [01]: 774001********** 312 2 [01]: 774002* MAPS03 * 313 3 [01]: 774003********** 314 4 [01]: 774004 315 5 [01]: 774005 01 MAPS03-WS. 316 6 [01]: 774006 03 U-DATE PIC x(10). 317 7 [01]: 774007 03 FILLER REDEFINES U-DATE. 318 8 [01]: 774008 05 U-DAYS PIC 99. 319 9 [01]: 774009 05 FILLER PIC X. 320 10 [01]: 774010 05 U-MONTH PIC 99. 321 11 [01]: 774011 05 FILLER PIC X. 322 12 [01]: 05 u-cc pic 99. 323 13 [01]: 774012 05 U-YEAR PIC 99. 324 14 [01]: 774013 03 U-BIN PIC 9(8) comp. The subprogram contains the line: PROCEDURE DIVISION USING MAPA03-WS. and in the linkage section: 000860 LINKAGE SECTION. 73 73 [00]: 000870*--------------- 74 74 [00]: 000880* 75 75 [00]: 000890********** 76 76 [00]: 000900* MAPS03 * 77 77 [00]: 000910********** 78 78 [00]: 000920 79 79 [00]: 000930 01 MAPA03-WS. 80 80 [00]: 000940 03 A-DATE PIC X(10). 81 81 [00]: 000950 03 FILLER REDEFINES A-DATE. 82 82 [00]: 000960 05 A-DAYS PIC 99. 83 83 [00]: 000970 05 FILLER PIC X. 84 84 [00]: 000980 05 A-MONTH PIC 99. 85 85 [00]: 000990 05 FILLER PIC X. 86 86 [00]: 05 A-CC pic 99. 87 87 [00]: 001000 05 A-YEAR PIC 99. 88 88 [00]: 001010 03 A-BIN PIC 9(8) comp. Let's assume static linkage (simpler?) and Legacy layout 1. What options should I have on the compile of maps03.cbl? 2. What options should I have on the compile of general.cbl? Currently when compiled general.cbl can't find subprogram maps03 which was compiled with the -a option. I also compiled it with the -c option. All are in the same directory. The assembler pass says: general.o(.text+0x3dc): In function `general': : undefined reference to `maps03' John Culleton |