Call IRRSGS00 from REXX



IBM's Command List programming language & Restructured Extended Executor

Call IRRSGS00 from REXX

Postby Dominik » Tue Oct 01, 2013 9:09 pm

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
Dominik
 
Posts: 2
Joined: Tue Oct 01, 2013 9:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Call IRRSGS00 from REXX

Postby enrico-sorichetti » Tue Oct 01, 2013 9:48 pm

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**)
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Call IRRSGS00 from REXX

Postby prino » Tue Oct 01, 2013 9:50 pm

work_area = copies(' ', 1024)
work_area = copies(c2x(00), 1024)

address attchpgm "iggcsi00 work_area"
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: Call IRRSGS00 from REXX

Postby Dominik » Wed Oct 02, 2013 11:41 am

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
Dominik
 
Posts: 2
Joined: Tue Oct 01, 2013 9:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Call IRRSGS00 from REXX

Postby Shady » Thu Nov 07, 2013 10:30 pm

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
Shady
 
Posts: 9
Joined: Sat Mar 13, 2010 11:55 am
Has thanked: 1 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post