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