1

I want to do some user management on the mainframe using rexx.

I allready managed to create a user with the following

/*REXX*/
adduser username
exit

I figured out this works because the rexx interpreter passes on every command that is not a rexx command to tso by default and adduser is both a racf command and a tso command with is mapped to racf. With the address command it should be possible to issue commands directly to racf. but when i try

/*REXX*/
address racf search username
exit

i'm getting +++ RC(-3) +++ IBM's TSO/E Reference says "The -3 return code indicates that the host command environment could not locate the command you issued." Since "search" is a valid racf command i think racf is not registered as a command environment. Using sysvar(sysracf) in rexx i allready checked that racf is infact installed and running. Does anyone know how to set up racf as a command environment for rexx or check if it is? Thanks in advance

Jonas Kreusch
  • 316
  • 1
  • 15
  • Do you have authority to use RACF commands? Have you search-engined, for this like this: http://www-03.ibm.com/systems/z/os/zos/features/racf/downloads/? – Bill Woodger Jul 27 '15 at 15:38
  • 1
    If your organization is a SHARE member, there have been presentations on this topic. The proceedings would have a PDF of the slides, which may be helpful. – cschneid Jul 28 '15 at 11:36
  • I have the system attributes special, auditor and operator so i should have the authority to use RACF commands.@Bill I dont really know what to search-engine for. I'm working on a ADCD Installation, that was given to my university by IBM. It is an educational / experimental installation so there are no slides and there is no support staff – Jonas Kreusch Jul 28 '15 at 14:28
  • OK. Did you check the link I gave? Can you update your question (use the edit link underneath it) and include that information about ADCD and no supprt staff.I don't know which release of z/OS you are on, but this may also help: http://www-05.ibm.com/e-business/linkweb/publications/servlet/pbi.wss?CTY=US&FNC=SRX&PBL=SA22-7683-15, there will be one for each release (or so). – Bill Woodger Jul 29 '15 at 10:13

1 Answers1

2

So i found the very simple solution. I basicly got the syntax of the search command wrong. it has to be

/*REXX*/
search mask(username)
exit

The return code was -3 because the command was invalid. I'm sorry i did not realize that earlier and jumped to false conclusions. Thanks for your help everyone.

Jonas Kreusch
  • 316
  • 1
  • 15
  • Full syntax for this command can be found in [SEARCH (Search RACF database)](https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.icha400/search.htm) – Adam J Limbert Oct 19 '18 at 22:48