13 liens privés
/ --- Rexx --------------------------------------------------------- /
/ Fonction EDIT d'un PDS ou d'un membre /
/ Paramètres : - néant /
/ Entrée : - néant /
/ Sortie : - néant /
/ ------------------------------------------------------------------ /
Address ISREDIT
"MACRO (param)"
if param = "PARAM" then parse arg param
parse upper value param with param
/address tso "SUBCOM ISREDIT"
if rc = 0 then address ISREDIT "MACRO (param)"
else parse upper arg param/
call initialisation
call lire_param
call ou_est_ce
call fin
exit
/----------------------------/
/ Initialisation des données /
/----------------------------/
initialisation:
call mesvar("-l "param)
src = mesvar("-g glChn")
ndv = mesvar("-g glLang")
env = mesvar("-g glEnv")
brq = mesvar("-g glBrq")
call mesvar("-p glOutils whereis")
nb = 0
trouve = 0
if src = "*" then src = mesvar(src)
return
/------------------------------------------/
/ Lecture et interprétation des paramètres /
/------------------------------------------/
lire_param:
Address ISPEXEC
select
when length(src) = 0 then do
zedsmsg = "Parametre absent"
zedlmsg = "Il me faut un nom de membre source"
"setmsg msg(isrz001)"
exit 4
end
when length(src) > 8 then do
zedsmsg = "Parametre trop long"
zedlmsg = "Il me faut un nom de membre source <8 carateres"
"setmsg msg(isrz001)"
exit 4
end
when datatype(src) = 'NUM' then do
zedsmsg = "Parametre incorrect"
zedlmsg = "Il me faut un nom de membre source"
"setmsg msg(isrz001)"
exit 4
end
when datatype(src) = 'CHAR' then nop
otherwise do
zedsmsg = "Cas non prevu"
zedlmsg = "Je ne sais pas quoi faire"
"setmsg msg(isrz001)"
exit 4
end
end
if src = "*" ! src = "=" then src = mesvar(src)
return
ou_est_ce:
if ndv = "NDV" then
call liste_ndv
else do
call cherche_presence "OTEST.NDV.STC.COBBT.BASE"
call cherche_presence "OTEST.NDV.STC.COBCO.BASE"
call cherche_presence "OTEST.NDV.STC.COBTP.BASE"
call cherche_presence "OTEST.NDV.STC.COPY.BASE"
call cherche_presence "OTEST.NDV.STC.DCLGEN.BASE"
call cherche_presence "OTEST.NDV.STC.JCL.BASE"
call cherche_presence "OQUAL.NDV.STC.COBBT.BASE"
call cherche_presence "OQUAL.NDV.STC.COBCO.BASE"
call cherche_presence "OQUAL.NDV.STC.COBTP.BASE"
call cherche_presence "OQUAL.NDV.STC.COPY.BASE"
call cherche_presence "OQUAL.NDV.STC.DCLGEN.BASE"
call cherche_presence "OQUAL.NDV.STC.JCL.BASE"
call cherche_presence "ULIVR.NDV.STC.COBBT.BASE"
call cherche_presence "ULIVR.NDV.STC.COBCO.BASE"
call cherche_presence "ULIVR.NDV.STC.COBTP.BASE"
call cherche_presence "ULIVR.NDV.STC.COPY.BASE"
call cherche_presence "ULIVR.NDV.STC.DCLGEN.BASE"
call cherche_presence "ULIVR.NDV.STC.JCL.BASE"
call cherche_presence "UINTE.NDV.STC.COBBT.BASE"
call cherche_presence "UINTE.NDV.STC.COBCO.BASE"
call cherche_presence "UINTE.NDV.STC.COBTP.BASE"
call cherche_presence "UINTE.NDV.STC.COPY.BASE"
call cherche_presence "UINTE.NDV.STC.DCLGEN.BASE"
call cherche_presence "UINTE.NDV.STC.JCL.BASE"
call cherche_presence "OMAIN.NDV.STC.COBBT.BASE"
call cherche_presence "OMAIN.NDV.STC.COBCO.BASE"
call cherche_presence "OMAIN.NDV.STC.COBTP.BASE"
call cherche_presence "OMAIN.NDV.STC.COPY.BASE"
call cherche_presence "OMAIN.NDV.STC.DCLGEN.BASE"
call cherche_presence "OMAIN.NDV.STC.JCL.BASE"
call cherche_presence "OTEST.IFUS120.REXX"
call cherche_presence "ET03.CMDPROC"
call cherche_presence "SYS1.SICECLIB"
call cherche_presence "ISP.SISPCLIB"
call cherche_presence "DB2.T$$$.SDSNCLST"
call cherche_presence "ISR.ETUD.CLIS3"
call cherche_presence "USYST.ETUD.CLIST"
call cherche_presence "ISP.SISPEXEC"
call cherche_presence "PLEX1.JCLLIB"
end
return
cherche_presence:
parse upper arg dsn
if sysdsn(dsn"("src")") = 'OK' then do
say dsn"("src")"
trouve = trouve + 1
if trouve = 1 then
call mesvar("-p glDSN "dsn)
return 1
end
return
liste_ndv:
call ndvsrc (src Env Brq)
liste = mesvar("-g glLstPrm")
parse value liste with nb"//"liste
trouve = trouve + nb
do i=1 to nb
parse value liste with prg brq stag elmt typ"/"liste
fichier = prg brq stag typ elmt
fichier = fichier!!" -> "stag".NDV."brq"."typ".BASE("elmt")"
say fichier
end
return
fin:
if trouve = 0 then
say "Aucune occurence de "src" trouvee"
else
say "Trouve "trouve" occurence(s) de "src
return