Here is the JES2 Exit 50 we used.
If the ID is CA7ONL class U was forced.
Thanks
HASX50A TITLE 'USER EXIT 50 MODULE -- PROLOG (MODULE COMMENT BLOCK)' 00010000
*********************************************************************** 00140000
* * 00150000
* MODULE NAME = HASX50A (HASX50A load module) * 00160000
* * 00170000
* DESCRIPTIVE NAME = JOB STATEMENT SCAN * 00180000
* * 00190000
* STATUS = OS/VS2 - SEE $MODULE EXPANSION BELOW FOR FMID, VERSION * 00200000
* * 00210000
* FUNCTION = * 00220000
* * 00230000
* * 00230000
* * 00230000
* * 00230000
* * 00260000
* * 00420000
* REGISTER CONVENTIONS = SEE ENTRY POINT DOCUMENTATION * 00430000
* * 00440000
* PATCH LABEL = NONE * 00450000
* * 00460000
* MODULE TYPE = Procedure ( CSECT type ) * 00470000
* * 00480000
* PROCESSOR = IBM High Level Assembler/MVS 1.5.0 @Z07LASM 00490000
* * 00500000
* MODULE SIZE = SEE $MODEND MACRO EXPANSION AT END OF ASSEMBLY * 00510000
* * 00520000
* ATTRIBUTES = JES2 REENTRANT, RMODE ANY, AMODE 31 * 00530000
* Supervisor state, protect key of JES2's (1) * 00540000
* * 00550000
* ENTRY POINT = EXIT50A * 00560000
* * 00570000
* PURPOSE = SEE FUNCTION * 00580000
* * 00590000
* LINKAGE = STANDARD MVS LINKAGE * 00600000
* * 00610000
* EXIT-NORMAL = RETURN TO CALLER (HASPRDR) * 00620000
* * 00630000
* EXIT-ERROR = NONE * 00640000
* * 00650000
* EXTERNAL REFERENCES = SEE BELOW * 00660000
* * 00670000
* ROUTINES = MISCELLANEOUS JES2 SERVICE ROUTINES * 00680000
* * 00690000
* DATA AREAS = SEE $MODULE MACRO EXPANSION * 00700000
* * 00710000
* CONTROL BLOCKS = SEE $MODULE MACRO EXPANSION * 00720000
* * 00730000
* TABLES = SEE $MODULE MACRO DEFINITION (BELOW) * 00740000
* * 00750000
* MACROS = JES2 - $DOGBERT, $ENTRY, $JCTXGET, $MODEND, $MODULE, * 00760000
* $RETURN * 00770000
* * 00780000
* MACROS = MVS - none * 00790000
* * 00800000
* CHANGE ACTIVITY: * 00810000
* * 00820000
* $Z07LASM=NJETCP HJE7720 050203 CLW: HLASM 5.0 support * 00830000
* * 00840000
* A000000-999999 CREATED FOR JES2 z/OS 1.7 @Z07LTCP 00850000
*********************************************************************** 00860000
TITLE 'USER EXIT 50 MODULE -- PROLOG ($HASPGBL)' 00870000
COPY $HASPGBL COPY HASP GLOBALS 00880000
TITLE 'USER EXIT 50 MODULE -- PROLOG ($MODULE)' 00890000
************************************************************** 00900000
* Note that the environment for this module is * 00910000
* (USER,ANY). All routines compiled in this * 00920000
* environment require R11 to be the HCCT address, * 00930000
* and will use main task $SAVE/$RETURN services * 00940000
* when invoked from the main task, and special * 00950000
* USER environment $SAVE/RETURN services in other * 00960000
* run-time environments. * 00970000
* * 00980000
* This allows (with special code in $EXIT 20) the * 00990000
* same routine to be shared by both $EXIT 20 and * 01000000
* $EXIT 50. Note that while many services require * 01010000
* different linkage and parameters in different * 01020000
* run-time environments, this exit uses none of * 01030000
* those services. See HASX55A for an example of * 01040000
* how to implement environment-dependent services * 01050000
* from this type of exit. * 01060000
************************************************************** 01070000
EJECT , 01080000
HASX50A $MODULE ENVIRON=(USER,ANY), C01090000
RMODE=ANY, C01100000
IBMJES2=SAMPLE, C01110000
TITLE='USER EXIT 50 MODULE', C01120000
$BERT, Generate HASP BERT DSECT C01130000
$BERTTAB, Generate HASP BERTTAB DSECT C01140000
$BUFFER, GENERATE HASP BUFFER DSECT C01150000
$CADDR, GENERATE HASP CADDR DSECT C01160000
$CATBERT, Generate HASP CATBERT DSECT C01170000
$HASPEQU, GENERATE HASP EQU DSECT C01180000
$HCCT, Generate HASP HCCT DSECT C01190000
$HCT, GENERATE HASP HCT DSECT C01200000
$JCT, GENERATE HASP JCT DSECT C01210000
$JCTX, Generate HASP JCTX DSECT C01220000
$JQE, Generate HASP JQE DSECT C01230000
$MIT, GENERATE HASP MIT DSECT C01240000
$MITETBL, Generate HASP MTE dsect C01250000
$PADDR, GENERATE HASP PADDR DSECT C01260000
$PARMLST, GENERATE HASP PADDR DSECT C01270000
$PCE, GENERATE HASP PCE DSECT C01280000
$PSV, GENERATE HASP PSV DSECT C01290000
$TRE, Generate HASP TRE DSECT C01300000
$USERCBS, GENERATE HASP USERCBDS DSECT C01310000
$XECB, GENERATE HASP XECB DSECT C01320000
$XIT, Generate HASP XIT DSECT C01330000
$XPL Generate HASP XPL DSECT 01340000
TITLE 'USER EXIT 50 MODULE -- JOB STATEMENT SCAN' 01350000
*********************************************************************** 01360000
* * 01370000
* EXIT50 - INSTALLATION EXIT 50 ROUTINE * 01380000
* * 01390000
* FUNCTION: * 01400000
* * 01410000
* * 01420000
* * 01450000
* LINKAGE: * 01460000
* * 01470000
* * 01490000
* ENVIRONMENT: * 01500000
* * 01510000
* JES2 maintask or user environment * 01520000
* * 01530000
* RECOVERY: * 01540000
* * 01550000
* None * 01560000
* * 01570000
* REGISTER USAGE: * 01580000
* * 01590000
* INPUT R0 = 0 - X050GJOB - Normal Job * 01600000
* 4 - X050JECL - JECL error * 01610000
* 8 - X050BSAF - SAF failure * 01620000
* 12 - X050WSEL - Work selection mismatch * 01630000
* * 01640000
* R1 = Address of $XPL * 01650000
* * 01660000
* R2-R9 = n/a * 01670000
* R10 = address of JCT * 01680000
* R11 = address of HCCT * 01690000
* R12 = n/a * 01700000
* R13 = address of save area * 01710000
* R14 = return address * 01720000
* R15 = Address of entry point * 01730000
* * 01740000
* OUTPUT R15 = Return code * 01750000
* (All others unchanged) * 01760000
* * 01770000
* * 01780000
* REGISTER USAGE (INTERNAL): R0-R9 = Work registers * 01790000
* R10 = Address of the JCT * 01800000
* R11 = Address of the HCCT * 01810000
* R12 = Local addressability * 01820000
* R13 = Address of save area * 01830000
* R14-R15 = Work and linkage registers * 01840000
* * 01850000
* RETURN CODES (R15 ON EXIT): * 01860000
* * 01870000
* 0 - Tells JES2 that if there are any other routines * 01880000
* associated with this exit, call the next exit. * 01890000
* If there are no other routines, continue with * 01900000
* normal HASPRDR processing. * 01910000
* * 01920000
* 4 - Tells JES2 to ignore any additional exits associated * 01930000
* with this exit and continue with normal HASPRDR * 01940000
* processing. * 01950000
* * 01960000
* 8 - Tells JES2 to cancel the job; any output (the JCL * 01970000
* image listing) is produced. * 01980000
* * 01990000
* 12 - Tells JES2 to purge job; no output is produced. * 02000000
* * 02010000
* * 02020000
* OPERATION: * 02030000
* * 02040000
* The following commands should be issued during * 02050000
* initialization to load and enable this exit and to * 02060000
* define the exit entry points. * 02070000
* * 02080000
* LOADMOD(HASX50A) STORAGE=CSA * 02150000
* EXIT(50) ROUTINES=(EXIT50A),STATUS=ENABLED * 02160000
* * 02250000
*********************************************************************** 02260000
EJECT 02270000
*********************************************************************** 02280000
* * 02290000
* THIS EXIT50 ROUTINE WILL BE ENTERED FOR FOR JOBS FROM THE * 02300000
* FOLLOWING SOURCES: * 02310000
* * 02320000
* - TSO LOGONS * 02330000
* - STARTED TASKS * 02340000
* - INTERNAL READERS ALLOCATED TO BATCH JOBS * 02350000
* - INTERNAL READERS ALLOCATED TO STARTED TASKS * 02360000
* - INTERNAL READERS ALLOCATED TO TSO USER (TSO SUBMIT) * 02370000
* - NJE JOB RECEIVERS (TCP/IP) * 02380000
* * 02390000
* IN ADDITION, THIS ROUTINE WILL BE CALLED FROM HASX20A IN * 02400000
* THE JES2 MAIN TASK FOR JOBS FROM THE FOLLOWING SOURCES * 02410000
* (VIA ITS INVOCATION OF $EXIT 50 IN THE CORRECT ENVIRONMENT): * 02420000
* * 02430000
* - LOCAL CARD READER * 02440000
* - REMOTE (RJE) CARD READER * 02450000
* - NJE JOB RECEIVERS (SNA AND BSC) * 02460000
* - SPOOL OFFLOAD JOB RECEIVERS * 02470000
* - EXECUTION BATCH MONITOR (XBM) JOBLET * 02480000
* * 02490000
*********************************************************************** 02500000
SPACE 1 02510000
* USING JQA,R6 JQE addressability 02520000
USING XPL,R8 XPL addressability 02530000
USING JCT,R10 JCT addressability 02540000
SPACE 1 02550000
EXIT50A $ENTRY BASE=R12,SAVE=YES PROVIDE EXIT ROUTINE ENTRY POINT 02560000
LR R8,R1 Copy XPL address 02570000
ICM R10,B'1111',X050JCT Get JCT address 02580000
JZ EXIT50RT Just return if none 02590000
* ICM R6,B'1111',X050JQE Get JQA address 02600000
* JZ EXIT50RT Just return if none 02610000
*------------------------------------------------------------* 02620000
* Note that both $EXIT 20 and $EXIT 50 are passed * 02630000
* a JQA that can be updated in the exit, therefore * 02640000
* no $DOGJQE call is necessary in the main task. * 02650000
*------------------------------------------------------------* 02660000
EJECT 02670000
************************************************************** 02680000
* * 02690000
* * 02700000
* * 02720000
************************************************************** 02730000
SPACE 1 02740000
CLC JCTJUSID,CA7USER Is this the CA-7 userid?
JNE EXIT50RT No, just return
MVI JCTMCLAS,C'U' Yes, force MSGCLASS=U
SPACE 1
************************************************************** 03370000
* * 03380000
* Return * 03390000
* * 03400000
************************************************************** 03410000
SPACE 1 03420000
EXIT50RT $RETURN , Return to JES2 03430000
SPACE 1 03440000
DROP R12,R10,R8 03450000
SPACE 1 03460000
CA7USER DC CL8'CA7ONL ' CA-7 UseridCA-7 userid?
SPACE 1
LTORG PLACE LITERALS HERE 03470000
EJECT , 03480000
TITLE 'USER EXIT 50 MODULE -- EPILOG ($MODEND)' 99990000
$MODEND 99991000
APARNUM DC CL8'NONE' APAR NUMBER 99999997
PTFNUM DC CL8'NONE' PTF NUMBER 99999998
END , END OF HASX50A 99999999
Thanks
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Peter
Sent: Friday, March 16, 2018 12:40 PM
To: [email protected]
Subject: EXIT to control use of Class
Hi
Is there an EXIT which can assign CLASS to the users based on RACF ID ? For
example even if a user tries to use CLASS C the user Job must run only using
CLASS A.
This is for our training LPAR and I would like to implement this feature.
We are at zOS1.13
Regards
Peter
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN
*** Disclaimer ***
This communication (including all attachments) is solely for the use of the
person to whom it is addressed and is a confidential AAA communication. If you
are not the intended recipient, any use, distribution, printing, or copying is
prohibited. If you received this email in error, please immediately delete it
and notify the sender.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN