==> CHGAUT OBJ(‘/home/mydir/*’) USER(*PUBLIC) DTAAUT(*RX) OBJAUT(*NONE)
This uses a generic OBJ() value to indicate that every object within the /home/mydir path will receive the new settings.
Also, note that authority to bojects within a directory might be irrelevant if the authority to the directory itself is removed. I.e., if you are excluded from a directory, you are implicitly excluded from everything inside of the directory. That can help simplify some settings.
Also, consider using a QShell script. Use the ‘ls’ utility to build a list of objects. Pipe that list through ‘sed’ to filter things out that you want excluded. Pipe results from sed into the ‘system’ utility to execute the CHGAUT command or into the ‘chgrp’, ‘chmod’, ‘chown’ or other utility.
Various possibilities depending on how many different users, how many directories, what authorities exist along the path, what OS/400 options you have installed, etc.