f_storage_array_all.srf 669 B

123456789101112131415161718192021222324252627282930313233
  1. $PBExportHeader$f_storage_array_all.srf
  2. global type f_storage_array_all from function_object
  3. end type
  4. forward prototypes
  5. global subroutine f_storage_array_all ()
  6. end prototypes
  7. global subroutine f_storage_array_all ();Long ll_cnt
  8. Long ll_storageid
  9. Long local_storageid[]
  10. DECLARE cur_storage CURSOR FOR
  11. SELECT u_storage.storageID
  12. FROM u_storage
  13. WHERE u_storage.inuse = 1
  14. Order By u_storage.storageID Desc;
  15. OPEN cur_storage;
  16. FETCH cur_storage INTO :ll_storageid;
  17. DO WHILE sqlca.SQLCode = 0
  18. ll_cnt++
  19. local_storageid[ll_cnt] = ll_storageid
  20. FETCH cur_storage INTO :ll_storageid;
  21. LOOP
  22. CLOSE cur_storage;
  23. sys_all_storageid = local_storageid
  24. end subroutine