Previous Topic: Sample Procedure ProgramNext Topic: CA IDMS Scalar Functions


Sample of Procedure Invocation

The first four examples are all equivalent. The last example returns an error indication.


  call demoempl.get_bonus(1234);
  EMP_ID         BONUS  CURRENCY_BONUS
    1234             6530  $

  1 row processed


  call demoempl.get_bonus(emp_id = 1234);
  EMP_ID         BONUS  CURRENCY_BONUS
    1234             6530  $

  1 row processed


  select * from demoempl.get_bonus where emp_id = 1234;
  EMP_ID         BONUS  CURRENCY_BONUS
    1234             6530  $

  1 row processed

  select * from demoempl.get_bonus(emp_id = 1234);
  EMP_ID         BONUS  CURRENCY_BONUS
    1234             6530  $

  1 row processed


  call demoempl.get_bonus(0);
  EMP_ID         BONUS  CURRENCY_BONUS
       0                  0   ERR

  1 row processed