Don't waste time coding CL programs to disable and re-enable profiles. Instead, use commands that the fine folks at IBM have made just for that purpose!
Written by Steven C. Pitcher
We've all had user profiles we wanted under our thumbs a little tighter.
Let's say you have a couple of temporary work-term students who will be at your company for the next six months. What happens? Chances are you are verbally notified by their manager the day they arrive with the expectation of a laptop, email account, and IBM i access. Then you set them up like any other user, along with instructions on how to operate the old-school coffee machine, of course. Six months go by, and you've forgotten all about those kids who've now gone back to school. Perhaps someone in HR will let you know they're gone and give you a formal request to disable their profiles, but I think that's more the exception than the rule in most shops.