All:

I am in the process of writing several RACF exits in C  and after some research 
have a question or two.

First one , do I have to establish the LE environment like this:


EXITSTUB CEEENTRY PPA=MAINPPA,                                         X
               AUTO=WORKSIZE,                                                   
       X
               MAIN=YES
         USING WORKAREA,R13
         L     R15,exitname
         BALR  R14,R15
         CEETERM RC=0
MAINPPA  CEEPPA
exitname  DC    V(module name of C)
WORKAREA DSECT
         ORG   *+CEEDSASZ
         DS    0D
WORKSIZE EQU   *-WORKAREA
         YREGS
         CEEDSA
         CEECAA
         CEEEDB



         END          EXITSTUB



RØ EQU Ø
R1 EQU 1 
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
R7 EQU 7
R8 EQU 8
R9 EQU 9
R1Ø EQU 1Ø
R11 EQU 11
R12 EQU 12
R13 EQU 13
R14 EQU 14
R15 EQU 15
*--------------------------------------------------------------------*
ENTREGS CSECT
ENTREGS AMODE 31
ENTREGS RMODE ANY
 ENTRY ENTREGS
 GBLB &CEESTART
&CEESTART SETB 1
 EDCPRLG BASEREG=R12,DSALEN=WORKLEN
 USING REGSWORK,R13
 L R2,Ø(,R1) Get register vector address
 L R3,4(,R13) Get savearea -1 address
 L R4,4(,R3) Get savearea -2 address
 L R5,4(,R4) Get savearea -3 address
 MVC Ø(52,R2),2Ø(R5) Copy RØ-R12 values
 ST R5,52(,R2) Save R13 value
 MVC 56(8,R2),12(R5) Copy R14-R15 values
 LA R15,Ø Set return code
 EDCEPIL
 LTORG ,
*--------------------------------------------------------------------*
REGSWORK EDCDSAD
WORKLEN EQU *-REGSWORK
 END




Heres part of the C Code from the 2004 RACF article. 


#pragma runopts(TRAP(OFF)) // Allows code to run supervisor state
#pragma linkage(ENTREGS, OS) // Define the ENTREGS external routine
#include <string.h>
#include <stdlib.h>
#include <__messag.h>
#include <fcntl.h>
#pragma pack(packed)
struct EVXPL {
 void *EVXLEN; /* Length address: */
 void *EVXCALLR; /* Caller address: */
 void *EVXFLAGS; /* Flag byte address: */
 void *EVXCMBUF; /* Command buffer address: */
 void *EVXACEE; /* ACEE address: */
 void *EVXWORK; /* Communication word address: */
 void *EVXCMDRC; /* Command return code address: */
 void *EVXABCD; /* Abend code address: */
 void *EVXSRCND; /* Command source node address: */
 void *EVXSRCUS; /* Command source user ID address: */
 void *EVXMSSG; /* Message text address: */
 };
/* Values for field "EVXCALLR" */
#define EVXADDGR ØxØ1 /* ADDGROUP */
#define EVXADDSD ØxØ2 /* ADDSD */
#define EVXADDUS ØxØ3 /* ADDUSER */
#define EVXALTDS ØxØ4 /* ALTDSD */
#define EVXALTGR ØxØ5 /* ALTGROUP */
#define EVXALTUS ØxØ6 /* ALTUSER */
#define EVXCONNE ØxØ7 /* CONNECT */
#define EVXDELDS ØxØ8 /* DELDSD */
#define EVXDELGR ØxØ9 /* DELGROUP */
#define EVXDELUS ØxØA /* DELUSER */
#define EVXLISTD ØxØB /* LISTDSD */
#define EVXLISTG ØxØC /* LISTGRP */
#define EVXLISTU ØxØD /* LISTUSER */
#define EVXPASSW ØxØE /* PASSWORD */
#define EVXPERMI ØxØF /* PERMIT */
#define EVXRALTE Øx1Ø /* RALTER */
#define EVXRDEFI Øx11 /* RDEFINE */
#define EVXRDELE Øx12 /* RDELETE */
#define EVXREMOV Øx13 /* REMOVE */
#define EVXRLIST Øx14 /* RLIST */
#define EVXSEARC Øx15 /* SEARCH */
#define EVXSETRO Øx16 /* SETROPTS */
/* Values for field "EVXFLAGS" */
#define EVXPRE Øx8Ø /* Pre-processing call */
#define EVXPOST Øx4Ø /* Post-processing call */
#define EVXOPER Øx2Ø /* Command issued as operator command */
#define EVXPARM Øx1Ø /* Command issued from RACF parmlib */
#define EVXAT ØxØ8 /* Command directed with AT or ONLYAT */
#define EVXACD ØxØ4 /* Command directed with automatic */
#define EVXRASP ØxØ2 /* Command execution in RACF subsystem */
#define EVXABND ØxØ1 /* Command abended during execution */



 I saw a posting from David Crayford that said you could call C without it ?

Can someone please clarify this for me ?  It would be much appreciated.




Regards,

Scott Ford

www.identityforge.com  -  www.idmworks.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to