ILE C/C++ Programmer's Guide


Task Summary

Table 7 lists the tasks you must perform to create the sample ILE application. Each task number is linked to the corresponding procedure step. Each component name is linked to the figure that contains its source code.

Table 7. Summary of Tasks Required to Create Sample ILE Application

Task Component
1 Create the physical file to contain the audit log. The DDS source defines the fields for the audit file. T1520DD1
2 Create the CL program that passes required parameters to the ILE C program T1520PG1. T1520CL1
3 Create the CL command prompt that collects data from the user's terminal session. T1520CM1
4 Create the module that provides the UEP (main() function), which:
  • Receives the user input from the CL program T1520CL1
  • Calls calc_and_format()function in module T1520IC2, which:
    • Calculates an item's total cost
    • Calls the write_audit_trail() function in module T1520IC3
T1520IC1
5 Create the module that provides the called function calc_and_format(), which completes the tax calculation by:
  • Receiving arguments from module T1520IC1
  • Importing the tax rate data item from an ILE C service program
Note:
The function calc_and_format() also formats the total cost.
T1520IC2
6 Create the module that provides the write_audit_trail() function. This module creates the ILE C service program T1520SP1. T1520IC3
7 Create the module that exports the tax rate data. This module creates the ILE C service program T1520SP2. T1520IC4
8 Create a source physical file QSRVSRC that contains the binder language to export the procedure write_audit_trail from ILE Service Program T1520SP1. QSRVSRC
9 Create the source physical file QASRVSRC that contains the binder language to export the data item taxratefrom ILE service program T1520SP2. QASRVSRC
10 Create the binding directory that contains the service programs T1520SP1 and T1520SP2 and add the service program names to the directory. T1520BD1
11 Create the ILE C service program T1520SP1 from:
  • Module T1520IC3, which exports the tax rate data
  • The physical file (QSRVSRC), which contains the binder language source(1)
T1520IC3
QSRVSRC
12 Create the ILE C service program T1520SP2 from:
  • Module T1520IC4, which exports the procedure write_audit_trail.
  • The physical file (QASRVSRC), which contains the binder language source(1)
T1520IC4
QSRVSRC
13 Create the ILE C program T1520PG1 from the following components:
  • T1520IC1
  • T1520IC2
T1520IC1
TC1520IC2
14 Test the program by running it.

Notes:

  1. A tool is provided in the QUSRTOOL library to help generate the binder language for one or more modules. See member TBNINFO in the file QUSRTOOL/QATTINFO.


[ Top of Page | Previous Page | Next Page | Table of Contents ]