CSB TITLE 'DMKCSB (CP) VM/370 - RELEASE 6' 00001000
ISEQ 73,80 VALIDATE SEQUENCING OF INPUT @V386298 00002000
*. 00003000
* MODULE NAME - 00004000
* 00005000
* DMKCSB 00006000
* 00007000
* FUNCTION - 00008000
* 00009000
* DMKCSB CONTAINS THE SPOOLING COMMANDS USED TO CONTROL THE REAL 00010000
* SPOOLING UNIT RECORD DEVICES ATTACHED TO THE SYSTEM. THE FUNC- 00011000
* TION OF EACH COMMAND IS DESCRIBED SEPARATELY 00012000
* 00013000
* ATTRIBUTES - 00014000
* 00015000
* REENTRANT, PAGEABLE, CALLED VIA SVC 00016000
* 00017000
* ENTRY POINTS - 00018000
* 00019000
* DMKCSBLD - LOAD REAL UCS OR FCB BUFFER 00020000
* 00021000
* NORMAL - 00022000
* GPR2 = 0 00023000
* SOME COMMANDS WRITE A VERIFYING MESSAGE TO THE OPERA- 00024000
* TOR; THESE MESSAGES ARE DESCRIBED WITH THE COMMANDS 00025000
* THAT ISSUE THEM 00026000
* 00027000
* ERROR - 00028000
* GPR2 = CONTAINS THE BINARY ERROR MESSAGE NUMBER 00029000
* - EITHER AN OPTION IS ILLEGAL, OR SOME CONDITION 00030000
* EXISTS THAT MAKES IT IMPOSSIBLE TO EXECUTE THE COMMAND 00031000
* A MESSAGE IS PRINTED TO DESCRIBE THE ERROR; THE ERROR 00032000
* MESSAGES THAT MAY OCCUR ARE LISTED WITH EACH COMMAND 00033000
* 00034000
* CALLS TO OTHER ROUTINES - 00035000
* 00036000
* DMKSCNRU - TO LOCATE THE RDEVBLOK FOR A SPOOLING DEVICE 00037000
* DMKSCNFD - TO SCAN THE COMMAND LINE BUFFER FOR OPTIONS 00038000
* BUFFER LOAD IMAGES 00039000
* DMKPTRUL - TO UNLOCK THE BUFFER PAGE 00040000
* DMKIOSQR - TO INITIATE THE I/O FOR BUFFER LOADING 00041000
* DMKDSPCH - EXIT VIA GOTO TO WAIT FOR INTERRUPT FROM I/O 00042000
* DMKSCNVU - LOCATE VIRTUAL DEVICE BLOCKS 00043000
* DMKFREE - TO OBTAIN FREE STORAGE FOR MESSAGE BUFFERS AND 00044000
* IOBLOKS 00045000
* DMKFRET - TO RETURN USED BLOKS TO FREE STORAGE 00046000
* DMKQCNWT - TO WRITE ERROR AND VERIFICATION MESSAGES 00047000
* DMKCVTHB - TO CONVERT HEX OPTIONS TO BINARY ADDRESSES 00048000
* DMKCVTDB - TO CONVERT DECIMAL TO BINARY 00049000
* DMKERMSG - TO WRITE ERROR MESSAGES 00050000
* 00051000
* EXTERNAL REFERENCES - 00052000
* 00053000
* DMKFCBLD - VIRTUAL ADDRESS OF FCB LOAD DATA 00054000
* DMKUCSLD - VIRTUAL ADDRESS OF UCS LOAD DATA (1403) 00055000
* DMKUCBLD - VIRTUAL ADDRESS OF UCS LOAD DATA (3211) 00056000
* DMKUCCLD - VIRTUAL ADDRESS OF UCS LOAD DATA (3203) 00057000
* 00058000
* TABLES / WORKAREAS - 00059000
* 00060000
* SAVEWRK2 - VIRTUAL ADDRESS OF UCB OR FCB MODULE 00061000
* 00062000
* REGISTER USAGE - 00063000
* 00064000
* ALL SUBROUTINES IN THE MODULE CONFORM GENERALLY TO THIS USAGE 00065000
* ANY INDIVIDUAL DIFFERENCES OR EXTENSIONS ARE LISTED WITH THE 00066000
* COMMAND DESCRIPTION 00067000
* 00068000
* GPR0 = OPTION LENGTH - RETURNED FROM DMKSCNFD 00069000
* GPR1 = OPTION ADDRESS - RETURNED FROM DMKSCNFD 00070000
* GPR2 = SCRATCH 00071000
* GPR3 = LENGTH FIELD FOR EXECUTED MVC'S AND TRT'S 00072000
* GPR4 = INTERNAL SUBROUTINE LINKAGE 00073000
* GPR6 = SCRATCH 00074000
* GPR7 = SCRATCH 00075000
* GPR8 = RDEVBLOK BASE 00076000
* GPR9 = RSPLCTL BASE 00077000
* GPR10 = IOBLOK BASE 00078000
* GPR11 = VMBLOK BASE FOR SYSVMBK 00079000
* GPR12 = DMKCSB BASE 00080000
* GPR13 = SAVEAREA BASE 00081000
* GPR14 = EXTERNAL LINKAGE 00082000
* GPR15 = EXTERNAL LINKAGE 00083000
* 00084000
* NOTES - NONE 00085000
* 00086000
* OPERATION - 00087000
* 00088000
* ALL COMMAND PROCESSORS ARE ENTERED VIA A CALL FROM DMKCFM; THE 00089000
* THE FUNCTION, FORMAT AND OPERATION OF EACH COMMAND ARE DESCRI- 00090000
* BED IN THE FOLLOWING SECTIONS 00091000
*. 00092000
EJECT 00093000
COPY OPTIONS @V386298 00094000
COPY LOCAL OPTIONS @V386298 00095000
SPACE 3 00096000
DMKCSB CSECT @V386298 00097000
SPACE 3 00098000
EXTRN DMKCVTHB,DMKSCNVU,DMKSCNRU,DMKUCCLD @V386298 00099000
EXTRN DMKIOSQR,DMKPTRUL @V386298 00100000
EXTRN DMKSCNFD,DMKUCSLD,DMKFCBLD,DMKUCBLD @V386298 00101000
EXTRN DMKCVTDB,DMKERMSG @V386298 00102000
SPACE 3 00103000
USING PSA,R0 @V386298 00104000
USING VMBLOK,R11 @V386298 00105000
USING SAVEAREA,R13 @V386298 00106000
EJECT 00107000
*. 00108000
* SUBROUTINE NAME - 00109000
* 00110000
* DMKCSBLD 00111000
* 00112000
* FUNCTION - 00113000
* 00114000
* TO LOAD THE UCS BUFFER ON A 1403, 3211, OR 3203, OR TO 00115000
* LOAD THE FCB ON A 3211 OR A 3203 00116000
* 00117000
* COMMAND LINE FORMAT - 00118000
* 00119000
* +---------+-----------------------------+ 00120000
* | LOADBUF | RADDR UCS NAME <FOLD> <VER> | 00121000
* | LOADBUF | RADDR FCB NAME <INDEX <NN>> | 00122000
* +---------+-----------------------------+ 00123000
* 00124000
* FOLD VER INDEX 00125000
* F V I 00126000
* 00127000
* OPERATION - 00128000
* 00129000
* 1. BAL TO GETDEVIC TO LOCATE RDEVBLOK FOR PRINTER TO BE LOADED 00130000
* 2. VERIFY THAT THE SPECIFIED DEVICE IS A NON-DEDICATED PRIN- 00131000
* TER THAT HAS BEEN DRAINED AND IS NO LONGER BUSY 00132000
* 3. CALL SCNFD TO LOCATE THE FCB OR UCS OPTION 00133000
* 4. IF UCS IS SPECIFIED, VERIFY THAT THE SPECIFIED PRINTER HAS 00134000
* THE APPROPRIATE FEATURE CODE 00135000
* 5. IF FCB IS SPECIFIED, VERIFY THAT THE SPECIFIED PRINTER 00136000
* IS A 3211 OR 3203 00137000
* 6. POINT TO THE TABLE OF VALID BUFFER LOAD NAMES 00138000
* 7. CALL DMKSCNFD TO LOCATE THE NAME OF THE BUFFER TO BE LOADED 00139000
* AND LOCATE THE NAME IN THE APPROPRIATE TABLE 00140000
* 8. LOAD THE VIRTUAL ADDRESS OF THE BUFFER AND CALL DMKPTRAN 00141000
* VIA THE TRANS MACRO TO BRING IT INTO REAL MEMORY 00142000
* 9. CALL DMKSCNFD TO LOCATE THE OPTIONS FOR THS LOAD 00143000
* 10. LOAD THE APPROPRIATE BUFFER BY CONSTRUCTING AN IOBLOK 00144000
* AND A CHANNEL PROGRAM AND CALLING DMKIOSQR 00145000
* 11. IF THE REQUEST IS FOR A UCS LOAD WITH VER, VERIFY THE LOAD 00146000
* BY PRINTING THE CONTENTS OF THE BUFFER ON THE PRINTER 00147000
* 12. IF THE REQUEST IS FOR A FCB LOAD AND INDEX 00148000
* IS SPECIFIED, LOAD THE FCB BUFFER WITH THE INDEX VALUE 00149000
* 13. EXIT 00150000
* 00151000
* RESPONSE - 00152000
* 00153000
* NONE 00154000
* 00155000
* ERROR MESSAGES - 00156000
* 00157000
* DMKCSB003E INVALID OPTION - (OPTION) 00158000
* DMKCSB006E INVALID DEVICE TYPE - (ADDR) 00159000
* DMKCSB013E CONFLICTING OPTION - (OPTION) 00160000
* DMKCSB021E RADDR MISSING OR INVALID 00161000
* DMKCSB026E OPERAND MISSING OR INVALID 00162000
* DMKCSB031E BUFFER MISSING OR INVALID 00163000
* DMKCSB036E INDEX MISSING OR INVALID 00164000
* DMKCSB040E DEV (ADDR) DOES NOT EXIST 00165000
* DMKCSB043E BUFFER (NAME) DOES NOT EXIST 00166000
* DMKCSB046E (TYPE) (RADDR) OFFLINE 00167000
* DMKCSB140E (TYPE) (RADDR) ATTACHED TO (USERID) 00168000
* DMKCSB142E (TYPE) (RADDR) NOT DRAINED 00169000
* DMKCSB148E (TYPE) (RADDR) BUFFER (NAME) FAILED 00170000
*. 00171000
ID DC CL8'DMKCSB' MODULE NAME @V386298 00172000
SPACE 00173000
DMKCSBLD RELOC @V386298 00174000
SPACE 00175000
BAL R4,CLEAR CLEAR SAVEWRK1,2-9 @V386298 00176000
SPACE 00177000
* SAVEWRK1 FLAG BYTE 00178000
* X'80' - UCS COMMAND 00179000
* X'40' - FOLD OPTION 00180000
* X'20' - VERIFY OPTION 00181000
* X'10' - INDEX OPTION 00182000
* X'08' - INDEX VALUE PRESENT 00183000
* X'04' - FCB ADDRESS ONE 00184000
* SAVEWRK1+1(1) - INDEX VALUE 00185000
* SAVEWRK2 - DEVICE ADDRESS 00186000
* SAVEWRK3 - VIRTUAL ADDRESS 00187000
* SAVEWRK4 _ REAL PAGE ADDRESS OF BUFFER 00188000
SPACE 00189000
BAL R4,GETDEVIC LOCATE REAL DEVICE BLOK @V386298 00190000
USING RDEVBLOK,R8 @V386298 00191000
ST R1,SAVEWRK2 SAVE DEVICE ADDRESS @V386298 00192000
TM RDEVTYPE,TYPPRT IS IT A PRINTER DEVICE ?? @V386298 00193000
BZ MSG006E NO-- INVALID ADDRESS @V386298 00194000
TM RDEVTYPE,TYP3211 IS IT A 3203/3211 PRINTER?? @V386298 00195000
BO CKDRAIN YES @V386298 00196000
TM RDEVFTR,FTRUCS UCS ?? @V386298 00197000
BZ MSG006E NO-- INVALID ADDRESS @V386298 00198000
CKDRAIN TM RDEVFLAG,RDEVDRAN IS THE PRINTER DRAINED ?? @V386298 00199000
BZ MSG142E NO -- @V386298 00200000
ICM R15,B'1111',RDEVSPL IS DEVICE ACTIVE ?? @V386298 00201000
BNZ MSG142E YES -- DEVICE NOT DRAINED @V386298 00202000
SPACE 2 00203000
* CHECK NEXT ENTRY IN COMMAND LINE 00204000
CALL DMKSCNFD @V386298 00205000
BNZ MSG026E FCB OR UCS MISSING @V386298 00206000
LR R14,R0 COUNT @V386298 00207000
BCTR R14,0 -1 @V386298 00208000
C R0,F3 COUNT OF 3 FOR FCB OR UCS ??@V386298 00209000
BNE MSG003E NO INVALID OPTION @V386298 00210000
EX R14,CLCFCB FCB ?? @V386298 00211000
BE FCBTYPE YES-NOW CHEK FOR 3211/3203 @V386298 00212000
OI SAVEWRK1,X'80' INDICATE UCS @V386298 00213000
EX R14,CLCUCS UCS ?? @V386298 00214000
BE BLOCKS YES - @V386298 00215000
EX R14,CLCUCC UCC? @VA11542 00215200
BE BLOCKS YES @VA11542 00215400
B MSG003E INVALID OPTION @V386298 00216000
SPACE 00217000
FCBTYPE EQU * @V386298 00218000
TM RDEVTYPE,TYP3211 IS IT A 3203/3211 PRINTER?? @V386298 00219000
BNO MSG006E INVALID ADDRESS @V386298 00220000
SPACE 00221000
BLOCKS EQU * @V386298 00222000
* BUILD IOBLOK 00223000
SPACE 00224000
USING IOBLOK,R10 @V386298 00225000
LA R0,XIOBSIZE SIZE OF IOBLOK AND EXTENSION@V386298 00226000
CALL DMKFREE GET STORAGE @V386298 00227000
LR R10,R1 ADDRESSABILITY IOBLOK @V386298 00228000
XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR IOBLOK @V386298 00229000
ST R10,IOBLINK IOBLOK POINTS TO ITSELF @V386298 00230000
* (= ORIGINAL COPY) 00231000
SPACE 00232000
* SET UP IOBLOK 00233000
SPACE 00234000
MVC IOBRADD,SAVEWRK2+2 MOVE IN REAL DEVICE ADDRESS @V386298 00235000
LA R0,UCSCCWS POINT TO CHANNEL PROGRAM @V386298 00236000
ST R0,IOBCAW AND SAVE IT @V386298 00237000
ST R11,IOBUSER LOAD ADDRESS OF USER VMBLOK @V386298 00238000
SPACE 00239000
TM SAVEWRK1,X'80' UCS ?? @V386298 00240000
BO UCSTYPE YES - @V386298 00241000
MVC UCSCCWS(48),FCBCCW MOVE FCB CCWS TO UCS WORK @V386298 00242000
* BLOK 00243000
L R1,=A(DMKFCBLD) ADDRESS OF FCB LOAD BUFFER @V386298 00244000
B TRANS GET BUFFER @V386298 00245000
SPACE 00246000
* PROCESS UCS 00247000
SPACE 00248000
UCSTYPE CLI RDEVTYPE,TYP3211 3211 PRINTER ?? @V386298 00249000
BE MVC3211 YES GO MOVE CCWS @V386298 00250000
CLI RDEVTYPE,TYP3203 IS IT A 3203 PRINTER?? @V386298 00251000
BE MVC3203 YES GO MOVE CCWS @V386298 00252000
MVC UCSCCWS,CCW1403 MOVE 1403 CCW TO UCSBLOK @V386298 00253000
L R1,=A(DMKUCSLD) ADDRESS OF 1403 LOAD BUFFER @V386298 00254000
B TRANS @V386298 00255000
SPACE 00256000
MVC3203 MVC UCSCCWS,CCW3203 MOVE 3203 CCWS TO UCSBLOK @V386298 00257000
L R1,=A(DMKUCCLD) ADDR OF 3203 UCS LOAD BUFR @V386298 00258000
B TRANS BOUNDARY CHECKING @V386298 00259000
SPACE 1 00260000
MVC3211 MVC UCSCCWS,CCW3211 MOVE 3211 CCWS TO UCSBLOK @V386298 00261000
L R1,=A(DMKUCBLD) ADDRESS OF 3211 UCS LOAD BUF@V386298 00262000
SPACE 00263000
TRANS EQU * HERE FOR BOTH UCS AND FCB @V386298 00264000
L R15,ASYSVM POINT TO SYSTEM VMBLOK,AND @V386298 00265000
LCTL C1,C1,VMSEG-VMBLOK(R15) GET CORRECT SEGMENT TABL@V386298 00266000
DC 0H'0',X'B1',AL.4(2,0),S(0(1)) LRA INSTRUCTION@V386298 00267000
BC 7,NOTRES PAGE NOT RESIDENT,GO GET IT @V386298 00268000
BAL R14,PAGERES CHECK IF PAGE IS CP RESIDENT@V386298 00269000
BL MODRES YES -- MODULE RESIDENT @V386298 00270000
NOTRES LA R2,(BRING+DEFER+LOCK+SYSTEM) SET UP PARM REG @V386298 00271000
L R15,APTRAN ADDRESS OF TRANS ROUTINE @V386298 00272000
SVC 8 @V386298 00273000
SPACE 00274000
USING UCSHDR,R2 @V386298 00275000
MODRES ST R2,SAVEWRK4 SAVE REAL PAGE ADDRESS @V386298 00276000
SPACE 00277000
CALL DMKSCNFD GET NAME @V386298 00278000
BNZ MSG031 NONE FOUND @V386298 00279000
LR R6,R0 SAVE COUNT @V386298 00280000
BCTR R6,R0 -1 FOR MOVE @V386298 00281000
C R6,F3 LARGER THAN 4 ?? @V386298 00282000
BH MSG031 YES - ERROR MSG031E @V386298 00283000
EX R6,MVCNAME MOVE NAME TO SAVEWRK8 @V386298 00284000
OC SAVEWRK8(4),BLANKS MAKE UPPER CASE @V386298 00285000
CNTOK CLC HDRNAME(04),ZEROES LAST UCS LOAD HEADER @V386298 00286000
BE MSG043 YES - ERROR MSG043E @V386298 00287000
SPACE 00288000
COMPARE CLC SAVEWRK8(4),HDRNAME IS THIS THE CORRECT LOAD ?? @V386298 00289000
BE EQUAL YES @V386298 00290000
AH R2,HDRNEXT POINT TO NEXT HEADER @V386298 00291000
B CNTOK COMPARE NAME TO THIS HEADER @V386298 00292000
SPACE 00293000
EQUAL TM SAVEWRK1,X'80' IS THIS FCB TYPE ?? @V386298 00294000
BO FOLDVER NO -- UCS TEST FOR FOLD @V386298 00295000
LH R0,BUFLEN GET BUFFER LENGTH @V386298 00296000
STH R0,FCBLOAD+6 STORE LENGTH IN CCW CNT FLD @V386298 00297000
SPACE 00298000
FOLDVER EQU * @V386298 00299000
CALL DMKSCNFD SCAN FOR FOLD OR VERIFY @V386298 00300000
* BE FOLD OR VER 00301000
BNZ ADJADD NONE - @V386298 00302000
LR R14,R0 COUNT @V386298 00303000
BCTR R14,0 -1 @V386298 00304000
TM SAVEWRK1,X'80' UCS OPTION ?? @V386298 00305000
BZ INDEX NO -- FCB OPTION @V386298 00306000
EX R14,CLCFOLD FOLD ?? @V386298 00307000
BNE VER NO TEST VERIFY @V386298 00308000
TM SAVEWRK1,X'40' FOLD OPTION SET ?? @V386298 00309000
BO MSG013 YES -- CONFLICTING OPTION @V386298 00310000
OI SAVEWRK1,X'40' SET FOLD OPTION PRESENT @V386298 00311000
CLI UCSBBLOK,X'73' THIS COMMAND CODE WILL @V386298 00312000
* PERFORM A BLOCK DATA CHECK 00313000
* ON EITHER A 3203 OR A 3211 00314000
BNE FOLD1403 NO @V386298 00315000
MVI UCSBFOLD,X'43' CHANGE NO-FOLD TO FOLDING @V386298 00316000
* FOR 3203/3211 PRINTERS 00317000
B FOLDVER CHECK FOR VER ON CMD LINE @V386298 00318000
SPACE 00319000
FOLD1403 MVI UCSLOAD,X'F3' CHANGE NO-FOLD TO FOLDING @V386298 00320000
B FOLDVER @V386298 00321000
SPACE 00322000
INDEX EX R14,CLCINDEX INDEX OPTION ?? @V386298 00323000
BNE MSG003 NO -- ERROR INVALID OPTION @V386298 00324000
CLI RDEVTYPE,TYP3203 @V386298 00325000
BE MSG003 YES--NO INDEX OTION @V386298 00326000
XI SAVEWRK1,X'10' INDEX OPTION PROCESSED ? @V386298 00327000
BZ MSG003 YES-- INVALID OPTION @V386298 00328000
CALL DMKSCNFD GET INDEX VALUE @V386298 00329000
BNZ ADJADD NONE -- USE DEFAULT @V386298 00330000
C R0,F2 LENGTH OF INDEX > 2 @V386298 00331000
BH MSG036 YES - INVALID INDEX @V386298 00332000
CALL DMKCVTDB CONVERT TO BINARY @V386298 00333000
BNZ MSG036 INVALID INDEX @V386298 00334000
C R1,=F'31' VALUE GREATER THAN 31 ? @V386298 00335000
BH MSG036 YES -- @V386298 00336000
C R1,F1 VALUE LESS THAN ONE ? @V386298 00337000
BL MSG036 YES -- INVALID INDEX VALUE @V386298 00338000
STC R1,SAVEWRK1+1 SAVE INDEX VALUE @V386298 00339000
OI SAVEWRK1+1,128 SET INDEX FLAG @V386298 00340000
OI SAVEWRK1,X'08' INDICATE INDEX VALUE PRESENT@V386298 00341000
B FOLDVER CHECK FOR NEXT OPTION @V386298 00342000
SPACE 00343000
VER EX R14,CLCVER VERIFY ?? @V386298 00344000
BNE MSG003 NO - INVALID OPTION @V386298 00345000
SPACE 00346000
SPACE 00347000
* GET VERIFY CCWS UCS LOAD BUFFER IF ANY 00348000
SPACE 00349000
VEROK TM SAVEWRK1,X'20' VERIFY OPTION SET @V386298 00350000
BO MSG013 YES -- CONFLICTING OPTION @V386298 00351000
OI SAVEWRK1,X'20' SET VERIFY OPTION PRESENT @V386298 00352000
OI UCSCCWS+36,CC TURN ON COMMAND CHAINING @VA07899 00352500
LH R5,CCWLEN GET LENGTH OF CCWS @V386298 00353000
LTR R5,R5 CCWS PRESENT @V386298 00354000
BZ FOLDVER NO--GO CK FOLD IN CASE VER @V386298 00355000
* WAS FIRST 00356000
LH R1,CCWDISP GET DISP FOR VERIFY CCWS @V386298 00357000
ALR R1,R2 POINT TO VERIFY CCWS @V386298 00358000
CH R5,=H'96' CHECK FOR 12 MAX CCWS @V386298 00359000
BH FOLDVER OVER MAX FORGET USE DEFAULT @V386298 00360000
MVC UCSBVER+24(56),SENSECCW OVERLAY DEFAULT CCWS @V386298 00361000
BCTR R5,R0 -1 SET UP FOR MOVE @V386298 00362000
EX R5,VERCCW MOVE VER CCW TO UCSBLOK @V386298 00363000
B FOLDVER CK FOLD IN CASE ORDER WAS @V386298 00364000
* VER FOLD 00365000
SPACE 00366000
ADJADD EQU * ADJUST CCW DATA ADDRESS TO REAL ADDRESS @V386298 00367000
LA R5,17 LOOP COUNTER (NUMBER OF CCWS@V386298 00368000
LA R15,HDRSIZE(,R2) ADDRESS OF FIRST DATA BYTE @V386298 00369000
* UCS) 00370000
LA R1,UCSCCWS POINT TO CCW LIST @V386298 00371000
ADJLOOP L R0,0(R1) LOAD CCW @V386298 00372000
ALR R0,R15 UPDATE DATA ADDR TO ACTUAL @V386298 00373000
ST R0,0(R1) STORE BACK IN CCW @V386298 00374000
LA R1,8(R1) POINT TO NEXT CCW @V386298 00375000
BCT R5,ADJLOOP PROCESS ALL CCW @V386298 00376000
TM SAVEWRK1,X'20' VERIFY ?? @V386298 00377000
BZ CKINDEX NO -- CHECK FOR INDEX OPTION@V386298 00378000
MVC UCSBNAME(8),CCWNAME MOVE IN PRINT NAME CCW @V386298 00379000
STCM R2,B'0111',UCSBNAME+1 STORE ADDR OF BUFFER NAME @V386298 00380000
CKINDEX TM SAVEWRK1,X'10' INDEX OPTION REQUESTED ? @V386298 00381000
BZ CKFCB NO -- CHECK FOR FCB OPTION @V386298 00382000
SR R1,R1 GET INDEX VALUE @V386298 00383000
IC R1,SAVEWRK1+1 .. @V386298 00384000
TM SAVEWRK1,X'08' INDEX VALUE PRESENT ?? @V386298 00385000
BO *+8 YES - @V386298 00386000
IC R1,FCBPNDEX GET DEFAULT INDEX FROM DMKFCB@V386298 00387000
LTR R1,R1 INDEX VALUE PRESENT ? @V386298 00388000
BZ MSG036 NO -- INDEX MISSING @V386298 00389000
STC R1,FCBTNDEX SET UP NEW INDEX VALUE @V386298 00390000
LM R14,R15,FCBLOAD GET FCB LOAD CCW @V386298 00391000
BCTR R14,0 ADJUST ADDR TO PICK UP INDEX@V386298 00392000
AL R15,F1 ADD ONE TO CCW COUNT @V386298 00393000
STM R14,R15,FCBLOAD AND RETURN TO IOB @V386298 00394000
CKFCB TM SAVEWRK1,X'80' FCB ?? @V386298 00395000
BO QUERIO NO -- BRANCH @V386298 00396000
LA R1,FCB07 ADDRESS OF 07 CCW @V386298 00397000
ST R1,IOBCAW AND STORE IN IOB @V386298 00398000
LA R1,FCBADD DATA FIELD ADDRESS @V386298 00399000
STCM R1,B'0111',FCB06+1 AND STORE IN 06 CCW @V386298 00400000
QUERIO LA R1,UCSIRA GET RETURN ADDRESS @V386298 00401000
ST R1,IOBIRA AND SAVE IN IOBLOK @V386298 00402000
ST R8,IOBMISC2 SAVE RDEVBLOK ADDR @V386298 00403000
STM R12,R13,UCSREGS SAVE REGISTERS R12 AND R13 @V386298 00404000
CALL DMKIOSQR AND GO DO SIO @V386298 00405000
CSBDSP GOTO DMKDSPCH WAIT FOR INTERRUPT @V386298 00406000
SPACE 3 00407000
UCSIRA EQU * HERE WHEN THE LOAD IS COMPLETE @V386298 00408000
SPACE 00409000
USING *,R12 @V386298 00410000
LR R1,R10 MUST CHECK FOR COPY IOBLOK @V386298 00411000
L R10,IOBLINK LOAD ADDRESS OF ORIGINAL @V386298 00412000
L R8,IOBMISC2 RESTORE RDEVBLOK ADDR @V386298 00413000
LM R12,R13,UCSREGS RESTORE REGISTERS @V386298 00414000
USING DMKCSB,R12 @V386298 00415000
CR R1,R10 COPY IOBLOK PRESENT ? @V386298 00416000
BE UCSSTAT NO - TEST STATUS @V386298 00417000
OI IOBSTAT,IOBFATAL INDICATE FATAL ERROR @V386298 00418000
LA R0,IOBSIZE SIZE OF COPIED IOBLOK @V386298 00419000
CALL DMKFRET RETURN STORAGE @V386298 00420000
B CSBDSP WAIT FOR DEVICE END INTERRUPT @V386298 00421000
UCSSTAT NI IOBFLAG,X'FF'-IOBRSTRT RESET RESTART FLAG @V386298 00422000
TM IOBSTAT,IOBFATAL FATAL ERROR LOADING BUFFER ?@V386298 00423000
BO MSG148 YES - MSG DMKCSB148E @V386298 00424000
TSTUE TM IOBCSW+4,UE UNIT EXCEPION (CH12) @V386298 00425000
BO UCSUE YES -- @V386298 00426000
TM SAVEWRK1,X'80' FCB COMMAND ? @V386298 00427000
BO LOADEND NO -- UCS COMPLETE @V386298 00428000
TM SAVEWRK1,X'04' FCB IMAGE LOADED ? @V386298 00429000
BO LOADEND YES -- @V386298 00430000
LA R1,FCB0B ADDRESS OF SPACE COMMAND @V386298 00431000
ST R1,IOBCAW CHAINED TO 07 AND 06 @V386298 00432000
CLI FCBADD,X'40' FCB REGISTER ADDRESS AT 01 @V386298 00433000
BNE QUERIO NO -- SPACE AND TRY AGAIN @V386298 00434000
OI SAVEWRK1,X'04' INDICATE FCB ADDRESS 01 @V386298 00435000
LA R1,FCBLOAD ADDRESS OF FCB LOAD CCWS @V386298 00436000
ST R1,IOBCAW SET UP IOBCAW @V386298 00437000
B QUERIO AND LOAD FCB BUFFER @V386298 00438000
LOADEND BAL R3,FRETIOB FRET IOB AND UNLOCK BUFFER @V386298 00439000
B CSBMSG NORMAL EXIT FROM THIS ROUTINE @V386298 00440000
SPACE 00441000
UCSUE L R3,IOBCSW ADDRESS OF NEXT CCW @V386298 00442000
LA R3,0(R3) CLEAR HIGH BYTE @V386298 00443000
ST R3,IOBCAW AND STORE IN IOB @V386298 00444000
B QUERIO CONTINUE @V386298 00445000
SPACE 00446000
FRETIOB STM R0,R1,SAVEWRK2 SAVE COUNT AND ADDRESS OF @V386298 00447000
* INVALID OPTION IF ANY 00448000
LR R1,R10 FREE THE IOBLOK @V386298 00449000
LA R0,XIOBSIZE SIZE OF XIOBBLOK IN DOUBLE @V386298 00450000
* WORDS 00451000
CALL DMKFRET @V386298 00452000
SPACE 00453000
L R2,SAVEWRK4 GET REAL ADDRESS @V386298 00454000
BAL R14,PAGERES CHECK IF PAGE IS RESIDENT @V386298 00455000
BL FRETRET YES -- DO NOT UNLOCK @V386298 00456000
CALL DMKPTRUL UNLOCK THE BUFFER PAGE @V386298 00457000
FRETRET LM R0,R1,SAVEWRK2 RESTORE OPTION CNT AND ADDR @V386298 00458000
BR R3 @V386298 00459000
SPACE 3 00460000
VERCCW MVC UCSBVER(0),0(R1) EXECUTED- MOVE VER CCWS TO @V386298 00461000
* UCSBLOK 00462000
EJECT 00463000
*. 00464000
* SUBROUTINE NAME - 00465000
* DMKCSBVL 00466000
* 00467000
* FUNCTION - 00468000
* 00469000
* TO LOAD A VIRTUAL 3211 OR 3203 FORMS CONTROL BUFFER 00470000
* FROM DMKFCB MODULE. 00471000
* 00472000
* COMMAND LINE FORMAT - 00473000
* 00474000
* +----------+-----------------------------+ 00475000
* | LOADVFCB | VADDR FCB NAME <INDEX <NN>> | 00476000
* | LOADVFCB | F I | 00477000
* +----------+-----------------------------+ 00478000
* 00479000
* ATTRIBUTES - 00480000
* 00481000
* REENTRAN, PAGEABLE, CALLED VIA SVC 00482000
* 00483000
* ENTRY POINT - 00484000
* 00485000
* DMKCSBVL 00486000
* 00487000
* ENTRY CONDITIONS - 00488000
* 00489000
* GPR9 = ADDRESS OF COMMAND BUFFER 00490000
* GPR11 = ADDRES OF USER'S VMBLOK 00491000
* GPR12 = ADDRESS OF ENTRY POINT 00492000
* GPR13 = ADDRESS OF STANDARD SAVE AREA 00493000
* 00494000
* EXIT CONDITIONS - 00495000
* 00496000
* NORMAL - 00497000
* 00498000
* GPR2 = 0 00499000
* 00500000
* ERROR - 00501000
* 00502000
* GPR2 = BINARY VALUE OF THE ERROR MESSAGE NUMBER 00503000
* 00504000
* TABLE / WORK ARES - 00505000
* 00506000
* 00507000
* REGISTER USAGE - 00508000
* 00509000
* GPR3 = LINE VALUE 00510000
* GPR4 = VFCBBLOK BASE 00511000
* GPR5 = LENGTH 00512000
* GPR9 = ADDRESS OF COMMAND BUFFER 00513000
* GPR11 = ADDRESS OF USERS VMBLOK 00514000
* GPR12 = BASE REGISTER 00515000
* GPR13 = ADDRESS OF STANDARD SAVE AREA 00516000
* 00517000
* NOTES - 00518000
* 00519000
* EXAMPLE - 00520000
* 00521000
* LOADVFCB 00E FCB FCB1 00522000
* 00523000
* THE FOLLOWING IMAGE IS INCLUDED IN THE DMKFCB MODULE. 00524000
* 00525000
* NAME - FCB1 LENGTH 66 LINES - 6 LINES PER INCH 00526000
* 00527000
* LINE-CHANNEL,.. 1-1,3-2,5-3,7-4,9-5,11-6,13-7,15-8,19-10, 00528000
* 21-11,23-12,64-9 00529000
* 00530000
* OPERATION - 00531000
* 00532000
* 1. CALL DMKSCNFD TO LOCATE VADDR: IF NONE, 00533000
* EXIT GIVING MSG022E. 00534000
* CALL DMKCVTHB TO CONVERT THE ADDRESS TO BINARY: 00535000
* IF INVALID, EXIT GIVING MSG022E. 00536000
* 2. CALL DMKSCNVU TO LOCATE VIRTUAL DEVICE BLOK: 00537000
* IF NONE, EXIT GIVING MSG040E. IF NOT, 3211 OR 3203 00538000
* PRINTER: EXIT GIVING MSG006E. 00539000
* 3. IF VIRTUAL FORMS CONTROL BUFFER AVAILABLE: GO TO STEP 4. 00540000
* CALL DMKFREE TO GET STORAGE FOR VIRTUAL FORMS CONTROL 00541000
* BUFFER (VFCBBLOK) AND STORE ADDRESS IN VDEVFCBK 00542000
* 4. CLEAR VIRTUAL FORMS CONTROL BUFFER TO BINARY ZEROES 00543000
* 5. CALL DMKSCNFD TO LOCATE KEYWORD 'FCB': IF NONE, 00544000
* EXIT GIVING MSG026E. 00545000
* 6. CALL DMKSCNFD TO LOCATE NAME: IF NONE OR INVALID, 00546000
* EXIT GIVING MSG031E. 00547000
* 7. SEARCH THE BUFFER LOAD LIST FOR THE REQUESTED 00548000
* BUFFER: IF NOT FOUND, EXIT GIVING MSG043E. 00549000
* 8. CALL DMKSCNFD TO LOCATE INDEX OPTION; IF NONE, 00550000
* GO TO STEP 10. IF INVALID EXIT GIVING MSG003E. 00551000
* 9. CALL DMKSCNFD TO LOCATE INDEX VALUE; IF NONE, GO TO 00552000
* STEP 10. IF INVALID, EXIT GIVING MSG036E. 00553000
* 10. MOVE THE REQUESTED BUFFER TO VFCBBLOK, INCLUDING 00554000
* THE INDEX VALUE IF SPECIFIED. 00555000
* 00556000
* RESPONSE - 00557000
* 00558000
* NONE 00559000
* 00560000
* ERROR MESSAGES - 00561000
* 00562000
* DMKCSB006E INVALID DEVICE TYPE - (ADDR) 00563000
* DMKCSB022E VADDR MISSING OR INVALID 00564000
* DMKCSB026E OPERAND MISSING OR INVALID 00565000
* DMKCSB031E BUFFER MISSING OR INVALID 00566000
* DMKCSB036E INDEX MISSING OR INVALID 00567000
* DMKCSB040E DEV (ADDR) DOES NOT EXIST 00568000
* DMKCSB043E BUFFER (NAME) DOES NOT EXIST 00569000
* 00570000
*. 00571000
EJECT 00572000
DMKCSBVL RELOC @V386298 00573000
USING VFCBBLOK,R4 @V386298 00574000
USING VDEVBLOK,R8 @V386298 00575000
USING BUFFER,R9 @V386298 00576000
USING UCSHDR,R5 @V386298 00577000
SPACE 00578000
BAL R4,CLEAR CLEAR SAVEWRK1, 2-9 @V386298 00579000
CALL DMKSCNFD LACATE VADDR @V386298 00580000
BNZ MSG022E MISSING VADDR @V386298 00581000
SPACE 00582000
C R0,F3 LENGTH GREATER THAN 3 ?? @V386298 00583000
BH MSG022E YES -- INVALID DEVICE ADDR @V386298 00584000
LR R14,R0 GET LENGTH @V386298 00585000
BCTR R14,0 -1 @V386298 00586000
EX R14,MVCADDR MOVE ADDRESS TO SAVEWRK8-9 @V386298 00587000
CALL DMKCVTHB CONVERT ADDRESS TO BINARY @V386298 00588000
BNZ MSG022E BAD ADDRESS @V386298 00589000
SPACE 00590000
CALL DMKSCNVU LOCATE VDEVBLOK @V386298 00591000
BNZ MSG040E NONEXISTENT UNIT @V386298 00592000
SPACE 00593000
TM VDEVTYPE,TYP3211 IS IT A 3203/3211 PRINTER?? @V386298 00594000
BNO MSG006E NO - MSG MSGCSB006E @V386298 00595000
TM VDEVSTAT,VDEVDED VIRT DEV ATTACHED TO REAL @V386298 00596000
* DEV?? 00597000
BO MSG006E YES -- INVALID DEVICE TYPE @V386298 00598000
SPACE 00599000
ICM R4,B'1111',VDEVFCBK VFCBBLOK PRESENT ? @V386298 00600000
BNZ INITFCB YES - CLEAR BLOK @V386298 00601000
BNZ INITFCB YES - INITIAL @V386298 00602000
LA R0,VFCBSIZE GET SIZE OF BLOK @V386298 00603000
CALL DMKFREE GET STORAGE @V386298 00604000
LR R4,R1 LOAD BASE FOR VFCBBLOK @V386298 00605000
ST R4,VDEVFCBK SAVE ADDRESS @V386298 00606000
SPACE 00607000
INITFCB XC VFCBBLOK(VFCBSIZE*8),VFCBBLOK CLEAR BLOK @V386298 00608000
MVI VFCBCNT+1,X'01' SET COUNT TO LINE 01 @V386298 00609000
FCBSCAN CALL DMKSCNFD LOCATE KEYWORD FCB @V386298 00610000
BNZ MSG026E KEYWORD FCB MISSING @V386298 00611000
LR R14,R0 GET LENGTH @V386298 00612000
BCTR R14,0 -1 @V386298 00613000
EX R14,CLCFCB OPTION EQUAL FCB ?? @V386298 00614000
BNE MSG003E INVALID OPTION @V386298 00615000
SPACE 00616000
CALL DMKSCNFD LOCATE BUFFER NAME @V386298 00617000
BNZ MSG031E NAME MISSING @V386298 00618000
C R0,F4 NAME LONGER THAN 4 BYTES ?? @V386298 00619000
BH MSG031E NAME INVALID @V386298 00620000
SPACE 00621000
LR R14,R0 SAVE COUNT @V386298 00622000
BCTR R14,0 -1 FOR MOVE @V386298 00623000
EX R14,MVCNAME MOVE NAME TO SAVEWRK8 @V386298 00624000
OC SAVEWRK8(4),BLANKS MAKE UPPER CASE @V386298 00625000
SPACE 00626000
L R1,=A(DMKFCBLD) ADDRESS OF BUFFER LOADS @V386298 00627000
L R15,ASYSVM POINT TO SYSTEM VMBLOK, AND @V386298 00628000
LCTL C1,C1,VMSEG-VMBLOK(R15) GET CORRECT SEGMENT TABL@V386298 00629000
DC 0H'0',X'B1',AL.4(2,0),S(0(1)) LRA INSTRUCTION@V386298 00630000
BC 7,NOTRES1 PAGE NOT RESIDENT, GO GET IT@V386298 00631000
BAL R14,PAGERES CHECK IF PAGE IS CP RESIDENT@V386298 00632000
BL FCBRES YES -- MODULE RESIDENT @V386298 00633000
NOTRES1 LA R2,(BRING+DEFER+LOCK+SYSTEM) SET UP PARM REG @V386298 00634000
L R15,APTRAN ADDRESS OF TRANS ROUTINE @V386298 00635000
SVC 8 @V386298 00636000
FCBRES LR R5,R2 SET UP WORK REGISTER @V386298 00637000
FCBLOOP CLC SAVEWRK8(4),HDRNAME IS THIS THE RIGHT LOAD @V386298 00638000
BE EQNAME YES - @V386298 00639000
CLC HDRNAME(4),ZEROES LAST HEADER ?? @V386298 00640000
BNE FCBNEXT NO -- @V386298 00641000
LA R3,MSG043E SET RETURN FOR ERROR MESSAGE@V386298 00642000
FCBERR STM R0,R1,SAVEWRK6 SAVE COUNT AND ADDRESS @V386298 00643000
BAL R14,PAGERES CHECK IF PAGE IS RESIDENT @V386298 00644000
BL FCBRET YES -- RESIDENT - DO NOT @V386298 00645000
CALL DMKPTRUL UNLOCK BUFFER PAGE @V386298 00646000
FCBRET LM R0,R1,SAVEWRK6 RESTORE COUNT AND ADDRESS @V386298 00647000
BR R3 EXIT GIVING ERROR MSG @V386298 00648000
SPACE 00649000
FCBNEXT AH R5,HDRNEXT ADD DISP TO NEXT HEADER @V386298 00650000
B FCBLOOP KEEP LOOKING @V386298 00651000
SPACE 00652000
EQNAME LH R3,BUFLEN GET LENGTH OF DATA @V386298 00653000
BCTR R3,0 -1 FOR MOVE @V386298 00654000
EX R3,FCBDATA MOVE BUFFER DATA TO VDEVFCBK@V386298 00655000
CALL DMKSCNFD ANY MORE OPTIONS ? @V386298 00656000
BNZ FCBEXIT NO -- CONT @V386298 00657000
LR R14,R0 OPTION COUNT @V386298 00658000
BCTR R14,0 -1 @V386298 00659000
LA R3,MSG003E SET ERROR MSG RETURN @V386298 00660000
EX R14,CLCINDEX INDEX OPTION ?? @V386298 00661000
BNE FCBERR NO -- ERROR DMKCSB003E @V386298 00662000
CLI VDEVTYPE,TYP3203 IS IT A 3203 PRINTER?? @V386298 00663000
BE FCBERR YES--INDEX OPTION INVALID @V386298 00664000
CALL DMKSCNFD LOCATE INDEX VALUE @V386298 00665000
LA R3,MSG036E SET UP ERROR RETURN @V386298 00666000
BZ INDEXCVT SOMETHING PRESENT @V386298 00667000
CLI FCBPNDEX,X'00' DEFAULT VALUE PRESENT ? @V386298 00668000
BE FCBERR NO -- @V386298 00669000
MVC VFCBNDEX(1),FCBPNDEX MOVE IN DEFAULT VALUE @V386298 00670000
B FCBEXIT @V386298 00671000
SPACE 00672000
INDEXCVT C R0,F2 VALUE LENGTH GREATER THAN 2 @V386298 00673000
BH FCBERR YES -- @V386298 00674000
CALL DMKCVTDB CONVERT TO BINARY @V386298 00675000
BNZ FCBERR INVALID INDEX VALUE @V386298 00676000
C R1,=F'31' GREATER THAN 31 ? @V386298 00677000
BH FCBERR YES -- DMKCSB036E @V386298 00678000
LTR R1,R1 LESS THAN 1 ? @V386298 00679000
BZ FCBERR YES -- DMKCSB036E @V386298 00680000
STC R1,VFCBNDEX STORE FOR VIRTUAL DEVICE @V386298 00681000
LA R3,MSG003E ERROR RETURN @V386298 00682000
CALL DMKSCNFD LOCATE NEXT OPTION @V386298 00683000
BZ FCBERR INVALID OPTION @V386298 00684000
FCBEXIT BAL R14,PAGERES CHECK IF PAGE IS RESIDENT @V386298 00685000
BL CSBEXIT YES -- DO NOT UNLOCK @V386298 00686000
CALL DMKPTRUL UNLOCK BUFFER @V386298 00687000
B CSBEXIT ALL DONE EXIT @V386298 00688000
SPACE 00689000
* 00690000
FCBDATA MVC VFCBLOAD(0),HDRSIZE(R5) MOVE DATA TO VDEVFCBK @V386298 00691000
MVCNAME MVC SAVEWRK8(0),0(R1) MOVE NAME FROM SCAN LINE @V386298 00692000
SPACE 00693000
EJECT 00694000
*. 00695000
* OPERATION OF GETDEVIC SUBROUTINE - 00696000
* 00697000
* 1. CALL DMKSCNFD TO LOCATE THE DEVICE ADDRESS FIELD 00698000
* 2. IF NO OPTION IS FOUND: EXIT GIVING MSG021E. 00699000
* 3. CONVERT THE ADDRESS TO BINARY 00700000
* 4. IF THE CONVERSION FAILS, EXIT GIVING MSG021E. 00701000
* 5. CALL DMKSCNRU TO LOCATE THE DEVICE BLOK FOR THE SPECIFIED 00702000
* UNIT; IF NOT FOUND, EXIT GIVING MSG040E. 00703000
* 6. OTHERWISE, RETURN TO CALLER WITH GPR8 = RDEVBLOK 00704000
*. 00705000
SPACE 00706000
USING RDEVBLOK,R8 @V386298 00707000
GETDEVIC EQU * HERE TO LOCATE THE DEVICE SPECIFIED IN CMD @V386298 00708000
CALL DMKSCNFD LOCATE NEXT OPTION @V386298 00709000
BNZ MSG021E DEVICE ADDRESS IS MISSING @V386298 00710000
SPACE 00711000
GETDVIC2 C R0,F3 LENGTH GREATER THAN 3 ?? @V386298 00712000
BH MSG021E YES -- INVALID RADDRESS @V386298 00713000
LR R14,R0 GET LENGTH @V386298 00714000
BCTR R14,0 -1 @V386298 00715000
EX R14,MVCADDR MOVE ADDRESS TO SAVEWRK7 @V386298 00716000
CALL DMKCVTHB CONVERT TO BINARY @V386298 00717000
BNZ MSG021E INVALID HEX CHAR IN ADDR N4386298 00718000
CALL DMKSCNRU @V386298 00719000
BNZ MSG040E COULDN'T FIND A DEVICE AT @V386298 00720000
* THAT ADDRESS 00721000
L R14,ARIORD POINT TO LIST OF SYS READERS@V386298 00722000
MVC SAVEWRK6(3),=C'RDR' SET FOR ERROR MSG @V386298 00723000
TM RDEVTYPC,CLASURI READER TYPE ?? @V386298 00724000
BO VALDEV VALIDATE DEVICE FOR SPOOLING@V386298 00725000
L R14,ARIOPR POINT TO LIST OF SYS PRINTER@V386298 00726000
MVC SAVEWRK6(3),=C'PRT' PRINTER TYPE ?? @V386298 00727000
TM RDEVTYPE,TYPPRT PRINTER ?? @V386298 00728000
BO VALDEV VALIDATE DEVICE FOR SPOOLING@V386298 00729000
L R14,ARIOPU POINT TO LIST OF SYS PUNCHES@V386298 00730000
MVC SAVEWRK6(3),=C'PUN' SET FOR PUNCH @V386298 00731000
SPACE 00732000
VALDEV ICM R15,B'1111',0(R14) GET NUMBER OF DEVICES @V386298 00733000
BZ MSG006E NO DEVICES - INVALID TYPE @V386298 00734000
GETDEVLP LA R14,4(R14) UPDATE TO NEXT ENTRY @V386298 00735000
CH R1,2(R14) IS THIS DEVICE ON LIST ?? @V386298 00736000
BE DEVAVAIL YES -- CHECK FOR DEVICE @V386298 00737000
* AVAILABILITY 00738000
BCT R15,GETDEVLP TRY NEXT ENTRY @V386298 00739000
B MSG006E -- INVALID DEVICE TYPE @V386298 00740000
SPACE 00741000
DEVAVAIL TM SAVEWRK1+2,X'02' START OR DRAIN COMMAND ? @V386298 00742000
BCR 1,R4 YES - BRANCH (RETURN) @V386298 00743000
TM RDEVTYPC,CLASURO UNIT RECORD OUTPUT TYPE ? @V386298 00744000
BZ MSG006E NO - INVALID ADDRESS @V386298 00745000
TSTSTAT TM RDEVSTAT,RDEVDED IS THE DEVICE DEDICATED ? @V386298 00746000
BO MSG140E YES -- ERROR @V386298 00747000
TM RDEVSTAT,RDEVDISA IS THE DEVICE OFFLINE ? @V386298 00748000
BO MSG046E YES -- ERROR @V386298 00749000
BR R4 RETURN TO CALLER @V386298 00750000
SPACE 00751000
MVCADDR MVC SAVEWRK7(0),0(R1) MOVE NAME TO SAVEWRK7 @V386298 00752000
SPACE 3 00753000
CLEAR XC SAVEWRK2(32),SAVEWRK2 CLEAR WORK AREA @V386298 00754000
XC SAVEWRK1(4),SAVEWRK1 @V386298 00755000
BR R4 RETURN @V386298 00756000
SPACE 3 00757000
PAGERES LR R15,R2 LOAD ADDROF PAGE TO TEST INTO R15@V386298 00758000
N R15,=A(X'FFF000') REMOVE DISPLACEMENT VALUE @V386298 00759000
SRL R15,8 DIVIDE ADDRESS BY 256 @V386298 00760000
AL R15,ACORETBL GET ADDRESS OF CORE-TABLE ENTRY @V386298 00761000
L R15,0(,R15) PICK UP FORWARD POINTER @V386298 00762000
CL R15,=C'*CP*' IF EQUAL PAGE IS RESIDENT @V386298 00763000
BE *+10 YES - PAGE RESIDENT @V386298 00764000
TM *+1,X'FF' FORCE CC=3 - PAGE NOT RESIDENT @V386298 00765000
BR R14 RETURN @V386298 00766000
TM *,X'FF' FORCE CC=1 - PAGE RESIDENT @V386298 00767000
BR R14 RETURN @V386298 00768000
EJECT 00769000
****************************************************** 00770000
* 00771000
* ERROR EXITS FROM DMKCSB 00772000
* 00773000
****************************************************** 00774000
SPACE 3 00775000
MSG003 BAL R3,FRETIOB FRET IOBLOK AND UNLOCK BUFFER @V386298 00776000
MSG003E EQU * HERE IF OPTION IS INVALID @V386298 00777000
LA R2,003 ERROR MSG DMKCSB003E @V386298 00778000
B EXIT8 @V386298 00779000
SPACE 00780000
MSG006E EQU * HERE IF INVALID DEVICE TYPE @V386298 00781000
LA R2,006 ERROR MSG DMKCSB006E @V386298 00782000
B EXIT1 @V386298 00783000
SPACE 00784000
MSG013 BAL R3,FRETIOB FRET IOBLOK AND UNLOCK BUFFER @V386298 00785000
MSG013E EQU * HERE IF CONFLICTING OPTIONS @V386298 00786000
LA R2,013 ERROR MSG DMKCSB013E @V386298 00787000
B EXIT8 .. @V386298 00788000
SPACE 00789000
MSG021E EQU * HERE IF RADDR MISSING OR INVALID @V386298 00790000
LA R2,021 ERROR MSG DMKCSB021E @V386298 00791000
B EXIT8R1 @V386298 00792000
SPACE 00793000
MSG022E EQU * HERE IF VIRTUAL ADDRESS IS MISSING @V386298 00794000
* OR INVALID 00795000
LA R2,022 ERR MSG DMKCSB022E @V386298 00796000
B EXIT8R1 EXIT @V386298 00797000
SPACE 00798000
MSG026E EQU * HERE OF OPERAND IS MISSING OR @V386298 00799000
* OR INVALID 00800000
LA R2,026 ERROR MSG DMKCSB026E @V386298 00801000
B EXIT8R1 EXIT @V386298 00802000
SPACE 00803000
MSG028E EQU * HERE IF CLASS IS MISSING OR INVALID @V386298 00804000
LA R2,028 ERROR MSG DMKCSB028E @V386298 00805000
B EXIT8R1 EXIT @V386298 00806000
SPACE 00807000
MSG030E EQU * HERE IF COPIES MISSING OR INVALID @V386298 00808000
LA R2,030 ERROR MSG DMKCSB030E @V386298 00809000
B EXIT8R1 EXIT @V386298 00810000
SPACE 00811000
MSG031 BAL R3,FRETIOB FRET IOBLOK AND UNLOCK BUFFER @V386298 00812000
MSG031E EQU * HERE IF BUFFER IS MISSING OR IVALID @V386298 00813000
LA R2,031 ERROR MSG DMKCSB031E @V386298 00814000
B EXIT8R1 @V386298 00815000
SPACE 00816000
MSG036 BAL R3,FRETIOB FRET IOBLOK AND UNLOCK BUFFER @V386298 00817000
MSG036E EQU * HERE IF INDEX IN MISSING OR INVALID @V386298 00818000
LA R2,036 ERROR MSG DMKCSB036E @V386298 00819000
B EXIT8R1 EXIT @V386298 00820000
SPACE 2 00821000
MSG040E EQU * HERE IF DEVICE ADDRESS DOES NOT EXIST @V386298 00822000
LA R2,040 ERROR MSG DMKCSB040E @V386298 00823000
B EXIT1 SET UP MESSAGE @V386298 00824000
SPACE 00825000
MSG043 BAL R3,FRETIOB FRET IOBLOK AND UNLOCK BUFFER @V386298 00826000
MSG043E EQU * HERE IF BUFFER DOES NOT EXIST @V386298 00827000
LA R0,4 LENGTH OF NAME @V386298 00828000
LA R1,SAVEWRK8 ADDRESS OF NAME @V386298 00829000
LA R2,043 ERROR MSG DMKCSB043E @V386298 00830000
B EXIT8 @V386298 00831000
SPACE 00832000
MSG046E EQU * HERE IF DEVICE IS OFFLINE @V386298 00833000
LA R2,046 ERROR MSG DMKCSB046E @V386298 00834000
B EXIT2 SET GPR0 AND GPR1 @V386298 00835000
SPACE 00836000
MSG140E EQU * HERE IF DEVICE IS ATTACHED TO USER @V386298 00837000
L R14,RDEVUSER ADDRESS OF USER VMBLOK @V386298 00838000
MVC SAVEWRK8(8),VMUSER-VMBLOK(R14) GET USER ID @V386298 00839000
LA R0,16 LENGTH OF DATA FOR ERROR MSG@V386298 00840000
LA R1,SAVEWRK6 ADDRESS OF DATA @V386298 00841000
LA R2,140 ERROR MSG DMKCSB140E @V386298 00842000
B EXIT8 EXIT @V386298 00843000
SPACE 00844000
MSG141E EQU * HERE IF DEVICE NOT ACTIVE @V386298 00845000
LA R2,141 ERROR MSG DMKCSB141E @V386298 00846000
B EXIT2 SET UP GPR0 AND GPR1 @V386298 00847000
SPACE 00848000
MSG142E EQU * HERE IF DEVICE IS NOT DRAINED @V386298 00849000
LA R2,142 ERROR MSG DMKCSB142E @V386298 00850000
B EXIT2 SET UP GPR0 AND GPR1 @V386298 00851000
SPACE 00852000
MSG148 BAL R3,FRETIOB FRET IOBLOK AND UNLOCK BUFFER @V386298 00853000
MSG148E EQU * HERE IF BUFFER LOAD FAILED @V386298 00854000
LA R0,12 LENGTH OF ERROR MSG DATA @V386298 00855000
LA R1,SAVEWRK6 ADDRESS OF DATA @V386298 00856000
LA R2,148 ERROR MSG DMKCSB148E @V386298 00857000
B EXIT8 .. @V386298 00858000
SPACE 00859000
EXIT1 LA R0,3 LENGTH OF REAL ADDRESS @V386298 00860000
LA R1,SAVEWRK7 ADDRESS OF REAL ADDRESS @V386298 00861000
B EXIT8 EXIT @V386298 00862000
SPACE 00863000
EXIT2 LA R0,8 LENGTH OF TYPE AND REAL ADDR@V386298 00864000
LA R1,SAVEWRK6 ADDRESS OF DATA @V386298 00865000
B EXIT8 EXIT @V386298 00866000
SPACE 3 00867000
CLCFCB CLC 0(0,R1),=C'FCB ' @V386298 00868000
CLCUCS CLC 0(0,R1),=C'UCS ' @V386298 00869000
CLCUCC CLC 0(0,R1),=C'UCC ' @VA11542 00869500
CLCFOLD CLC 0(0,R1),=C'FOLD ' @V386298 00870000
CLCVER CLC 0(0,R1),=C'VER ' @V386298 00871000
CLCINDEX CLC 0(0,R1),=C'INDEX ' @V386298 00872000
EJECT 00873000
SPACE 3 00874000
*********************************** 00875000
* 00876000
* FINAL EXIT BACK TO DMKCFM OR DMKERM 00877000
* 00878000
*********************************** 00879000
SPACE 3 00880000
DS 0H @V386298 00881000
SPACE 2 00882000
EXIT8R1 SR R1,R1 NO DATA IN R0 AND R1 @V386298 00883000
SR R0,R0 NO DATA IN RO BUT DATA IN R1@V386298 00884000
EXIT8 ICM R0,B'1110',ID+3 LOAD MODULE ID (CSB) @V386298 00885000
CALL DMKERMSG GO TO ERROR MSG MODULE @V386298 00886000
* 00887000
* DMKERMSG WILL EXIT TO DMKCFM VIA SVC 16 00888000
* 00889000
SPACE 2 00890000
CSBMSG EQU * HERE TO PRINT COMMAND COMPLETED MESSAGE @V386298 00891000
LA R0,16 MSG LENGTH @V386298 00892000
LA R1,CMDMSG ADDRESS OF MSG @V386298 00893000
CALL DMKQCNWT,PARM=NORET @V386298 00894000
SPACE 2 00895000
CSBEXIT EQU * HERE TO EXIT @V386298 00896000
EXIT @V386298 00897000
EJECT 00898000
EJECT 00899000
*********************************** 00900000
* 00901000
* MESSAGES AND CONSTANTS 00902000
* 00903000
*********************************** 00904000
SPACE 2 00905000
CCWNAME CCW 9,0,CC+SILI,4 PRINT BUFFER NAME ON VERIFY @V386298 00906000
SPACE 2 00907000
CCW1403 CCW X'EB',0,CC,1 UCS GATE @V386298 00908000
CCW X'73',0,CC,1 BLOCK DATA CHECKS @V386298 00909000
CCW X'FB',0,CC,240 LOAD UCS BUFFER, NO FOLD @V386298 00910000
CCW X'04',0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00911000
CCW X'04',0,SKIP+SILI,1 DUMMY SENSE FILLER CCW @V386298 00912000
CCW 9,0,CC+SILI,60 VERIFY PRINT 1ST CCW @V386298 00913000
CCW 9,60,CC+SILI,60 VERIFY PRINT 2ND CCW @V386298 00914000
CCW 9,120,CC+SILI,60 VERIFY PRINT 3RD CCW @V386298 00915000
CCW 25,180,CC+SILI,60 VERIFY PRINT 4TH CCW AND @V386298 00916000
* 3 SPACES 00917000
SENSECCW EQU * @V386298 00918000
CCW 4,0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00919000
CCW 4,0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00920000
CCW 4,0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00921000
CCW 4,0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00922000
CCW 4,0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00923000
CCW 4,0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00924000
CCW 4,0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00925000
CCW X'1B',0,CC,1 SPACE 3 SO THAT OPERATOR @V386298 00926000
* CAN SEE 00927000
CCW X'04',0,SKIP+SILI,1 FORCE CONCURRENT CE+DE @V386298 00928000
SPACE 3 00929000
FCBCCW CCW X'63',0,CC+SILI,0 LOAD FORM CONTROL COMMAND @V386298 00930000
CCW 4,0,SKIP+SILI,1 SENSE TO FORCE CONCURRENT @V386298 00931000
* CE+DE 00932000
CCW X'0B',0,CC+SILI,1 SPACE CCW @V386298 00933000
CCW X'07',0,CC+SILI,1 DIAG GATE CCW (3211/3203) @V386298 00934000
CCW X'06',0,CC+SILI,1 READ FCB REGISTER ADDRESS @V386298 00935000
CCW X'04',0,SKIP+SILI,1 SENSE TO FORCE CONCURRENT @V386298 00936000
* CE+DE 00937000
SPACE 3 00938000
*********************************************************************** 00938100
* THE NEXT 3 CCWS HAVE THE SILI BIT ON SO THE PROCESSING OF IMMEDIATE * 00938200
* COMMANDS BY 3203 MODEL 5 WILL OCCUR. IT WILL NOT AFFECT MOD 4 PROC.* 00938300
*********************************************************************** 00938400
CCW3203 CCW X'73',0,CC+SILI,1 BLOCK DATA CHECKS @V60A6B6 00939000
CCW X'23',0,CC+SILI,1 UNFOLD CMD '43' FOLD CMD @V60A6B6 00940000
CCW X'FB',0,CC+SILI,304 LOAD UCS BUFFER @V60A6B6 00941000
CCW X'04',0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00942000
CCW X'04',0,SKIP+SILI,1 DUMMY SENSE FILLER CCW @V386298 00943000
CCW 9,0,CC+SILI,60 VERIFY PRINT FIRST CCW @V386298 00944000
CCW 9,60,CC+SILI,60 VERIFY PRINT SECOND CCW @V386298 00945000
CCW 9,120,CC+SILI,60 VERIFY PRINT THIRD CCW @V386298 00946000
CCW 25,180,CC+SILI,60 VERIFY PRINT FOURTH CCW AND @V386298 00947000
* SPACE 3 00948000
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @V386298 00949000
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @V386298 00950000
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @VA05566 00950500
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @VA05566 00950600
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @VA05566 00950700
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @VA05566 00950800
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @VA05566 00950900
*********************************************************************** 00950910
* THE NEXT CCW HAS THE SILI BIT TURNED ON FOR PROCESSING OF IMMEDIATE * 00950920
* COMMANDS BY THE 3203 MODEL 5. IT WILL NOT AFFECT MODEL 4 PROCESSING.* 00950930
*********************************************************************** 00950940
CCW X'1B',0,CC+SILI,1 SP 3 SO OPERATOR CAN SEE @V60A6B6 00951000
CCW X'04',0,SKIP+SILI,1 SENSE TO FORCE CONCURRENT @V386298 00952000
* CE+DE 00953000
SPACE 3 00954000
CCW3211 CCW X'73',0,CC,1 BLOCK DATA CHECKS @V386298 00955000
CCW X'23',0,CC,1 UNFOLD COMMAND '43' FOLD CMD@V386298 00956000
CCW X'FB',0,CC,512 LOAD UCSB BUFFER @V386298 00957000
CCW X'04',0,SKIP+SILI+CC,1 DUMMY SENSE FILLER CCW @V386298 00958000
CCW X'04',0,SKIP+SILI,1 DUMMY SENSE FILLER CCW @V386298 00959000
CCW 9,0,CC+SILI,48 VERIFY PRINT CCW 1 @V386298 00960000
CCW 9,48,CC+SILI,48 VERIFY PRINT CCW 2 @V386298 00961000
CCW 9,96,CC+SILI,48 VERIFY PRINT CCW 3 @V386298 00962000
CCW 9,144,CC+SILI,48 VERIFY PRINT CCW 4 @V386298 00963000
CCW 9,192,CC+SILI,48 VERIFY PRINT CCW 5 @V386298 00964000
CCW 9,240,CC+SILI,48 VERIFY PRINT CCW 6 @V386298 00965000
CCW 9,288,CC+SILI,48 VERIFY PRINT CCW 7 @V386298 00966000
CCW 9,336,CC+SILI,48 VERIFY PRINT CCW 8 @V386298 00967000
CCW 25,384,CC+SILI,48 VER PRINT CCW 9 AND SPACE 3 @V386298 00968000
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @V386298 00969000
CCW 4,0,CC+SKIP+SILI,1 DUMMY SENSE FILLER CCW @V386298 00970000
CCW X'1B',0,CC,1 SP 3 SO OPERATOR CAN SEE @V386298 00971000
CCW X'04',0,SKIP+SILI,1 SENSE TO FORCE CONCURRENT @V386298 00972000
* CE+DE 00973000
SPACE 3 00974000
CMDMSG DC C'COMMAND COMPLETE' @V386298 00975000
EJECT 00976000
LTORG 00977000
EJECT 00978000
PSA @V386298 00979000
COPY CONBUF @V386298 00980000
COPY DEVTYPES @V386298 00981000
COPY EQU @V386298 00982000
COPY IOBLOKS @V386298 00983000
COPY IOER @V386298 00984000
COPY RBLOKS @V386298 00985000
COPY SAVE @V386298 00986000
COPY SPOOL @V386298 00987000
COPY UDIRECT @V386298 00988000
COPY VBLOKS @V386298 00989000
COPY VMBLOK @V386298 00990000
IOBLOK DSECT CONTINUE THE IOBLOK @V386298 00991000
ORG , MAKE SURE WE'RE AT THE END @V386298 00992000
*** UCSBLOK - UCS/FCB WORK BLOK 00993000
* 00994000
SPACE 00995000
* USED BY DMKCSBLD 00996000
SPACE 00997000
* FOR 3203/3211 PRINTER UCS/FCB 00998000
SPACE 00999000
UCSREGS DS 2F SAVE REG AREA @V386298 01000000
UCSCCWS DS 0XL144 LENGTH ATTRIBUTE FOR MOVE @V386298 01001000
UCSBBLOK DS 1D BLOCK DATA CHECKS @V386298 01002000
UCSBFOLD DS 1D FOLD COMMAND @V386298 01003000
UCSBLOAD DS 1D LOAD UCSB CCW @V386298 01004000
UCSBNAME DS 1D PRINT BUFFER NAME CCW @V386298 01005000
UCSBVER DS 12D SPACE FOR 12 VERIFY CCWS @V386298 01006000
UCSBSPAC DS 1D CCW FOR SPACE 3 @V386298 01007000
UCSBLAST DS 1D DUMMY SENSE CCW @V386298 01008000
SPACE 01009000
XIOBSIZE EQU (*-IOBLOK)/8 SIZE IN DOUBLE WORDS @V386298 01010000
SPACE 3 01011000
* FOR 1403 UCS 01012000
SPACE 01013000
ORG UCSCCWS @V386298 01014000
UCSGATE DS 1D UCS GATE CCW @V386298 01015000
UCSBLOCK DS 1D BLOCK DATA CHECKS CCW @V386298 01016000
UCSLOAD DS 1D LOAD UCS CCS @V386298 01017000
SPACE 3 01018000
* FOR 3203/3211 FCB 01019000
SPACE 01020000
ORG UCSCCWS @V386298 01021000
FCBLOAD DS 1D LOAD FORMS CONTOL COMMAND @V386298 01022000
FCBLAST DS 1D FCB LAST CCW @V386298 01023000
FCB0B DS 1D SPACE COMMAND @V386298 01024000
FCB07 DS 1D DIAG GATE COMMAND @V386298 01025000
FCB06 DS 1D READ FCB REGISTER ADDRESS @V386298 01026000
FCB04 DS 1D DUMMY SENSE CCW @V386298 01027000
FCBADD DS 1X SPACE FOR FCB ADDRESS DATA @V386298 01028000
SPACE 4 01029000
EJECT 01030000
UCSHDR DSECT @V386298 01031000
SPACE 01032000
*** UCSHDR - UCS/FCB HEADER BLOCK 01033000
* 01034000
* +-------------------+---------+---------+ 01035000
* | HDRNAME | HDRNEXT | BUFLEN | 01036000
* +---------+---------+---------+---------+ 01037000
* | CCWDISP | CCWLEN | 01038000
* +---------+---------+ 01039000
* 01040000
*** UCSHDR - UCS/FCB HEADER BLOCK 01041000
* 01042000
* USE BY DMKCSBLD 01043000
SPACE 01044000
HDRNAME DS 1F NAME I.D. OF LOAD BUFFER UCS@V386298 01045000
HDRNEXT DS 1H DISPLACEMENT TO NEXT HEADER @V386298 01046000
BUFLEN DS 1H LENGTH OF THE LOAD BUFFER @V386298 01047000
CCWDISP DS 1H DISPLACEMENT TO VERIFY CCWS @V386298 01048000
CCWLEN DS 1H LENGTH OF THE VERIFY CCWS @V386298 01049000
ORG CCWLEN @V386298 01050000
FCBPNDEX DS 1X DEFAULT INDEX VALUE @V386298 01051000
FCBTNDEX DS 1X NEW INDEX VALUE @V386298 01052000
ORG 01053000
* 01054000
HDRSIZE EQU *-UCSHDR SIZE OF BLOCK IN BYTES @V386298 01055000
SPACE 4 01056000
END 01057000