Hundreds of ACIDs in Profile one need to be moved or added to Profile two. Is there a way to connect ACIDs from one profile to another one with one command?
The REXX below can be put in the SYSPROC concatenation in one of the TSO logon procedures.
*** Top Of Data ****
/* REXX */
parse upper arg MyProf1 MyProf2
if length(MyProf1) = 0
say "Source profile is missing!"
if length(MyProf2) = 0
say "Target profile is missing!"
if MSG() = 'ON' then DUMMY = MSG('OFF')
DUMMY = outtrap(Ligne.,99999)
"TSS LIS(" || MyProf1 || ") DATA(ACIDS)"
DUMMY = OUTTRAP('OFF')
if Ligne.0 = 0
say "File is empty"
do I = 1 by 1 until I = ligne.0
if words(Ligne.I) = 0
MyAcid = word(Ligne.I,1)
if MyAcid = "ACCESSORID"
if MyAcid = "TSS0300I"
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)
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
end /* end select */
"TSS REM(" || MyAcid || ") PROFILE(" || MyProf1 || ")"
"TSS ADD(" || MyAcid || ") PROFILE(" || MyProf2 || ")"
end /* end do K */
end /* end do I */
*** End Of Data ***
To execute the REXX, go to TSO command, usually TSO option 6 from primary 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.
- The administrator running the REXX must have authorities and scope over the two profiles.
- The REXX is given as an example. It runs entirely under the user responsibility and it is not supported by Broadcom Support.