12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- $PBExportHeader$f_outrep_array.srf
- global type f_outrep_array from function_object
- end type
- forward prototypes
- global subroutine f_outrep_array (string arg_outrepstr)
- end prototypes
- global subroutine f_outrep_array (string arg_outrepstr);Long ll_cnt,cnt
- String ls_outrepstr
- string ls_outrep
- string local_outrep[]
- ll_cnt = 0
- ls_outrepstr = arg_outrepstr
- IF sys_power_issuper Or arg_outrepstr = '0' THEN
-
- SELECT count(*) INTO :cnt
- From u_outrepdef;
- IF sqlca.SQLCode <> 0 Or cnt = 0 THEN
- ll_cnt++
- local_outrep[ll_cnt] = ''
- ELSE
- DECLARE cur_plugins CURSOR FOR
- SELECT distinct u_outrepdef.outrepname
- FROM u_outrepdef;
-
- OPEN cur_plugins;
- FETCH cur_plugins Into :ls_outrep;
- DO WHILE sqlca.SQLCode = 0
- ll_cnt++
- local_outrep[ll_cnt] = ls_outrep
- FETCH cur_plugins Into :ls_outrep;
- LOOP
-
- CLOSE cur_plugins;
-
- END IF
-
- ELSEIF Trim(arg_outrepstr) = '' Or Trim(arg_outrepstr) = '-1' THEN
- local_outrep[1] = ''
- ELSE
- DO WHILE Len(ls_outrepstr) <> 1
- ls_outrepstr = Replace( ls_outrepstr, 1, 1, '' )
- ls_outrep = Left(ls_outrepstr,Pos(ls_outrepstr,',',1) - 1)
- ll_cnt++
- local_outrep[ll_cnt] = ls_outrep
-
- ls_outrepstr = Replace ( ls_outrepstr, 1, Pos(ls_outrepstr,',',1) - 1, '' )
- LOOP
- END IF
- sys_user_outrep = local_outrep
- end subroutine
|