z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


List all users and groups

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

/* rexx */                       
call syscalls 'ON'               
address syscall                  
say "users:"                     
do forever                       
   "getpwent pw."                
   if retval=0 | retval=-1 then  
      leave                      
   say pw.pw_name                
end                              
say "groups:"                    
do forever                       
   "getgrent gr."                
   if retval=0 | retval=-1 then  
      leave                      
   say gr.gr_name                
end                              
return 0                  

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014