22.12.2012 Views

z/TPF Program Management - IBM

z/TPF Program Management - IBM

z/TPF Program Management - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APP := BILL<br />

ASM_SRC := bill.asm<br />

ASM_SRC += a123.asm<br />

maketpf_env := billing<br />

maketpf_env += base_rt<br />

include maketpf.rules<br />

The only difference from the example in “Create a single-segment BSO” on<br />

page 61 is the addition of a second BAL segment.<br />

2. Create two source segments: /home/joe/mywork/billing/rt/src/bill.asm and<br />

/home/joe/mywork/billing/rt/src/a123.asm.<br />

3. Update the user control file with entries for the new program:<br />

a. Create a copy of the control file in your working directory:<br />

cp /tpf/z11/local_mod/base/cntl/usr.cntl /home/joe/mywork/base/cntl/usr.cntl<br />

b. Edit the file that you just copied and add a new entry for the program named<br />

BILL. Enter the following information on one line.<br />

BILL;APP;billing/rt/src/bill.mak;1;ALL;OBJ;<strong>TPF</strong>_SBALL;LOADONLINE;STUB;DEMAND;DEBUG;<br />

50;PROGRAM;NOGRP;<strong>IBM</strong>_DEFT;BPAUTH;RESTRICT;MONTC;KEY0;NOCMB;TIMESLICE;;;;;;;;;;;;;<br />

c. Add a new stub entry for each of the additional entry points.<br />

A123;STUB;billing/rt/src/bill.mak;;ALL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />

See “Control files” on page 103 for more information about the control file fields<br />

and values.<br />

4. Enter the maketpf command to build the program. This assumes that a file<br />

named maketpf.cfg exists in the /home/joe/mywork/build directory.<br />

cd /home/joe/mywork/build<br />

maketpf bill<br />

See “maketpf utility” on page 6 for more information about the maketpf<br />

command and its options.<br />

Use common source files in multiple-segment BSOs<br />

As an extension to the multiple-segment BSO topic, it is possible to include the<br />

same BAL source file in two or more BSOs. However, this can lead to a problem<br />

when two or more BSOs have a commonly named entry point. Therefore, an<br />

additional step must be taken to suppress the common entry point in all but one of<br />

the BSOs. To do this, you must use an export file.<br />

To demonstrate, consider two BSOs named BILL and CRDT, both of which contain<br />

source file a123.asm. We want to suppress the external A123 entry point from CRDT<br />

and only export it from BILL. This task assumes that “Create a multiple-segment<br />

BSO with multiple external entry points” on page 62 has been completed before<br />

starting this task.<br />

1. The BILL makefile remains as shown in “Create a multiple-segment BSO with<br />

multiple external entry points” on page 62.<br />

2. Create a new makefile (/home/joe/mywork/billing/rt/src/crdt.mak) as shown<br />

in the following example:<br />

APP := CRDT<br />

ASM_SRC := crdt.asm<br />

ASM_SRC += a123.asm<br />

APP_EXPORT := LIST<br />

maketpf_env := billing<br />

maketpf_env += base_rt<br />

include maketpf.rules<br />

Assemble, compile, and link (build) application programs 63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!