- You can cut and past the REXX below in one of your SYSPROC concatenation in one of your TSO logon procedure.
*** Top Of Data ****
/* REXX */
trace(0)
parse upper arg MyProf1 MyProf2
if length(MyProf1) = 0
then do
say "Source profile is missing!"
exit
end
if length(MyProf2) = 0
then do
say "Target profile is missing!"
exit
end
if MSG() = 'ON' then DUMMY = MSG('OFF')
DUMMY = outtrap(Ligne.,99999)
"TSS LIS(" || MyProf1 || ") DATA(ACIDS)"
DUMMY = OUTTRAP('OFF')
if Ligne.0 = 0
then do
say "File is empty"
exit
end
do I = 1 by 1 until I = ligne.0
if words(Ligne.I) = 0
then iterate
MyAcid = word(Ligne.I,1)
if MyAcid = "ACCESSORID"
then iterate
if MyAcid = "TSS0300I"
then leave
if MyAcid = "ACIDS"
then J = 3
else J = 1
Kmax = words(Ligne.I)
do K = J by 1 until K = Kmax
MyAcid = word(Ligne.I,K)
select
when MyAcid = "-DC" then iterate
when MyAcid = "-VC" then iterate
when MyAcid = "-LC" then iterate
when MyAcid = "-ZC" then iterate
when MyAcid = "-SC" then iterate
otherwise nop
end /* end select */
"TSS REM(" || MyAcid || ") PROFILE(" || MyProf1 || ")"
"TSS ADD(" || MyAcid || ") PROFILE(" || MyProf2 || ")"
end /* end do K */
end /* end do I */
exit
*** End Of Data ***
Then to execute the REXX go to TSO command, usually TSO option 6 from primaty panel and enter:
YourREXX PROF1 PROF2
YourREXX is the name of a member containing the above REXX in your SYSPROC concatenation.
PROF1 is the name of the source profile which the acids are removed from.
PROF2 is the name of the target profile which the acids are added to.