I have coded user exit CAOCUPRT to direct a dump to a specific based on the PRTUSRID. When I run a job, I'm using $Z91DEMO, message CAPC077E is issued:
CAPC077E ERROR ADDING FILE TO THE CAIPRINT REPOSITORY.
CAPC077E Invalid request
If I update CAOCUPRT to load a '4' into R15, the job works correctly. So I know the repository is valid.
I don't know what the 2nd message "Invalid request" means.
I cannot be positive as there is no dump but think I see the problem. I think you have cleared the PRTDSN field to spaces, not reset it to a valid dataset name…Then asked us to use the value you passed in PRTDSN.
This would cause a dynamic allocation failure for which the ‘Invalid request’ we returned would make sense.
This program is LINKed to and runs in Key 8 so debugging it should not be particularly difficult. I suggest some WTOs placed at strategic locations so you can trace your way through the code.
If you are trying to block other users from using the PRTLIB you could pass a dataset name such as ‘YOU.ARE.NOT.ALLOWED.TO.USE.THE.PRTLIB’. A ‘file not found’ type error would occur when we try to dynamically allocate it but the user should be able to figure out what happened.