home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 6 / 06.iso / a / a610 / 6.ddi / DEMO / FGL / RD_SPERS.4GL < prev    next >
Encoding:
Text File  |  1989-12-08  |  704 b   |  28 lines

  1. DATABASE leads
  2. GLOBALS "globals.4gl"
  3.  
  4. FUNCTION rd_sperson()
  5. {
  6. The rd_sperson report driver retrieves the names and employee
  7. numbers of salespeople from the sperson table.  It then passes
  8. the data to the r_sperson report.
  9. }
  10. DECLARE c_sperson CURSOR FOR
  11.    SELECT      empnum,
  12.                lname,
  13.                fname
  14.       INTO     pr_sperson.empnum,
  15.                pr_sperson.lname,
  16.                pr_sperson.fname
  17.       FROM     sperson
  18.       ORDER BY lname,
  19.                fname
  20. CLEAR SCREEN
  21. START REPORT r_sperson
  22. FOREACH c_sperson
  23.    OUTPUT TO REPORT r_sperson(pr_sperson.empnum, pr_sperson.lname,
  24.      pr_sperson.fname)
  25. END  FOREACH
  26. FINISH REPORT r_sperson
  27. END FUNCTION
  28.