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 */
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 ***
To execute the REXX, go to TSO command, usually TSO option 6 from primary panel and enter:
YourREXX PROF1 PROF2
where:
'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.