13 liens privés
/ --- Rexx --------------------------------------------------------- /
/ Visualisation d'un composant (programme, copy, dclgen)             /
/      Paramètres : - Nom du composant à voir                        /
/                   - Environnement                                  /
/                   - Langage                                        /
/                   - PDS                                            /
/                   - Type                                           /
/                   - Edit                                           /
/      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 fin
exit
/----------------------------/
/ Initialisation des données /
/----------------------------/
initialisation:
call mesvar("-L "param)
src     = mesvar("-g glChn")
lang    = mesvar("-g glLang")
env     = mesvar("-g glEnv")
type    = mesvar("-g glEnv")
edit    = mesvar("-g glEdit VIEW")
btp     = mesvar("-g glBTP")
brq     = mesvar("-g glBrq")
pds     = "vide"
call mesvar("-p glOutils visu")
if src = "-H" ! src = "-HELP" then call aide
call variable_src
return
param_lang:
plang = ""
select
when parm = "SOURCE"  then plang = parm
when parm = "SOURCEX" then plang = parm
when parm = "COBOL"   then plang = parm
when parm = "COPY"    then plang = parm
when parm = "DCLGEN"  then plang = parm
when parm = "ASM"     then plang = parm
/when parm = "APS"     then plang = parm /
/when parm = "APSCOB"  then plang = parm /
when parm = "NDV"     then plang = parm
when parm = "JCL"     then plang = parm
when parm = "JCLX"    then plang = parm
when parm = "PARAM"   then plang = parm
when parm = "PROC"    then plang = parm
when parm = "REXX"    then plang = parm
when parm = "SQL"     then plang = parm
otherwise return 0
end
if lang /= "" then do
zedsmsg = "Probleme parametre langage"
zedlmsg = "Incoherence entre "lang" et "plang
address ispexec "setmsg msg(isrz001)"
exit 4
end
lang = plang
return 1
param_env:
penv = ""
select
when parm = "PERSO" then penv = parm
when parm = "OTEST" then penv = parm
when parm = "OQUAL" then penv = parm
when parm = "UQUAL" then penv = parm
when parm = "URECE" then penv = parm
when parm = "ULIVR" then penv = parm
otherwise return 0
end
if env /= "" then do
zedsmsg = "Probleme parametre environnement"
zedlmsg = "Incoherence entre "env" et "penv
address ispexec "setmsg msg(isrz001)"
exit 4
end
env = penv
return 1
param_special:
if parm = "$" then parm = mesvar(parm)
if pds = "" then
pds = parm
else do
zedsmsg = "Parametre incorrect"
zedlmsg = parm
address ispexec "setmsg msg(isrz001)"
exit 4
end
return 1
param_type:
ptype = ""
select
when parm = "OTEST" then ptype = parm
when parm = "OQUAL" then ptype = parm
when parm = "UQUAL" then ptype = parm
when parm = "URECE" then ptype = parm
when parm = "ULIVR" then ptype = parm
otherwise return 0
end
if type /= "" then do
zedsmsg = "Probleme parametre type"
zedlmsg = "Incoherence entre "type" et "ptype
address ispexec "setmsg msg(isrz001)"
exit 4
end
type = ptype
return 1
param_btp:
pbtp = ""
select
when parm = "COBCO" then pbtp = parm
when parm = "BATCH" then pbtp = parm
when parm = "TP"    then pbtp = parm
otherwise return 0
end
if btp /= "" then do
zedsmsg = "Probleme parametre Batch/TP"
zedlmsg = "Incoherence entre "btp" et "pbtp
address ispexec "setmsg msg(isrz001)"
exit 4
end
btp = pbtp
return 1
param_brq:
pbrq = ""
select
when parm = "BAC" then pbrq = parm
when parm = "BRF" then pbrq = parm
when parm = "BST" then pbrq = parm
when parm = "MIG" then pbrq = parm
when parm = "STC" then pbrq = parm
when parm = "TEC" then pbrq = parm
otherwise return 0
end
if brq /= "" then do
zedsmsg = "Probleme parametre brique"
zedlmsg = "Incoherence entre "brq" et "pbrq
address ispexec "setmsg msg(isrz001)"
exit 4
end
brq = pbrq
return 1
param_edit:
pedit = ""
select
when parm = "EDIT"  then pedit = parm
when parm = "VIEW"  then pedit = parm
otherwise return 0
end
if edit /= "VIEW" then do
zedsmsg = "Probleme parametre edit"
zedlmsg = "Incoherence entre "edit" et "pedit
address ispexec "setmsg msg(isrz001)"
exit 4
end
edit = pedit
return 1
/------------------------------------------/
/ Lecture et interprétation des paramètres /
/------------------------------------------/
lire_param:
Address ISREDIT
select
when length(src) = 0        then do
zedsmsg = "Parametre absent"
zedlmsg = "Il me faut un nom de membre source"
address ispexec "setmsg msg(isrz001)"
exit 4
end
when datatype(src) = 'NUM'  then do
zedsmsg = "Parametre incorrect"
zedlmsg = "Il me faut un nom de membre source"
address ispexec "setmsg msg(isrz001)"
exit 4
end
when datatype(src) = 'CHAR' then nop
otherwise exit
end
call affiche pds                         X     X        X
call affiche pds                         X     "NDV"    X
call affiche "OTEST.IFUS120.JCL"         PERSO JCL      X
call affiche "OTEST.IFUS120.JCLU"        PERSO JCL      X
/call affiche "OTEST.IFUS120.JCLRES"      PERSO JCL      X
call affiche "OTEST.IFUS120.JCLREF"      PERSO JCL      X/
call affiche "OTEST.IFUS120.PROC"        PERSO PROC     X
call affiche "OTEST.IFUS120.REXX"        PERSO Rexx     X
call affiche "OTEST.IFUS120.SKEL"        PERSO X        X
call affiche "OTEST.IFUS120.DCLGEN"      PERSO DCLGEN   X
call affiche "OTEST.IFUS120.SQL"         PERSO SQL      X
call affiche "OTEST.IFUS120.SRC"         PERSO "SOURCE" X
call affiche "OTEST.IFUS120.SOURCE"      PERSO "SOURCE" X
call affiche "OTEST.IFUS120.SOURCEX"     PERSO SOURCEX  X
call affiche "OTEST.IFUS120.COPY.IN"     PERSO COPY     X
call affiche "OTEST.IFUS120.COPY.OUT"    PERSO COPY     X
call affiche "OTEST.NDV.STC.BATCH.LOAD"  OTEST X        Batch
call affiche "OTEST.NDV.STC.CICS.LOAD"   OTEST X        TP
call affiche "OTEST.NDV.STC.COBBT.BASE"  OTEST COBOL    Batch
call affiche "OTEST.NDV.STC.COBCO.BASE"  OTEST COBOL    X
call affiche "OTEST.NDV.STC.COBTP.BASE"  OTEST COBOL    TP
call affiche "OTEST.NDV.STC.COPY.BASE"   OTEST COPY     X
call affiche "OTEST.NDV.STC.DCLGEN.BASE" OTEST DCLGEN   X
call affiche "OTEST.NDV.STC.DDL.BASE"    OTEST X        X
call affiche "OTEST.STC.SPEC.JCL"        OTEST JCLX     Batch
call affiche "OTEST.NDV.STC.JCL.BASE"    OTEST JCL      Batch
call affiche "OQUAL.NDV.STC.BATCH.LOAD"  OQUAL X        Batch
call affiche "OQUAL.NDV.STC.CICS.LOAD"   OQUAL X        TP
call affiche "OQUAL.NDV.STC.COBBT.BASE"  OQUAL COBOL    Batch
call affiche "OQUAL.NDV.STC.COBCO.BASE"  OQUAL COBOL    X
call affiche "OQUAL.NDV.STC.COBTP.BASE"  OQUAL COBOL    TP
call affiche "OQUAL.NDV.STC.COPY.BASE"   OQUAL COPY     X
call affiche "OQUAL.NDV.STC.DCLGEN.BASE" OQUAL DCLGEN   X
call affiche "OQUAL.NDV.STC.DDL.BASE"    OQUAL X        X
call affiche "OQUAL.STC.SPEC.JCL"        OQUAL JCLX     Batch
call affiche "OQUAL.NDV.STC.JCL.BASE"    OQUAL JCL      Batch
call affiche "UINTE.NDV.STC.BATCH.LOAD"  UINTE X        Batch
call affiche "UINTE.NDV.STC.CICS.LOAD"   UINTE X        TP
call affiche "UINTE.NDV.STC.COBBT.BASE"  UINTE COBOL    Batch
call affiche "UINTE.NDV.STC.COBCO.BASE"  UINTE COBOL    X
call affiche "UINTE.NDV.STC.COBTP.BASE"  UINTE COBOL    TP
call affiche "UINTE.NDV.STC.COPY.BASE"   UINTE COPY     X
call affiche "UINTE.NDV.STC.DCLGEN.BASE" UINTE DCLGEN   X
call affiche "UINTE.NDV.STC.DDL.BASE"    UINTE X        X
call affiche "UINTE.NDV.STC.JCL.BASE"    UINTE JCL      Batch
call affiche "ULIVR.NDV.STC.BATCH.LOAD"  ULIVR X        Batch
call affiche "ULIVR.NDV.STC.CICS.LOAD"   ULIVR X        TP
call affiche "ULIVR.NDV.STC.COBBT.BASE"  ULIVR COBOL    Batch
call affiche "ULIVR.NDV.STC.COBCO.BASE"  ULIVR COBOL    X
call affiche "ULIVR.NDV.STC.COBTP.BASE"  ULIVR COBOL    TP
call affiche "ULIVR.NDV.STC.COPY.BASE"   ULIVR COPY     X
call affiche "ULIVR.NDV.STC.DCLGEN.BASE" ULIVR DCLGEN   X
call affiche "ULIVR.NDV.STC.DDL.BASE"    ULIVR X        X
call affiche "ULIVR.NDV.STC.JCL.BASE"    ULIVR JCL      Batch
call affiche "OMAIN.NDV.STC.BATCH.LOAD"  OMAIN X        Batch
call affiche "OMAIN.NDV.STC.CICS.LOAD"   OMAIN X        TP
call affiche "OMAIN.NDV.STC.COBBT.BASE"  OMAIN COBOL    Batch
call affiche "OMAIN.NDV.STC.COBCO.BASE"  OMAIN COBOL    X
call affiche "OMAIN.NDV.STC.COBTP.BASE"  OMAIN COBOL    TP
call affiche "OMAIN.NDV.STC.COPY.BASE"   OMAIN COPY     X
call affiche "OMAIN.NDV.STC.DCLGEN.BASE" OMAIN DCLGEN   X
call affiche "OMAIN.NDV.STC.DDL.BASE"    OMAIN X        X
call affiche "OMAIN.NDV.STC.JCL.BASE"    OMAIN JCL      Batch
call affiche "PLEXP1.JCLLIB"             X     PROC     Batch
if pbrq <> "STC" then
call affiche env".NDV."brq"."lang".BASE"  env lang   X
return
affiche:
parse upper arg dsn penv plang pbtp
if env    /= "" & penv    /= "X" & env    /= penv    then return
if lang   /= "" & plang   /= "X" & lang   /= plang   then return
if btp    /= "" & pbtp    /= "X" & btp    /= pbtp    then return
if src = "-LISTE" then do
select
when env  /= "" & env  /= penv  then return
when lang /= "" & lang /= plang then return
when btp  /= "" & btp  /= pbtp  then return
when dsn   = "VIDE"             then return
otherwise nop
end
say dsn
return
end
if plang = "NDV" & lang = "NDV"
then call liste_NDV
else fichier = dsn"("src")"
if sysdsn(fichier) = 'OK' then do
call mesvar("-p glDSN "dsn)
address ISPEXEC edit" dataset('"fichier"')"
call mesvar("<")
exit 0
end
else do
if ^(plang = "NDV" & lang = "NDV") then return
zedsmsg = "Fichier non trouve"
zedlmsg = "Erreur "fichier" non trouve"
address ispexec "setmsg msg(isrz001)"
exit 4
end
return
liste_NDV:
call ndvsrc (src env brq)
liste = mesvar("-g glLstPrm")
parse value liste with nb"//"prg brq stag elmt typ"/"liste
fichier = stag".NDV."brq"."typ".BASE("elmt")"
return
variable_src:
if src = "*" ! src = "=" then do
src = mesvar(src)
if datatype(src) = 'NUM' then do
zedsmsg = "Erreur "src
zedlmsg = "Erreur "src" a l'appel du module 'variable'"
address ispexec "setmsg msg(isrz001)"
exit 4
end
end
else
call mesvar ("-p glChn" src)
return
fin:
address ISPEXEC
zedsmsg = src" non trouve"
zedlmsg = src lang env pbrq
address ispexec "setmsg msg(isrz001)"
return
aide:
say "Visualisation d'un membre apres l'avoir ",
"recherche dans le PDS qui va bien ..."
say
say "Usage : visu <membre> <environnement> <langage> <pds> <t         ype>"
say
say "   membre        -> nom du membre a visualiser"
say "   environnement -> vide / TEST / RECE / CINTE / EXPL"
say "   langage       -> vide / COBOL / APS / JCL / APSCOB",
" / COPY / DCLGEN / PARAM"
say "   pds           -> vide / PDS contenant le membre"
say "   type          -> vide / Batch / TP"
say "  * valeur par defaut"
exit
