I guess, you have list of ID's who has authority to edit that particular dataset. And in you rexx code, you have to get logged user-id and compare with your existing list and proceed with edit dataset..
If I guessed correctly, you need
built-in-function, which will give current logged in user id.
But as mentioned earlier by others, these edit authority should be in the hand of security admin.