
|
**********************************************************************
* retourne *LIBL en tant que table *
**********************************************************************
*paramètres
D bib s 10
D texte s 50
*indicateurs SQL
D bib_ind s 5I 0
D texte_ind s 5I 0
*divers SQL
D SQLSTATE s 5
D fonction_qual s 139 varying
D fonction_nom s 128 varying
D msg_diag s 70 varying
D call_type s 5I 0
 
* autres variables de travail
D libl DS
D unposte 11 dim(250)
D unebib 10 overlay(unposte)
D unblanc 1 overlay(unposte:*next)
D i s 10I 0
D max s 10I 0
* pgm appellés
DTBLIBL1 PR EXTPGM('AF4SRCT/TBLIBL1')
D 2750
DTBLIBL2 PR EXTPGM('AF4SRCT/TBLIBL2')
D 10
D 50
 
C *entry plist
C parm bib
C parm texte
 
C parm bib_ind
C parm texte_ind
 
C parm sqlstate
C parm fonction_qual
C parm fonction_nom
C parm msg_diag
C parm call_type
 
* début du code
|
/free if call_type < 0 ; SQLSTATE = '00000' ; TBLIBL1(libl) ; max = %lookup(*blanks : unebib) - 1 ; if max < 1 ; max = 250 ; endif ; return ; elseif call_type = 0 ; I = I + 1 ; if I > max ; SQLSTATE = '02000' ; *inlr = *on ; else ; bib = unebib(i) ; TBLIBL2(bib : texte ) ; endif ; return ; else ; *inlr = *on ; endif ; /end-free |