**** START OF SPECIFICATIONS ***************************************** 00010000 * * 00020000 *01* MODULE NAME = APSUX07Z * 00030000 * * 00040000 * $MOD (APSUX07Z) COMP(APS) PROD(PSF) : VERSION 3.3.0 * 00050000 * * 00060000 *01* DESCRIPTIVE NAME = RESOURCE EXIT - SAMPLE 3 * 00070000 * * 00080000 *01* STATUS = VERSION 3, RELEASE 3, LEVEL 0 * 00090000 * * 00100000 *01* FUNCTION = * 00110000 * DEMONSTRATE POSSIBLE USES OF THE RESOURCE EXIT * 00120000 * - SET EXIT INVOLVEMENT BASED ON THE PRINTER * 00130000 * - AUTHORIZATION CHECK BASED ON PROGRAMMERS NAME * 00140000 * - TERMINATE THE JOB IF SENT TO CAPTIVE PRINTER * 00150000 * - TERMINATE THE JOB IF UNAUTHORIZED USE OF RESOURCE * 00160000 * * 00170000 *02* OPERATION = * 00180000 * * 00190000 * * 00200000 *01* NOTES = * 00210000 *02* DEPENDENCIES = NONE * 00220000 *02* RESTRICTIONS = NONE * 00230000 *02* REGISTER CONVENTIONS = * 00240000 * SEE REGISTER EQUATES * 00250000 * * 00260000 *01* MODULE TYPE = PROCEDURE * 00270000 *02* PROCESSOR = ASSEMBLER * 00280000 *02* ATTRIBUTES = REENTRANT * 00290000 * AMODE 31 * 00300000 * RMODE ANY * 00310000 * * 00320000 *01* ENTRY POINT = APSUX07 * 00330000 *02* LINKAGE = * 00340000 * R15 = ENTRY POINT ADDRESS * 00350000 * R13 = SAVE AREA ADDRESS * 00360000 * R1 = ADDRESS OF A 4 BYTE FIELD WHICH CONTAINS THE ADDRESS * 00370000 * OF APSGEXTP * 00380000 * * 00390000 *01* INPUT = * 00400000 * APSGEXTP - PSF INSTALLATION EXIT PARAMETER AREA * 00410000 * * 00420000 *01* OUTPUT = NONE * 00430000 * * 00440000 *01* EXIT NORMAL = RETURN TO CALLER * 00450000 * * 00460000 *01* EXIT ERROR = NONE * 00470000 * * 00480000 *01* EXTERNAL REFERENCES = * 00490000 *02* ROUTINES = NONE * 00500000 *02* DATA AREAS = * 00510000 * APSGEXTP - PSF INSTALLATION EXIT PARAMETER AREA * 00520000 * APSUECA - PSF EXIT COMMUNICATIONS AREA * 00530000 * APSURLST - PSF EXIT RESOURCE LIST AREA * 00540000 * IAZJSPA - JES SEPARATOR PAGE AREA * 00550000 *02* INCLUDES = NONE * 00560000 * * 00570000 *01* MACROS = NONE * 00580000 * * 00590000 *01* MESSAGES = NONE * 00600000 * * 00610000 * 01* CHANGE ACTIVITY = * 00620000 *$01=OY12583, HAF1203, 022988, BJ13SDJ: RESOURCE EXIT * 00630000 *$H3=LAPS0003,HAF1220, 040188, BJ13SDJ: RELEASE 2.1 * 00640000 *$02=OY14561, HAF1203, 061488, TUCGS: ADD MSG & RESOURCE EXIT * 00650000 * SAVE AREAS * 00660000 *$H5=LAPS0005,HPRF102, 033189, B53KEMC: REL 2.1.0 NEW FUNCT @H5A* 00670000 *$03=OY22492, HPRF102, 890421, B53KEMC: HOLD QUEUE OPTION @03A* 00680000 *$DU=LAPS0007,HPRF310,980604,BDKURLB: Version 3.1.0 @DUA* 00690000 *$DX=LAPS0008,HPRF320,991117,BUQ4RLB: Version 3.2.0 @DXA* 00700000 *$EV=LAPS0009,HPRF330,010530,BUQ4RLB: Version 3.3.0 @EVA* 00710000 * * 00720000 **** END OF SPECIFICATIONS ******************************************* 00730000 APSUX07 START 0 00740000 TITLE 'DSECT - GEXTP' 00750000 APSGEXTP LIST=YES 00760000 TITLE 'DSECT - UECA' 00770000 APSUECA LIST=YES 00780000 TITLE 'DSECT - RLST' 00790000 APSURLST LIST=YES 00800000 TITLE 'DSECT - JSPA' 00810000 IAZJSPA LIST=YES 00820000 TITLE 'APSUX07 - INSTALLATION EXIT 7 - RESOURCE EXIT' 00830000 APSUX07 CSECT 00840000 APSUX07 AMODE 31 @H5A 00850000 APSUX07 RMODE ANY @H5A 00860000 USING APSUX07,R15 00870000 B START 00880000 DC CL8' APSUX07' NAME OF THIS ROUTINE 00890000 DC CL8'&SYSDATE' DATE OF THIS ASSEMBLY 00900000 ********************************************************************** 00910000 * STANDARD ENTRY LINKAGE * 00920000 ********************************************************************** 00930000 START STM R14,R12,12(R13) SAVE CALLERS REGISTERS 00940000 LR R12,R15 SAVE BASE REGISTER 00950000 DROP R15 DROP OLD BASE 00960000 USING APSUX07,R12 SET NEW ADDRESSABILITY 00970000 ********************************************************************** 00980000 * GET BASING FOR CONTROL BLOCKS * 00990000 ********************************************************************** 01000000 USING APSGEXTP,GEXTPTR SET ADDRESSABILITY TO GEXTP 01010000 USING XTP7,XTP7PTR SET ADDRESSABILITY TO XTP7 01020000 USING APSUECA,ECAPTR SET ADDRESSABILITY TO APSUECA 01030000 USING APSURLST,RLSTPTR SET ADDRESSABILITY TO APSURLST 01040000 USING IAZJSPA,JSPAPTR SET ADDRESSABILITY TO IAZJSPA 01050000 L GEXTPTR,0(,R1) LOAD ADDRESS OF APSGEXTP 01060000 L XTP7PTR,XTPRECP LOAD ADDRESS OF XTP7 01070000 L ECAPTR,XTPECAP LOAD ADDRESS OF ASPUECA 01080000 L RLSTPTR,XTP7LSTP LOAD ADDRESS OF APSURLST 01090000 L JSPAPTR,XTPJSPAP LOAD ADDRESS OF IAZJSPA 01100000 LR R3,R13 SAVE CALLERS SAVEAREA ADDR @02C 01110000 ST R3,ECARSCSV+4 IN OUR BACKWARD CHAIN. @02C 01120000 LA R13,ECARSCSV SAVE OUR SAVEAREA ADDRESS @02C 01130000 ST R13,8(R3) IN CALLER'S FORWARD CHAIN. @02C 01140000 ********************************************************************** 01150000 * DETERMINE WHAT TYPE OF CALL IS BEING MADE TO THE EXIT * 01160000 ********************************************************************** 01170000 CALLTYPE EQU * 01180000 TM XTP7ETYP,INITCALL INITIALIZATION CALL? 01190000 BO INITRTN YES, GOTO INIT ROUTINE 01200000 TM XTP7ETYP,BDSCALL BEGINNING OF DATA SET CALL? 01210000 BO BDSRTN YES, GOTO BDS ROUTINE 01220000 TM XTP7ETYP,ACCCALL RESOURCE ACCESS CALL? 01230000 BO ACCRTN YES, GOTO ACCESS ROUTINE 01240000 TM XTP7ETYP,LDBCALL RESOURCE LOAD BEGIN CALL? 01250000 BO LDBRTN YES, GOTO LOAD BEGIN ROUTINE 01260000 TM XTP7ETYP,LDECALL RESOURCE LOAD END CALL? 01270000 BO LDERTN YES, GOTO LOAD END ROUTINE 01280000 B GETOUT NO MATCH FOUND - POSSIBLE ERROR 01290000 ********************************************************************** 01300000 * INITIALIZATION ROUTINE: * 01310000 * FUNCTION: * 01320000 * - REQUESTS CONTROL AT ACCESS TIME FOR FORMDEFS ON ALL * 01330000 * PRINTERS. * 01340000 * - REQUESTS CONTROL AT LOAD TIME FOR PAGE SEGMENTS ON ALL * 01350000 * PRINTERS. * 01360000 * - REQUESTS CONTROL AT THE BEGINNING OF EACH DATA SET ON THE * 01370000 * DWARF'S PRINTER ONLY. * 01380000 ********************************************************************** 01390000 INITRTN EQU * 01400000 MVI XTP7NLD,B'00001000' REQUEST CONTROL AT LOAD TIME 01410000 * FOR PAGE SEGMENTS (ALL PRINTERS) 01420000 MVI XTP7NACC,B'01000000' REQUEST CONTROL AT ACCESS TIME 01430000 * FOR FORMDEFS (ALL PRINTERS) 01440000 INITLBL2 CLC XTP7PNAM,DWARFPRT IS THIS THE DWARFS PRINTER? 01450000 BNE INITEXIT NO, OK TO LEAVE 01460000 MVI XTP7MISC,B'10000000' REQUEST CONTROL AT BEGINNING 01470000 * OF DATA SET(DWARF'S PRT ONLY) 01480000 INITEXIT EQU * 01490000 B GETOUT EXIT APSUX07 01500000 ********************************************************************** 01510000 * BEGINNING OF DATA SET ROUTINE: * 01520000 * FUNCTION: * 01530000 * THIS CODE CHECKS AN AUTHORIZATION LIST AND TERMINATES THE * 01540000 * JOB IF THE CORRECT STRING IS NOT IN THE LIST. * 01550000 * NOTES: * 01560000 * - THIS BDS ROUTINE IS ACTIVE ONLY FOR THE DWARF'S PRINTER, * 01570000 * SEE THE INIT ROUTINE. * 01580000 ********************************************************************** 01590000 BDSRTN EQU * 01600000 * USING DWARFS,R10 01610000 SLR R11,R11 ZERO REG 11 01620000 L R11,TOTDWARF LOAD WITH NUMBER AUTH USERS 01630000 LA R10,DWARFS LOAD ADDRESS OF THE AUTHORIZED 01640000 * USERS OF THE DWARF PRINTER. 01650000 BDSLOOP1 CLC JSPJPNAM,0(R10) IS THIS AN AUTHORIZED USER? 01660000 BE BDSEXIT YES, ALLOW THIS JOB TO RUN 01670000 AL R10,NEXTFLD NO, INCREMENT TO NEXT AUTH USER 01680000 BCT R11,BDSLOOP1 LOOP IF MORE AUTH USERS IN LIST 01690000 * THIS STRING DOES NOT MATCH ANY STRING IN THE AUTHORIZED LIST FOR 01700000 * THIS PRINTER. TERMINATE THE JOB (SEND IT TO THE HOLD QUEUE) AND 01710000 * ADD TEXT TO TERMINATE MESSAGE. @03C 01720000 OI XTP7RFLG,B'01000000' SET THE TERMINATE DATA SET FLAG 01730000 OI XTP7RFLG,B'00001000' DATA SET TO HOLD QUEUE @03A 01740000 LA R11,DWARFMSG LOAD ADDRESS OF MESSAGE TEXT 01750000 ST R11,XTP7MSGP PUT ADDRESS INTO MSG POINTER 01760000 MVC XTP7MSGL,DWRFMSGL MOVE LENGTH OF MESSAGE INSERT 01770000 BDSEXIT EQU * 01780000 B GETOUT EXIT APSUX07 01790000 ********************************************************************** 01800000 * ACCESS ROUTINE: * 01810000 * - PAGEDEFS (& FORMDEFS) NEVER HAVE MORE THAN 1 RLST ENTRY AT * 01820000 * ACCESS TIME. * 01830000 * - PAGE SEGMENTS, OVERLAYS AND FONTS) MAY HAVE MORE THAN ONE RLST * 01840000 * ENTRY IN THE CHAIN AT ACCESS TIME. * 01850000 * - IF RLSTMSGP OR RLSTMSGL ARE LEFT AT 0 WHEN A SUBSTITUTION MSG * 01860000 * IS REQUESTED, THE MESSAGE INSERT WILL NOT BE ADDED TO THE MSG. * 01870000 ********************************************************************** 01880000 ACCRTN EQU * 01890000 TM XTP7RTYP,FDEF IS THIS CALL FOR FORMDEFS? 01900000 BNO ACCEXIT NO, THIS WOULD BE AN ERROR 01910000 ********************************************************************** 01920000 * ACCESS ROUTINE FOR FORMDEFS: * 01930000 * FUNCTION: * 01940000 * - REPLACE (SUBSTITUTE FOR) THE JOB HEADER FORMDEF FOR THE * 01950000 * ENTIRE FSA SESSION. RESOURCES FOR AUXILIARY DATA SETS * 01960000 * ARE PROCESSED ONLY ONCE PER SESSION SO THE FORMDEF ACCESS * 01970000 * FLAG MAY BE TURNED OFF TO ELIMINATE UNNECESSARY CALLS. * 01980000 ********************************************************************** 01990000 ACCFDEF EQU * 02000000 TM XTP7DSTY,DSTYAUX IS THIS AUXILIARY PROCESSING? 02010000 BNO ACCEXIT NO, LEAVE APSUX07 02020000 TM XTP7DSAT,DSATPJHD IS THIS THE JOB HEADER? 02030000 BNO ACCEXIT NO, LEAVE APSUX07 02040000 MVC RLSTNAME,NEWFDEF YES, REPLACE WITH NEW FORMDEF 02050000 NI XTP7NACC,B'10111111' TURN OFF FORMDEF ACCESS FLAG 02060000 ACCEXIT EQU * 02070000 B GETOUT 02080000 ********************************************************************** 02090000 * LOAD BEGIN ROUTINE: * 02100000 ********************************************************************** 02110000 LDBRTN EQU * 02120000 TM XTP7RTYP,PSEG IS THIS CALL FOR PAGE SEGMENTS? 02130000 BNO LDBEXIT NO, THIS WOULD BE AN ERROR! 02140000 ********************************************************************** 02150000 * BEGIN LOAD PAGE SEGMENT ROUTINE * 02160000 * FUNCTION: * 02170000 * THIS CODE CHECKS THE PAGE SEGMENT ABOUT TO BE LOADED. * 02180000 * IF IT IS A SEGMENT THAT REQUIRES AUTHORIZATION TO BE USED, * 02190000 * THE USER MUST HAVE PUT AN AUTHORIZED STRING IN THE * 02200000 * PROGRAMMERS NAME FIELD OF HIS JOB CARD. IF THIS STRING * 02210000 * IS NOT FOUND IN THE AUTHORIZATION LIST, THE SEGMENT IS * 02220000 * NOT LOADED AND THE DATA SET IS TERMINATED. * 02230000 * NOTES: * 02240000 * - LOAD CALLS (BEGIN & END) ALWAYS HAVE ONE AND ONLY ONE RLST * 02250000 * ENTRY. * 02260000 * - THE INTEGRITY OF THIS AUTHORIZATION CHECK DEPENDS ON THE * 02270000 * SEGMENT BEING LOADED FOR EACH JOB THAT TRIES TO USE IT. * 02280000 * TO INSURE THIS, THE SEGMENT MUST ALWAYS BE DELETED FROM * 02290000 * THE PRINTER AT JOB BOUNDARIES. * 02300000 ********************************************************************** 02310000 LDBPSEG EQU * 02320000 CLC RLSTNAME,SIGNATUR IS THIS THE SECURITY SEGMENT? 02330000 BNE LDBEXIT NO, ALL USERS ALLOWED TO USE. 02340000 * ATTEMPTING TO LOAD A SECURED PAGE SEGMENT - THIS JOB MUST HAVE 02350000 * FILLED IN THE PROGRAMMERS NAME FIELD WITH THE CORRECT STRING. 02360000 PSAUTHCK EQU * PAGE SEGMENT AUTHORIZED CHECK 02370000 CLC JSPJPNAM,SECURITY IS THIS AN AUTHORIZED USER? 02380000 BE LDBEXIT YES, THIS IS AN AUTHORIZED USER 02390000 * ALLOW THIS JOB TO RUN 02400000 * THIS USER NOT AUTHORIZED TO USE THIS PAGE SEGMENT - TERMINATE THE JOB 02410000 OI XTP7RFLG,B'01000000' SET THE TERMINATE DATA SET FLAG 02420000 LA R11,PSEGMSG LOAD ADDRESS OF MESSAGE TEXT 02430000 ST R11,XTP7MSGP PUT ADDRESS INTO MSG POINTER 02440000 MVC XTP7MSGL,PSEGMSGL MOVE LENGTH OF MESSAGE INSERT 02450000 LDBEXIT EQU * 02460000 B GETOUT EXIT APSUX07 02470000 ********************************************************************** 02480000 * LOAD END ROUTINE: * 02490000 ********************************************************************** 02500000 LDERTN EQU * 02510000 * INSERT CODE HERE FOR RESOURCE LOAD END CALLS. 02520000 B GETOUT EXIT APSUX07 02530000 ********************************************************************** 02540000 * EXIT LINKAGE * 02550000 ********************************************************************** 02560000 GETOUT L R13,ECARSCSV+4 RESTORE CALLER'S SAVEAREA @02C 02570000 LM R14,R12,12(R13) RESTORE CALLER'S REGS 02580000 BR R14 02590000 ********************************************************************** 02600000 * EXIT 7 DATA AREAS * 02610000 ********************************************************************** 02620000 SAVEAREA DS 18F 02630000 DWARFMSG DC CL49'DATA SET HAS BEEN PLACED ON THE JES HOLD QUEUE.' 02640000 DWRFMSGL DC X'2F' LENGTH OF DWARF PRINTER MESSAGE 02650000 PSEGMSG DC CL45'UNAUTHORIZED ATTEMPT TO USE SECURED RESOURCE.' 02660000 PSEGMSGL DC X'2D' LENGTH OF SECURE SEGMENT MSG 02670000 DWARFPRT DC CL8'PRT80 ' 02680000 SIGNATUR DC CL8'S110IBMS' 02690000 NEWFDEF DC CL8'F1HA0Y ' 02700000 ZERO DC F'0' 02710000 TOTDWARF DC F'8' NUMBER OF DWARFS 02720000 NEXTFLD DC F'20' INCREMENT TO NEXT FIELD 02730000 ********************************************************************** 02740000 * AUTHORIZED USERS FOR THE DWARF'S PRINTER * 02750000 ********************************************************************** 02760000 DWARFS DC CL20'SNOW WHITE' NAME OF AUTHORIZED USER 02770000 DC CL20'GRUMPY' NAME OF AUTHORIZED USER 02780000 DC CL20'DOPEY' NAME OF AUTHORIZED USER 02790000 DC CL20'SLEEPY' NAME OF AUTHORIZED USER 02800000 DC CL20'DOC' NAME OF AUTHORIZED USER 02810000 DC CL20'SLEEZY' NAME OF AUTHORIZED USER 02820000 DC CL20'BASHFULL' NAME OF AUTHORIZED USER 02830000 DC CL20'HAPPY' NAME OF AUTHORIZED USER 02840000 LDWARFS EQU *-DWARFS 02850000 ********************************************************************** 02860000 * AUTHORIZED STRING FOR THE SECURITY PAGE SEGMENT * 02870000 ********************************************************************** 02880000 SECURITY DC CL20'OIXUC98' AUTHORIZED STRING 02890000 ********************************************************************** 02900000 * EQUATES TO VERIFY TYPE OF EXIT CALL, COMPARE WITH XTP7ETYP * 02910000 ********************************************************************** 02920000 INITCALL EQU B'10000000' RESOURCE EXIT INITIAL CALL 02930000 BDSCALL EQU B'01000000' BEGINNING OF DATA SET CALL 02940000 ACCCALL EQU B'00100000' RESOURCE ACCESS CALL 02950000 LDBCALL EQU B'00010000' RESOURCE LOAD BEGIN CALL 02960000 LDECALL EQU B'00001000' RESOURCE LOAD END CALL 02970000 DSECALL EQU B'00000100' RESOURCE DELETE AT DATA SET END 02980000 TRMCALL EQU B'00000010' TERMINATION OF FSA CALL 02990000 ********************************************************************** 03000000 * EQUATES TO VERIFY TYPE OF RESOURCE CALL, COMPARE WITH XTP7RTYP * 03010000 ********************************************************************** 03020000 PDEF EQU B'10000000' PAGEDEF 03030000 FDEF EQU B'01000000' FORMDEF 03040000 FONT EQU B'00100000' CODED FONT 03050000 OVLY EQU B'00010000' MEDIUM OVERLAY 03060000 PSEG EQU B'00001000' PAGE SEGMENT 03070000 ********************************************************************** 03080000 * EQUATES TO VERIFY THE DATA SET TYPE, COMPARE WITH XTP7DSTY * 03090000 ********************************************************************** 03100000 DSTYAUX EQU B'10000000' PROCESSING AUXILIARY RESOURCES 03110000 DSTYPDS EQU B'01000000' PROCESSING A PRINT DATA SET 03120000 ********************************************************************** 03130000 * EQUATES TO VERIFY THE DATA SET ATTRIBUTES, COMPARE WITH XTP7DSAT * 03140000 ********************************************************************** 03150000 DSATPDFT EQU B'10000000' PROCESSING SYSTEM DEFAULT 03160000 DSATPJHD EQU B'01000000' PROCESSING JOB HEADER 03170000 DSATPJTR EQU B'00100000' PROCESSING JOB TRAILER 03180000 DSATPDSH EQU B'00010000' PROCESSING DATA SET HEADER 03190000 DSATPMDS EQU B'00001000' PROCESSING MESSAGE DATA SET 03200000 DSATPLDS EQU B'00000100' PROCESSING LAST DATA SET IN JOB 03210000 ********************************************************************** 03220000 * REGISTER EQUATES * 03230000 ********************************************************************** 03240000 R0 EQU 0 03250000 R1 EQU 1 03260000 R2 EQU 2 03270000 R3 EQU 3 03280000 GEXTPTR EQU 4 03290000 XTP7PTR EQU 5 03300000 ECAPTR EQU 6 03310000 RLSTPTR EQU 7 03320000 JSPAPTR EQU 8 03330000 R9 EQU 9 03340000 R10 EQU 10 03350000 R11 EQU 11 03360000 R12 EQU 12 03370000 R13 EQU 13 03380000 R14 EQU 14 03390000 R15 EQU 15 03400000 END 03410000