ILE C/C++ Programmer's Guide

Source Code to Define a CL Command to Collect Session Data

CL CMD program T1520CM1 is shown in Figure 51.

This developer-defined command:

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 ]