Page 1 of 1

Call IRRSGS00 from REXX

PostPosted: Tue Oct 01, 2013 9:09 pm
by Dominik
Hi everybody,

i want to create RACF PassTickets from am REXX. For that i'm trying to call the IRRSGS00 with no success. Can anybody provide a example of calling a callable service from REXX?
How can i provide the 1024 byte WORK_AREA?

Best regards,
Dominik

Re: Call IRRSGS00 from REXX

PostPosted: Tue Oct 01, 2013 9:48 pm
by enrico-sorichetti
How would You call it from an assembler/HLL program ???
see if the technique used for IGGCSI00 works
the relevant samples are in SYS1.SAMPLIB(IGGCSI**)

Re: Call IRRSGS00 from REXX

PostPosted: Tue Oct 01, 2013 9:50 pm
by prino
work_area = copies(' ', 1024)
work_area = copies(c2x(00), 1024)

address attchpgm "iggcsi00 work_area"

Re: Call IRRSGS00 from REXX

PostPosted: Wed Oct 02, 2013 11:41 am
by Dominik
Hi,

thanks for your response. I've tried to call IRRSGS00 but allways get an error 0E0 Reason 29.

My coding:

/** REXX **/                                     
NUM_PARMS            = '0000000C'x               
WORK_AREA            = COPIES('00'x, 1024)       
ALET1                = '00000000'x               
SAF_RETURN_CODE      = '00000000'x               
ALET2                = '00000000'x               
RACF_RETURN_CODE     = '00000000'x               
ALET3                = '00000000'x               
RACF_REASON_CODE     = '00000000'x               
OPTION_WORD          = '00000000'x               
F_CODE               = '0003'x                   
F_PARM_COUNT         = '00000004'x               
P_1                  = '00000001'x               
P_2                  = '        '               
P_3                  = 'IBMUSER '               
P_4                  = 'TSOTEST '               

ADDRESS ATTCHPGM "IRRSGS00",                     
                              "NUM_PARMS",       
                              "WORK_AREA",       
                              "ALET1",           
                              "SAF_RETURN_CODE",
                              "ALET2",           
                              "RACF_RETURN_CODE",
                              "ALET3",           
                              "RACF_REASON_CODE",
                              "OPTION_WORD",     
                              "F_CODE",         
                              "F_PARM_COUNT",   
                              "P_1",             
                              "P_2",             
                              "P_3",             
                              "P_4"             


There is a documantation at http://pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.ichd100%2Fgensec.htm

Re: Call IRRSGS00 from REXX

PostPosted: Thu Nov 07, 2013 10:30 pm
by Shady
Dominik,

I did a lot of ASM coding with IRRSGS00 in the last time - we are doing some Kerberos stuff.

A S0E0 RSN29 is an invalid ALET. I think the reason is quite simple:
Regarding the RACF Callable Service Guide the input addresses of IRRSGS00 are 64bit addresses with the first word set to zero. The function specific parameters are 31bit adresses.

According to your sample you provide 31bit addresses to IRRSGS00. That causes a "displacement" of parameters so you get an invalid ALET. Try your code with 64bit addresses with the first word of the address set to zero.

You can verify that in an easy way:
With a GTF trace you see the parameters that are overgiven to IRRSGS00. The trace is very easy to read. Start a GTF with user record F44.
Bevore you get the informations you need to enable the RACF Callalbe trace:

[RACF CPF]SET TRACE(CALLABLE(TYPE(50)) JOBNAME(your jobname)) LIST

Turn off:
[RACF CPF]SET TRACE(NOCALLABLE NOJOBNAME) LIST


Hope that helps.


Regards