ILE C/C++ Programmer's Guide
CL CMD program T1520CM1 is shown in Figure 51.
This developer-defined command:
- Prompts the user to enter, in the following order: Item
name, Unit price, and Number of items
- Stores the input data in the following keyword parameters:
ITEM, PRICE, and QUANTITY.
- Note:
- These keyword parameters were defined in the DDS file T1520DD1.
Figure 55. T1520CM1 -- CL Command Source to Receive Input Data
CMD PROMPT('CALCULATE TOTAL COST')
PARM KWD(ITEM) TYPE(*CHAR) LEN(20) RSTD(*NO) +
MIN(1) ALWUNPRT(*NO) PROMPT('Item name' 1)
PARM KWD(PRICE) TYPE(*DEC) LEN(10 2) RSTD(*NO) +
RANGE(0.01 99999999.99) MIN(1) +
ALWUNPRT(*YES) PROMPT('Unit price' 2)
PARM KWD(QUANTITY) TYPE(*INT2) RSTD(*NO) RANGE(1 +
9999) MIN(1) ALWUNPRT(*YES) +
PROMPT('Number of items' 3)
|
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.