Page 1 of 1

REXX CODE TO CHANGE USERID

PostPosted: Tue Nov 27, 2018 2:23 pm
by NOONE
Hi all,
i want to know if there any way to change the user id from A to B within rexx code ?



Purpose(For EX):
I did write a rexx code to do some changes on pds and i want to create file in my library to act as a log every time someone run my rexx code it will save in that file (date,userid,time) but the problem the users does not have the authority to write in file located in my library.

Thank you for your time :)

Re: REXX CODE TO CHANGE USERID

PostPosted: Tue Nov 27, 2018 2:33 pm
by expat
Then obviously you cannot do what you want to do;

If you set up an area where they can write to, then they can edit the dataset and remove themselves from the log.

You could build a specific RACF ( or whatever ) profile with write access - if your security people allow this - for a dataset to be used as the log - but see above

Re: REXX CODE TO CHANGE USERID

PostPosted: Tue Nov 27, 2018 2:38 pm
by enrico-sorichetti
I did write a rexx code to do some changes on pds and i want to create file in my library to act as a log every time someone run my rexx code it will save in that file (date,userid,time) but the problem the users does not have the authority to write in file located in my library.


tracking other people work without the proper authorizations can be cause for lawful termination

Re: REXX CODE TO CHANGE USERID

PostPosted: Tue Nov 27, 2018 4:02 pm
by NOONE
tracking other people work without the proper authorizations can be cause for lawful termination



It should be done because if someone run the code on a critical data it will change it so we should know who did it.That's it i'm not trying to track anyone for personal reasons.

Thank you for your time :)

Re: REXX CODE TO CHANGE USERID

PostPosted: Tue Nov 27, 2018 4:52 pm
by expat
SMF records would record all open for output operations - type 15

Although opened for output does not guarantee that output occurred

Re: REXX CODE TO CHANGE USERID

PostPosted: Tue Nov 27, 2018 5:11 pm
by enrico-sorichetti
then things should not be done in "my library"

if data requires quality checking and auditing it should not be stored in a PDS

Re: REXX CODE TO CHANGE USERID

PostPosted: Fri Nov 30, 2018 10:43 am
by Pedro
1. re: 'someone run the code on a critical data it will change it so we should know who did it"
The critical data should be protected from unauthorized updates.

2. REXX allows you to easily do stuff that you can already do manually. Or someone can copy your rexx program and skip the logging section. Or change the user id from A to Z (so as to blame someone else).

3. I have vague memory that you have auditing settings in the RACF profile. For the critical resource, use the highest setting. (as I said... vague memory)

4. Updates should be done from a load module. I think you can protect its execution better than you can a rexx program.

Re: REXX CODE TO CHANGE USERID

PostPosted: Fri Dec 07, 2018 6:48 pm
by Blackthorn
You can indeed set audit setting on the RACF profile, with different levels for success or failure. So, something like -

altdsd 'dataset profile' audit(success(UPDATE),failures(READ))