HP 3000 Manuals

Packaging [ Micro Focus COBOL for UNIX, Getting Started ] MPE/iX 5.0 Documentation


Micro Focus COBOL for UNIX, Getting Started

Packaging 

When your application is working you may want to make it independent of
the Toolbox system so you can distribute it for use on other
binary-compatible machines.  To do this you use the UNIX system linker,
which can be accessed from the Toolbox main menu.


NOTE You can link your program only if you have a "C"/Operating System Development System installed on your machine. This provides the system tools that cob needs, like ld, the system linker.
First you use the Generator again, to produce an .o file instead of a .gnt file. 1. Press F5=generate. The Generator menu appears as before. 2. Press F6=gnt/object so that the word "object" appears on the information line. 3. Press Enter. The program is generated, but this time an .o file is produced. 4. Press F8=link A menu appears enabling you to specify the program to be linked and giving you access to various functions and options useful at this point. Because you have just been working with tictac its name is already set there, with the extension .o assumed; and the default settings of the menu are what we want. So you do not enter anything on this menu. 5. Press Enter. The command line that Toolbox will pass to the system linker is displayed, and then linking begins. A list headed "Entry points defined in module: tictac.o" is displayed, after which there may be a long pause before the linking finishes and you are returned to the Toolbox main menu. 6. Now exit from COBOL Toolbox to the operating system, as above. Figure 4-5
[]
Figure 4-5. The Load File Menu Running the Linked Program 1. To run the linked program, enter: ./tictac The program now runs independently of the COBOL system and you can play the Tic-Tac-Toe game.


MPE/iX 5.0 Documentation