How can an application that scans JCL make a call to ACF2 to check if a specified logonid exists?

Document ID : KB000026047
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:  

How can an application that scans JCL make a call to ACF2 to check if a specified logonid exists?

Answer:  

An application program can make a direct call to ACF2 or issue a RACROUTE VERIFY call to check if a logonid exists.

Method 1:

From the application program issue a SAF call using RACROUTE REQUEST=VERIFY ENVIR=CREATE PASSCK=NO
Refer to the z/OS Security Server RACROUTE Macro Reference for details on the RACROUTE VERIFY call.

Method 2:
From the application program make an ACF2 ACVALD call with ACVSFCN set to ACVSINFO for a request to return only the logonid record and UID (an "INFO" call).
Here is a sample of the assembler code from VALDGEN1 (Note 13), a user callable routine to issue a resource or dataset validation call.

         ...   .....
         ...   .....
*
         ACFINCVT R10,NONE=NOTINSYS    GET ACF2 CVT ADDRESS
*
         USING ACCVT,R10               ADDRESS ACF2 CVT
         EJECT ,
*--------------------------------------------------------------*
*        START BY DOING AN INFO CALL FOR THE LOGONID.          *
*--------------------------------------------------------------*
         MVI   ACVFCN,X'01'            LID FUNCTION MUST BE X'01'
         MVI   ACVSFCN,ACVSINFO        SET FOR INFO CALL
         LA    R0,MSGAREA              GET MESSAGE AREA
         ST    R0,ACVMSG               SAVE IN PARMLIST
         L     R1,PRMLID               GET ADDRESS OF LOGONID NAME
         MVC   ACVLID,0(R1)            COPY TO PARMLIST
         LA    R0,LIDREC               GET LID BUFFER ADDRESS
         ST    R0,ACVRECB              SAVE IN PARMLIST
         LA    R0,LIDLEN               LENGTH OF LID BUFFER
         ST    R0,ACVRECL              SAVE IN PARMLIST
         LA    R0,UIDAREA              GET 24 BYTE UID AREA
         ST    R0,ACVUIDB              SAVE IN PARMLIST
         LA    R0,24                   GET 24 BYTE UID LENGTH
         ST    R0,ACVUIDL              SAVE IN PARMLIST
*
         ACFSVC ACVALD,TYPE=A,CVT=HAVE
*
         LTR   R15,R15                 TEST FOR SUCCESSFUL COMPLETION
         BNZ   NOLID                   NO, RETURN TO CALLER
*
         ...   .....
         ...   .....

 

Additional Information: 

See the chapter on "Parameter Lists and Mapping Macros" in the CA ACF2 for z/OS System Programmer Guide for details on the ACVALD call, and the appendix on "CA-ACF2 Notes" for details on Note 13. The Note 13 sample program, VALDGEN1, can be found in the ACF2 CAIMAC library.