Register Hereor login if you are already a member
Not sure why you would need to know the status of a user profile ...
The easiest way is to call a CL program from the RPG. Pass 2 parameters, ID and status (for return value). Create a simple CL to do the RTVUSRPRF and return the status value.
This will work as long as the profile you are rung the RPG program under has authority to the RTVUSRPRF command.