BTB TITLE 'DMSBTB (CMS) VM/370 - RELEASE 6' 00001000 SPACE 2 00002000 * 00003000 * MODULE NAME: 00004000 * 00005000 * DMSBTB - CMS BATCH BOOTSTRAP ROUTINE 00006000 * 00007000 * FUNCTION: 00008000 * 00009000 * TO LOAD THE BATCH PROCESSOR ROUTINE (DMSBTP) AND USER 00010000 * EXIT ROUTINES (IF THEY EXIST) INTO FREE STORAGE 00011000 * 00012000 * ATTRIBUTES: 00013000 * 00014000 * DISK RESIDENT IN NON-RELOCATABLE (CMS MODULE) FORM 00015000 * 00016000 * ENTRY POINTS: 00017000 * 00018000 * DMSBTB - SEE FUNCTION DESCRIPTION 00019000 * 00020000 * ENTRY CONDITIONS: 00021000 * 00022000 * GPR1 POINTS TO COMMAND LINE 00023000 * 00024000 * EXIT CONDITIONS: 00025000 * 00026000 * GPR15 = 0 - DMSBTP LOADED SUCCESSFULLY 00027000 * GPR15 = 40 - NO DMSBTP TEXT FOUND 00028000 * GPR15 = 88 - EITHER CMSBATCH COMMAND NOT ISSUED IN RESPONSE 00029000 * TO FIRST CMS READ (I.E.IMMEDIATELY AFTER IPL) 00030000 * OR TROUBLE LOADING DMSBTP 00031000 * 00032000 * CALLS TO OTHER ROUTINES: 00033000 * 00034000 * DMSSTT - VERIFY EXISTENCE OF DMSBTP TEXT 00035000 * DMSLDR - LOAD DMSBTP INTO FREE STORAGE 00036000 * 00037000 * EXTERNAL REFERENCES: 00038000 * 00039000 * DMSKEY - FOR CORRECT PROTECT KEY 00040000 * DMSERR - FOR CMS ERROR MESSAGES 00041000 * DMSFREE - FOR NUCLEUS FREE STORAGE 00042000 * REGEQU - FOR SYMBOLIC REGISTER NAMES 00043000 * NUCON - FOR NUCLEUS STORAGE AREA DSECT 00044000 * FVS - FOR STATE FST DSECT 00045000 * 00046000 * TABLES/WORKAREAS: 00047000 * 00048000 * NONE 00049000 * 00050000 * REGISTER USAGE: 00051000 * 00052000 * GPR8 - FVSECT 00053000 * GPR12 - DMSBTB ADDRESSABILITY 00054000 * 00055000 * NOTES: 00056000 * 00057000 * NONE 00058000 * 00059000 * OPERATION: 00060000 * 00061000 * DMSBTB FIRST INSURES THAT DMSINS (CMS 00062000 * INITIALIZATION) HAS SET ON THE BM FLAGS BATRUN AND BATLOAD 00063000 * IN THE CMS NUCLEUS CONSTANT AREA SHOWING THAT AN EXPLICIT 00064000 * BATCH IPL HAS BEEN ISSUED OR THAT THE CMSBATCH COMMAND HAS 00065000 * BEEN ISSUED IMMEDIATELY AFTER IPL. IF NOT, AN ERROR MESSAGE 00066000 * (DMSBTB101E) IS GENERATED AND THE BM CONSOLE RETURNS TO A 00067000 * NORMAL CMS INTERACTIVE ENVIRONMENT. 00068000 *  00069000 * STATE (DMSSTT) IS THEN CALLED TO CONFIRM THE 00070000 * EXISTENCE OF THE BM PROCESSOR FILE (DMSBTP TEXT). IF THE 00071000 * FILE DOES NOT EXIST AN ERROR MESSAGE (DMSBTB100E) IS ISSUED 00072000 * AND THE BM CONSOLE RETURNS TO CMS INTERACTIVE ENVIRONMENT. 00073000 *  00074000 * USING THE 'STATE' COPY OF THE FILE STATUS TABLE 00075000 * (FST) FOR DMSBTP, DMSBTB COMPUTES THE SIZE OF DMSBTP TEXT BY 00076000 * MULTIPLYING THE LOGICAL RECORD LENGTH BY THE NUMBER OF 00077000 * LOGICAL RECORDS (NO DS CONSTANTS). A FREE STORAGE REQUEST IS 00078000 * MADE FOR THE SIZE OF DMSBTP AND THE ADDRESS OF THE ROUTINE 00079000 * IS THEN STORED AT ABATPROC IN THE NUCON AREA OF THE CMS 00080000 * NUCLEUS. 00081000 * STATE'S ARE ALSO ISSUED FOR THE USER EXITS AND, IF 00082000 * THEY EXIST, THEIR SIZES ARE INCLUDED IN THE REQUEST. 00083000 *  00084000 * THIS FREE STORAGE ADDRESS IS TRANSLATED INTO 00085000 * PRINTABLE HEXADECIMAL FORMAT AND THE CMS LOAD COMMAND IS 00086000 * ISSUED TO LOAD DMSBTP TEXT FILE INTO THE RESERVED FREE 00087000 * STORAGE AREA. ALSO LOADED AT THIS TIME ARE THE USER EXIT 00088000 * ROUTINES, BATEXIT1 TEXT AND BATEXIT2 TEXT. IF THESE FILES DO 00089000 * NOT EXEIST, AN UNRESOLVED EXTERNAL REFERENCE ERROR CODE IS 00090000 * RETURNED BY THE LOADER BUT IT IS IGNORED BY DMSBTB SINCE 00091000 * THESE ROUTINES ARE INSTALLATION OPTIONS. IF AN ERROR (OTHER 00092000 * THAN UNRESOLVED NAMES) OCCURS, A MESSAGE (DMSBTB101E) IS 00093000 * ISSUED AND THE BM CONSOLE RETURNS TO THE CMS INTERACTIVE 00094000 * ENVIRONMENT. 00095000 *  00096000 * THE LOADER TABLES ARE THEN SEARCHED FOR THE 00097000 * ADDRESS OF THE ABEND ENTRY POINT DMSBTPAB IN THE LOADED 00098000 * BATCH PROCESSOR. WHEN THE ENTRY IS FOUND ITS ADDRESS AND 00099000 * THAT OF ENTRY DMSBTPLM ARE STORED IN ABATABND AND ABATLIMT 00100000 * REPECTIVELY IN THE NUCON AREA OF THE CMS NUCLEUS. IF THE 00101000 * ABEND ENTRY POINT IS NOT FOUND IN THE TABLES, AN ERROR 00102000 * MESSAGE (DMSBTB101E) IS ISSUED AND THE BM CONSOLE RETURNS TO 00103000 * THE CMS INTERACTIVE MODE. 00104000 *  00105000 * THE BATLOAD FLAG IS SET OFF TO SHOW THAT DMSBTP 00106000 * HAS BEEN LOADED, THE BATNOEX FLAG IS SET ON TO PREVENT USER 00107000 * JOB EXECUTION UNTIL DMSBTP ENCOUNTERS A /JOB CARD AND 00108000 * FINALLY, CONTROL IS RETURNED TO CMS (DMSITS). 00109000 *  00110000 * _N_O_T_E: IF AN ERROR MESSAGE IS ISSUED, DMSERR 00111000 * TYPES THE MESSAGE, THE BM FLAGS BATRUN AND BATLOAD ARE SET 00112000 * OFF BEFORE CONTROL IS RETURNED TO CMS. THIS ALLOWS THE 00113000 * NORMAL CMS INTERACTION TO RESUME. 00114000 * 00115000 *. 00116000 EJECT 00117000 DMSBTB START 00118000 LR R12,R15 00119000 USING DMSBTB,R12 00120000 USING NUCON,R0 00121000 ST R14,SAVE14 00122000 DMSKEY NUCLEUS 00123000 TM BATFLAGS,BATUSEX IS USER RUNNING? @VA02821 00123100 BZ CONTPROC NOPE, CONTINUE AS USUAL @VA02821 00123200 OI BATFLAG2,BATDCMS OTHERWISE, MUST ABEND @VA02821 00123300 DMSKEY RESET @VA02821 00123400 L R15,ABATABND GET BATCH ABEND ROUTINE @VA02821 00123500 BR R15 BRANCH TO IT @VA02821 00123600 CONTPROC TM BATFLAGS,BATRUN+BATLOAD INITIALIZED BY DMSINS? @VA02821 00124100 BNO NOLOAD ERROR IF NOT 00125000 LA R3,3 STATE THREE FILES 00126000 LA R4,LOAD+8 USE NAMES IN LIST 00127000 XR R5,R5 R5 WILL CONTAIN TOTAL BYTES NEEDED 00128000 LA R1,STATE 00129000 SVC 202 CALL FOR BATCH PROCESSOR 00130000 DC AL4(NOFILE) 00131000 B FSTCOPY IT'S THERE, NOW GET SIZE 00132000 SPACE 00133000 USREXITS EQU * STATE THE USER EXIT ROUTINES 00134000 LA R4,8(,R4) NEXT NAME 00135000 MVC STATE+8(8),0(R4) PREP STATE PLIST 00136000 SVC 202 STATE THE FILE 00137000 DC AL4(LASTCHK) IF NOT THERE, DON'T COMPUTE 00138000 SPACE 00139000 FSTCOPY EQU * COMPUTE SIZE OF TEXT FILE 00140000 L R8,AFVS GET STATE COPY OF FST 00141000 USING FVSECT,R8 00142000 L R2,FVSFSTIL LOAD LRECL FOR FILE 00143000 MH R2,FVSFSTIC LRECL X N'RECS = STORAGE SIZE 00144000 AR R5,R2 KEEP TALLY OF BYTES NEEDED 00145000 LASTCHK BCT R3,USREXITS LOOP THRU FOR ALL FILES NEEDED 00146000 LA R0,7(,R5) ROUND TO NEXT DWORD 00147000 SRA R0,3 DIVIDE FOR NO. DWORDS 00148000 DMSFREE DWORDS=(0),TYPE=NUCLEUS 00149000 ST R1,ABATPROC KEEP BATCH ADDR IN NUCON 00150000 ST R1,ADPACK 00151000 UNPK ADUNPACK(9),ADPACK(5) UNPACK BATCH ADDR 00152000 TR ADUNPACK(8),CHARTAB AND TRANSLATE FOR 'LOAD' 00153000 MVC LOADAD(6),ADUNPACK+2 GET TRANSLATED ADDR. @VA02965 00154100 SPACE 1 00155000 LA R1,LOAD 00156000 SVC 202 LOAD BATCH PROCESSOR (DMSBTP) 00157000 DC AL4(*+4) 00158000 MVC LOCCNT,AUSRAREA 00159000 LTR R15,R15 CHECK RETURN CODE 00160000 BZ LOADED DROP IF O.K. 00161000 CH R15,=H'4' ANYBODY UNRESOLVED? 00162000 BH NOLOAD ERROR ONLY IF WORSE THAN THAT 00163000 LOADED EQU * 00164000 LA R2,20 SIZE OF LDR TABLE ENTRIES 00165000 L R3,ALDRTBLS ADDR OF LDR TABLES 00166000 LH R4,TBENT NO. TABLE ENTRIES 00167000 CKENTRY EQU * 00168000 SR R3,R2 POINT TO NEXT ENTRY 00169000 CLC 0(8,R3),=CL8'DMSBTPAB' 00170000 BE STABEND FOUND IT...GO SAVE IT 00171000 BCT R4,CKENTRY OTHERWISE, CONTINUE 00172000 B NOLOAD ERROR IF NO ENTRIES LEFT 00173000 STABEND EQU * 00174000 MVC ABATABND(4),12(R3) KEEP BATCH ABEND ENTRY IN NUCON 00175000 SR R3,R2 SLIDE DOWN THE LOADER TABLES 00176000 MVC ABATLIMT(4),12(R3) STORE BATCH JOB LIMIT TABLE ADDR 00177000 OI BATFLAGS,BATNOEX SUPPRESS USER EXECUTION 00178000 NI BATFLAGS,255-BATLOAD BATCH LOAD COMPLETE 00179000 DMSKEY RESET 00180000 L R14,SAVE14 00181000 BR R14 RETURN TO CMS 00182000 EJECT 00183000 STATE DS 0D 00184000 DC CL8'STATE' 00185000 DC CL8'DMSBTP' 00186000 DC CL8'TEXT' 00187000 DC CL8'*' 00188000 DC 8X'FF' 00189000 * 00190000 LOAD DC CL8'LOAD' 00191000 DC CL8'DMSBTP' 00192000 DC CL8'BATEXIT1' USER CONTROL CARD EXIT 00193000 DC CL8'BATEXIT2' USER '/JOB' CARD EXIT 00194000 DC CL8'(' 00195000 DC CL8'ORIGIN' 00196000 LOADAD DC CL8' ' 00197000 DC 8X'FF' 00198000 * 00199000 SPACE 3 00200000 NOFILE EQU * 00201000 DMSERR NUM=100,LET=E,TEXT='NO BATCH PROCESSOR AVAILABLE' 00202000 LA R5,40 00203000 B ERRORS 00204000 * 00205000 NOLOAD EQU * 00206000 DMSERR NUM=101,LET=E,TEXT='BATCH NOT LOADED' 00207000 LA R5,88 00208000 * 00209000 ERRORS NI BATFLAGS,255-BATRUN-BATLOAD BATCH NOT RUNNING 00210000 DMSKEY RESET 00211000 LR R15,R5 00212000 BR R14 RETURN TO NORMAL CMS ENVIRONS 00213000 SPACE 1 00214000 SAVE14 DC F'0' 00215000 ADPACK DC 5X'00' 00216000 ADUNPACK DC 9X'00' 00217000 DS 0F 00218000 DC C'0123456789ABCDEF' 00219000 CHARTAB EQU *-X'FF'-1 00220000 EJECT 00221000 REGEQU 00222000 NUCON 00223000 FVS 00224000 END 00225000