OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
(1) Compile
To create a CUP object file in COBOL, compile the source program using the COBOL compiler. For details of the compilation, see the manual OpenTP1 Programming Reference COBOL Language. The following shows how to enter commands for compiling the source program using COBOL85.
- Example:
- UAP source programs in COBOL
- cupmain.cbl (main program)
- cupfnc1.cbl (sub-program 1)
- cupfnc2.cbl (sub-program 2)
- These source programs are compiled as follows.
ccbl -C2 -Mw cupmain.cbl
ccbl -C2 cupfncl.cbl
ccbl -C2 cupfnc2.cbl
- Executing the ccbl command generates the following object files.
- cupmain.o (object file for the main program)
- cupfnc1.o (object file for the sub-program 1)
- cupfnc2.o (object file for the sub-program 2)
To create an executable file for CUP, link the following files.
- CUP object file (main program and sub-programs)
- TP1/Client/W library
- COBOL library (or COBOL85 library for the CUP created in COBOL85)
The following shows how to enter commands for linking these files using COBOL85.
- Example:
- To create a COBOL CUP executable file "example", link these object files as shown below.
- Object file for the main program
cupmain.o
- Object files for the sub-programs
cupfnc1.o, cupfnc2.o
ccbl -o example cupmain.o cupfnc1.o cupfnc2.o
-L/usr/lib -lclt
- Note
- The -L option is omissible.
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.