SQL/MP Programming Manual for C
Dynamic SQL Operations
HP NonStop SQL/MP Programming Manual for C—429847-008
10-38
Basic Dynamic SQL Program
SET DEFINE CLASS MAP
ADD DEFINE =EMPLOYEE, FILE PERSNL.EMPLOYEE
Following is sample output for the program:
47> run ezout
PLEASE ENTER:
1 -- To find average salary based on employee number
2 -- To find average salary based on job code
3 -- To find average salary based on department number
1
Please enter the comparison criteria:
(for example: > 500, = 1000, <= 250)
> 500
THE AVERAGE SALARY IS: 52250
48>
The commented program listing appears in Example 10-7 on page 10-39.