How To Connect Acids From A Profile To Another One In One Command?

Document ID : KB000009977
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

 

- Problem, we have hundreds of ACIDs in Profile one to be moved or added to Profile two.

- I can't do it one by one.

- How To Connect Acids From A Profile To Another One In One Command?

Environment:
z/OS
Instructions:

 

- 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.

Additional Information:

 

- The administartor running the REXX must have authorities over the two profiles.

- The REXX is given as an example, it runs entirely under the user responsibility and it is not supported by CA Support.