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 (DSN)"
"(LigCurs, ColCurs) = CURSOR"
if DSN = "DSN" then parse upper arg DSN
call initialisation
call lire_param
call restpref
exit
/----------------------------/
/ Initialisation des données /
/----------------------------/
initialisation:
fichier = ""
dsnpos = 0
call SavePref
return
/------------------------------------------/
/ Lecture et interprétation des paramètres /
/------------------------------------------/
lire_param:
fichier = àjcl$dd(DSN)
if datatype(fichier) = 'CHAR' then do
Address ISPEXEC
"edit dataset('"fichier"')"
end
return
/---------------------/
/ save prefix routine /
/---------------------/
savepref:
Address ISREDIT
sprefx = '' / save prefix /
uprefx = userid() / user prefix /
prefx = sysvar(syspref) / get prefix variable /
if prefx <> '' then do / if profile prefix /
sprefx = prefx / save it /
"profile noprefix" / work without prefix /
end
return / return to caller /
/------------------------/
/ restore prefix routine /
/------------------------/
restpref:
Address ISREDIT
prefx = sysvar(syspref) / get prefix variable /
if prefx = '' then do / if profile noprefix /
if sprefx <> '' then do / if saved /
prefx = sprefx / restore it /
"profile prefix("prefx")" / work with prefix /
end
end
return / return to caller /
end
return / return to caller /