IBM AS/400 Frozen Dessert Maker User Manual


 
Using the CRTBNDRPG Command
Figure 31 on page 60 shows the screen which appears after entering the
above command.
Display Module Source
Program: EMPRPT Library: MYLIB Module: EMPRPT
1 *==============================================================*
2 * MODULE NAME: EMPRPT
3 * RELATED FILES: EMPMST (PHYSICAL FILE)
4 * QSYSPRT (PRINTER FILE)
5 * DESCRIPTION: This program prints employee information
6 * from the file EMPMST.
7 *==============================================================*
8 FQSYSPRT O F 80 PRINTER
9 FEMPMST IP E K DISK
10
11 D TYPE S 8A
12 D EMPTYPE PR 8A
13 D CODE 1A
14
15 IEMPREC 01
More...
Debug . . . _________________________________________________________________
_______________________________________________________________________________
F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable
F12=Resume F17=Watch variable F18=Work with watch F24=More keys
Figure 31. Display Module Source display for EMPRPT
From this screen (the Display Module Source display) you can enter debug
commands to display or change field values and set breakpoints to control
program flow while debugging.
For more information on debugging see Chapter 11, “Debugging Programs” on
page 163.
Creating a Program with Static Binding
In this example you create a program COMPUTE using CRTBNDRPG to which you
bind a service program at program-creation time.
Assume that you want to bind the program COMPUTE to services which you have
purchased to perform advanced mathematical computations. The binding directory
to which you must bind your source is called MATH. This directory contains the
name of a service program that contains the various procedures that make up the
services.
To create the object, type:
CRTBNDRPG PGM(MYLIB/COMPUTE)
DFTACTGRP(*NO) ACTGRP(GRP1) BNDDIR(MATH)
The source will be bound to the service program specified in the binding directory
MATH at program-creation time. This means that calls to the procedures in the
service program will take less time than if they were dynamic calls.
When the program is called, it will run in the named activation group GRP1. The
default value ACTGRP parameter on CRTBNDRPG is QILE. However, it is recom-
mended that you run your application as a unique group to ensure that the associ-
ated resources are fully protected.
60 ILE RPG for AS/400 Programmer's Guide