Are there any CA ACF2 provided examples on how to code a program to see if a logonid has access to a dataset or resource protected by CA ACF2?
CA ACF2 provides sample program source VALDGEN1 in the CA ACF2 provided CAX1MAC0 library.
This program was previously known as NOTE 13. It is not documented in the CA ACF2 documentation.
This is a user-callable routine that lets a MUSASS or an APF-authorized caller (such as JES2) validate
the access of a user to a resource or a data set.
Details on calling the program can be found in the source in CAX1MAC0(VALDGEN1)
VALDGEN1 CSECT 00010000
* 00020000
* 00030000
* NOTE #13 00040000
* 00050000
* 00060000
* 00070000
* FUNCTION: 00080000
* 00090000
* 00100000
* THIS IS A USER CALLABLE ROUTINE TO ISSUE A 00110000
* RESOURCE OR DATASET VALIDATION CALL. 00120000
* IT IS CALLABLE FOR A MUSASS SITUATION WHERE 00130000
* LOGONID NAME IS AVAILABLE BUT NOT THE ACMCB, 00140000
* OR ANY ADDRESS SPACE REQUEST WHERE THE ACUCB 00150000
* HAS NOT YET BEEN BUILT AND THE CALLER IS 00160000
* AUTHORIZED. 00170000
* 00180000
* 00190000
* INPUT: 00200000
* 00210000
* 00220000
* R14 ==> RETURN ADDRESS 00230000
* R15 ==> ENTRY POINT OF THIS PROGRAM 00240000
* R1 ==> POINTER TO PARMLIST AS FOLLOWS: 00250000
* 00260000
* 00270000
* FOR RESOURCE CALLS: 00280000
* 00290000
* +0 POINTER TO 8 CHARACTER LOGONID 00300000
* +4 POINTER TO 3000 BYTE WORK AREA TA8802B 00310000
* +8 POINTER TO 8 CHAR CONSTANT 'RESOURCE' 00320000
* +12 POINTER TO 40 CHARACTER RESOURCE NAME 00330000
* +16 POINTER TO 1 CHARACTER RETURN FIELD 00340000
* +20 POINTER TO 3 CHARACTER RESOURCE TYPE 00350000
* +24 (OPTIONAL) POINTER TO 8 CHARACTER 00360000
* PASSWORD - USED FOR REVERIFY 00370000
* 00380000
* 00390000
* IF THE PASSWORD POINTER IS NOT PROVIDED, THE 00400000
* POINTER TO THE RESOURCE TYPE SHOULD HAVE ON THE 00410000
* HIGH ORDER BIT (X'80') OR THE PASSWORD POINTER 00420000
* SHOULD BE BINARY ZEROES. 00430000
* 00440000
* 00450000
* FOR DSN VALIDATION CALLS: 00460000
* 00470000
* +0 POINTER TO 8 CHARACTER LOGONID 00480000
* +4 POINTER TO 3000 BYTE WORK AREA TA8802B 00490000
* +8 POINTER TO 8 CHAR CONSTANT 'DATASET' 00500000
* +12 POINTER TO 44 CHARACTER DSN 00510000
* +16 POINTER TO 1 CHARACTER RETURN FIELD 00520000
* +20 POINTER TO 5 CHAR CONSTANT ACCESS TYPE: 00530000
* 'EXEC', 'READ', 'WRITE' 'ALLOC' 00540000
* +24 (OPTIONAL) POINTER TO 6 CHARACTER VOLSER 00550000
* +28 (OPTIONAL) POINTER TO 8 CHARACTER DDNAME 00560000
* 00570000
* 00580000
* 00590000
* 00600000
* OUTPUT: 00610000
* 00620000
* 00630000
* R0 AND R1 ==> UNPREDICTABLE 00640000
* R2 THROUGH R13 ==> UNCHANGED 00650000
* R14 ==> RETURN ADDRESS 00660000
* R15 ==> RETURN CODES AS FOLLOWS: 00670000
* 00680000
* 00690000
* 0 ==> ACCESS IS ALLOWED. 00700000
* A 'Y' WILL BE PLACED IN THE 00710000
* RETURN AREA. 00720000
* 4 ==> ACCESS IS DENIED. 00730000
* AN 'N' WILL BE PLACED IN THE 00740000
* RETURN AREA. 00750000
* 8 ==> FOR RESOURCE CALLS, 00760000
* ACCESS IS DENIED. 00770000
* PASSWORD VERIFICATION WAS 00780000
* REQUESTED AND NO PASSWORD 00790000
* WAS PROVIDED. A 'P' WILL BE 00800000
* PLACED IN THE RETURN AREA. 00810000
* 12 ==> ACF2 NOT ACTIVE. 00820000
* AN 'I' WILL BE PLACED IN THE 00830000
* RETURN AREA. 00840000
* 00850000
* 00860000
* THE LAST ACF2 MESSAGE, IF ANY, WILL BE IN THE 00870000
* FIRST 128 BYTES OF THE WORK AREA. 00880000
* 00890000
* 00900000
* IF A PASSWORD IS PASSED, IT WILL BE CLEARED BY 00910000
* THIS ROUTINE. 00920000