When you define the prototype of the function, tell it you are passing a struct, not a pointer to a struct. For example, in this IPCS verb exit I wrote, this is what main() looks like:
int main(struct abdpl adpl) { // R1 on entry points to the structure, not to a pointer to the struct.
,,,
}
------------------------------
Todd Burch
------------------------------
Original Message:
Sent: Sun January 28, 2024 10:54 AM
From: Colin Paice
Subject: calling a function using a structure for the parameters rather and in the parmlist
I am used to using a function like
IRRSFA64( workarea, // WORKAREA
&ALET1 , // ALET
&SAF_RC, // SAF RC
&ALET2, // ALET ....
RACF provides a structure ..
struct comy { /* Common SAF plist */
ptr64_t comy_worka_stor_a; /* Addr of 1024 byte work area */
ptr64_t comy_safrc_alet_a; /* Addr of ALET for SAF return code */
ptr64_t comy_safrc_stor_a; /* Addr of SAF return code */
ptr64_t comy_racrc_alet_a; /* Addr of ALET for RACF return code */
ptr64_t comy_racrc_stor_a; /* Addr of RACF return code */
ptr64_t comy_racsc_alet_a; /* Addr of ALET for RACF reason code */
....
of the same parameters. I have not been able to use this structure in the IRRS....() functions. Is it possible? The problem is the code get passed the address of the parms, instead of the parms - and so does not work.
I would like to initialise the structure then use it. I'm happy to use the "old" way if this not possible,
Colin
------------------------------
Colin Paice
------------------------------