ibm:vm370-lib:cp:dmkcsq.assemble_src
Table of Contents
DMKCSQ Source
References
- Fixes Applied : 1
- This Source Date : Thursday, December 14, 1978
- Last Fix ID : [R09957DK]
Source Listing
- DMKCSQ.ASSEMBLE.txt
- CSQ TITLE 'DMKCSQ (CP) VM/370 - RELEASE 6' 00001000
- ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
- *. 00003000
- * MODULE NAME - 00004000
- * 00005000
- * DMKCSQ 00006000
- * 00007000
- * FUNCTION - 00008000
- * 00009000
- * DMKCSQ CONTAINS THE SPOOLING COMMAND FUNCTIONS AVAILABLE TO 00010000
- * TO CLASS G USERS. SOME OF THE COMMANDS ARE ALSO PROCESSED 00011000
- * FOR CLASS D USERS IN A SLIGHTLY DIFFERENT FORMAT 00012000
- * 00013000
- * ATTRIBUTES - 00014000
- * 00015000
- * REENTRANT, PAGEABLE, CALLED VIA SVC 00016000
- * 00017000
- * ENTRY POINTS - 00018000
- * 00019000
- * DMKCSQCL - CLOSE COMMAND 00020000
- * DMKCSQHL - HOLD COMMAND 00021000
- * DMKCSQFR - FREE COMMAND 00022000
- * 00023000
- * ENTRY CONDITIONS - 00024000
- * 00025000
- * GPR9 = ADDRESS OF THE COMMAND LINE BUFFER; MUST BE PRESERVED 00026000
- * FOR CALLS TO DMKSCNFD 00027000
- * GPR12 = ADDRESS OF ENTRY POINT 00028000
- * GPR13 = ADDRESS OF SAVEAREA 00029000
- * 00030000
- * EXIT CONDITIONS - 00031000
- * 00032000
- * NORMAL - 00033000
- * GPR2 = 0 00034000
- * 00035000
- * ERROR - 00036000
- * 00037000
- * GPR2 = CONTAINS THE BINARY MESSAGE NUMBER 00038000
- * - EITHER AN OPTION IS ILLEGAL OR SOME CONDITION 00039000
- * EXISTS THAT MAKES IT IMPOSSIBLE TO EXECUTE THE COMMAND 00040000
- * A MESSAGE IS TYPED TO DESCRIBE THE ERROR; THE ERROR 00041000
- * MESSAGES THAT MAY OCCUR ARE LISTED WITH EACH COMMAND 00042000
- EJECT 00043000
- * 00044000
- * CALLS TO OTHER ROUTINES - 00045000
- * 00046000
- * DMKFREE - TO OBTAIN A BLOCK FROM FREE STORAGE 00047000
- * DMKFRET - TO RETURN STORAGE 00048000
- * DMKUDRFU - TO VERIFY A 'USERID' 00049000
- * DMKCSOSD - TO START RDR, PRINTER OR PUNCH 00050000
- * DMKSTKIO - TO STACK AN IOBLOK 00051000
- * DMKSCNVU - LOCATE A VDEVBLOK 00052000
- * DMKUDRRV - TO CLOSE THE DIRECTORY 00053000
- * DMKSCNFD - SCAN THE COMMAND LINE BUFFER FOR OPTIONS 00054000
- * DMKQCNWT - WRITE RESPONSE AND ERROR MESSAGES 00055000
- * DMKVSPCO - CLOSE (AND OPTIONALLY PURGE) OUTPUT SPOOL FILES 00056000
- * DMKVSPCR - CLOSE READER FILES 00057000
- * DMKSPLDL - DELETE PURGED FILES FROM THE SYSTEM 00058000
- * DMKCVTHB - CONVERT HEX ADDRESS OPTIONS TO BINARY 00059000
- * DMKCVTDB - CONVERT DECIMAL SPOOLID NUMBERS TO BINARY 00060000
- * DMKERMSG - WRITE ERROR MESSAGES 00061000
- * DMKCKSPL - CHECKPOINT THE BLOCKS 00062000
- * EXTERNAL REFERENCES - 00063000
- * 00064000
- * DMKRSPHQ - SPOOL HOLD QUEUE CHAIN ANCHOR 00065000
- * DMKRSPRD - (ARSPRD) READER FILE CHAIN ANCHOR 00066000
- * DMKRSPPR - (ARSPPR) PRINTER FILE CHAIN ANCHOR 00067000
- * DMKRSPPU - (ARSPPU) PUNCH FILE CHAIN ANCHOR 00068000
- * DMKRSPID - SYSTEM SPOOL ID COUNTER 00069000
- * DMKRSPDL - SPOOL DELETE CHAIN ANCHOR 00070000
- * DMKVIOIN - IOBIRA ADDRESS FOR IOBLOK 00071000
- * 00072000
- * TABLES / WORKAREAS - 00073000
- * 00074000
- * IOBLOK 00075000
- * 00076000
- * VDEVBLOK, VSPXBLOK, AND SFBLOKS ARE UPDATED OR DELETED 00077000
- * 00078000
- * THE SAVEWRK FIELDS IN THE STANDARD SAVEAREA ARE USED BY THE 00079000
- * OPTION PROCESSING SUBROUTINES FOR THE FOLLOWING VALUES - 00080000
- * 00081000
- * SAVEWRK1 - FILE OUTPUT CLASS (1 BYTE) 00082000
- * SAVEWRK1+1 - NUMBER OF COPIES (1 BYTE) 00083000
- * SAVEWRK1+2 - SPOOLID NUMBER (HALF-WORD) 00084000
- * SAVEWRK2,3 - USERID OF FILE'S OWNER 00085000
- * SAVEWRK4 - ADDRESS OF FNAME FTYPE (24 BYTES) 00086000
- * SAVEWRK5 - USE VARIES WITH COMMAND 00087000
- * SAVEWRK6,7 - SAVE AREA FOR R0,R1 SCAN OPTIONS 00088000
- * SAVEWRK8,9 - USE VARIES WITH COMMAND 00089000
- * 00090000
- * REGISTER USAGE - 00091000
- * 00092000
- * ALL SUBROUTINES IN THE MODULE CONFORM GENERALLY TO THIS USAGE; 00093000
- * ANY INDIVIDUAL DEVIATIONS OR EXTENSIONS ARE LISTED WITH THE 00094000
- * COMMAND DESCRIPTION 00095000
- * 00096000
- * GPR0 = LENGTH OF OPTION - RETURNED FROM DMKSCNFD 00097000
- * GPR1 = ADDRESS OF OPTION - RETURNED FROM DMKSCNFD 00098000
- * GPR2 = SCRATCH 00099000
- * GPR3 = INTERNAL LINKAGE - 2ND LEVEL 00100000
- * GPR4 = INTERNAL LINKAGE - 1ST LEVEL 00101000
- * GPR5 = DEVICE TYPE FLAGS - LOGICAL SUM OF TYPES 00102000
- * GPR6 = POINTER TO PREVIOUS SFBLOK ON CHAIN 00103000
- * GPR7 = SFBLOK BASE 00104000
- * GPR8 = VDEVBLOK BASE 00105000
- * GPR9 = INPUT COMMAND LINE ADDRESS 00106000
- * GPR10 = REMAINING DEVICE COUNT AND IOBLOK ADDRESS 00107000
- * GPR11 = VMBLOK BASE 00108000
- * GPR12 = DMKCSQ BASE 00109000
- * GPR13 = SAVEAREA BASE 00110000
- * GPR14 = EXTERNAL LINKAGE 00111000
- * GPR15 = EXTERNAL LINKAGE 00112000
- * 00113000
- * NOTES - 00114000
- * 00115000
- * NONE 00116000
- * 00117000
- * OPERATION - 00118000
- * 00119000
- * EACH COMMAND PROCESSOR IS ENTERED VIA A CALL FROM DMKCFM. THE 00120000
- * PROCESSING LOGIC IS EMBODIED IN A SERIES OF INTERNAL CALLS TO 00121000
- * A SET OF OPTION PROCESSORS AND LIST SCANNERS. IN GENERAL, 00122000
- * THE OPTION PROCESSORS ARE CALLED WHEN IT IS KNOWN, EITHER BY 00123000
- * POSITION OR KEYWORD, WHAT TYPE OF OPERAND MUST APPEAR NEXT ON 00124000
- * THE COMMAND LINE. THE OPTION PROCESSORS SCAN FOR THE NEXT 00125000
- * FIELD, VERIFY ITS VALIDITY, AND SET UP INFORMATION FOR USE BY 00126000
- * THE LIST SCANNERS. SINCE THE OPERATIONAL DESCRIPTION OF EACH 00127000
- * OF EACH COMMAND PROCESSOR REFERENCES THESE SUBROUTINES, A LIST 00128000
- * OF THEIR NAMES AND FUNCTIONS IS GIVEN HERE; A DESCRIPTION OF 00129000
- * THE OPERATIONAL LOGIC AND REGISTER SETS FOR EACH SUBROUTINE 00130000
- * APPEAR AT THE END OF THE MODULE 00131000
- * 00132000
- * OPTION PROCESSORS - 00133000
- * 1. GETUSER - SAVE THE USER ID OF THE FILE'S OWNER 00134000
- * 2. GETYPE - SAVE THE FILE TYPE (OR DEVICE TYPE) 00135000
- * 3. GETCOPY - LOCATE AND SAVE THE NUMBER OF COPIES REQUESTED 00136000
- * 4. GETNAME - LOCATE AND SAVE THE FILE NAME (AND TYPE) 00137000
- * 5. GETCLASS - LOCATE AND VERIFY THE CLASS REQUESTED (2ND LEVEL 00138000
- * ROUTINE) 00139000
- * 00140000
- * LIST SCANNING ROUTINES - 00141000
- * 1. GETDEVIC - LOCATE THE NEXT VDEVBLOK OF THE APPROPRIATE 00142000
- * ADDRESS, CLASS AND TYPE (2ND LEVEL ROUTINE) 00143000
- * 2. GETFILE - LOCATE THE NEXT FILE OF THE CORRECT CLASS, ID, 00144000
- * AND OWNER 00145000
- * 3. GETCHAIN - LOCATE THE NEXT FILE CHAIN TO SEARCH (2ND 00146000
- * LEVEL ROUTINE) 00147000
- * 00148000
- *. 00149000
- EJECT 00150000
- COPY OPTIONS 00151000
- SPACE 2 00152000
- COPY LOCAL OPTIONS 00153000
- DMKCSQ CSECT 00154000
- SPACE 3 00155000
- EXTRN DMKSCNVU,DMKSCNFD 00156000
- EXTRN DMKVSPCO,DMKVSPCR,DMKCVTHB 00157000
- EXTRN DMKCVTDB,DMKRSPHQ 00158000
- EXTRN DMKVIOIN,DMKSTKIO @VM01016 00159000
- EXTRN DMKCSOSD,DMKUDRFU,DMKERMSG 00160000
- EXTRN DMKUDRRV @V200930 00161000
- EXTRN DMKCKSPL @V304298 00162000
- SPACE 3 00163000
- USING PSA,R0 00164000
- USING SFBLOK,R7 00165000
- USING VDEVBLOK,R8 00166000
- USING BUFFER,R9 00167000
- USING VMBLOK,R11 00168000
- USING SAVEAREA,R13 00169000
- SPACE 2 00170000
- ID DC CL8'DMKCSQ' MODULE NAME 00171000
- EJECT 00172000
- *. 00173000
- * SUBROUTINE NAME - 00174000
- * 00175000
- * DMKCSQCL 00176000
- * 00177000
- * FUNCTION - 00178000
- * 00179000
- * TO CLOSE A VIRTUAL INPUT FILE, OR TO CLOSE A VIRTUAL OUTPUT 00180000
- * FILE. 00181000
- * 00182000
- * COMMAND LINE FORMAT - 00183000
- * 00184000
- * +-------+----------------------------------------------+ 00185000
- * | CLOSE | READER | 00186000
- * | C | VADDR <HOLD|NOHOLD> | 00187000
- * | | | 00188000
- * | | CONSOLE | 00189000
- * | | PRINTER <PURGE> | 00190000
- * | | PUNCH |<HOLD|NOHOLD>| | 00191000
- * | | VADDR |DIST DISTCODE|.....----- | 00192000
- * | | --<NAME FNAME <FTYPE>> | 00193000
- * | | <NAME DSNAME> | 00194000
- * +-------+----------------------------------------------+ 00195000
- * 00196000
- * READER PRINTER PUNCH CONSOLE HOLD NOHOLD 00197000
- * R RDR P PRT PU PCH CON HO NOH 00198000
- * 00199000
- * PURGE DIST NAME 00200000
- * PU DI NA 00201000
- * 00202000
- * 00203000
- * OPERATION - 00204000
- * 00205000
- * 1. CALL GETYPE; IF TYPE = ALL, EXIT GIVING 00206000
- * ERROR MSG006E. 00207000
- * IF MISSING OR INVALID, EXIT GIVING MSG022E. 00208000
- * 2. CL01- CALL DMKSCNFD TO LOCATE NEXT OPTION: 00209000
- * IF NONE, GO TO STEP 8. 00210000
- * 3. CL02- IF OUTPUT DEVICE, GO TO STEP 4. 00211000
- * IF OPTION = 'HOLD' AND/OR 'NOHOLD' SET FLAG IN 00212000
- * SAVEWRK1 AND GO TO STEP 2. 00213000
- * OTHERWISE, EXIT GIVING ERROR MSG003E. 00214000
- * 4. CL03- IF OPTION = 'PURGE' SET FLAG IN SAVEWRK1 00215000
- * AND GO TO STEP 8. 00216000
- * 5. CL04,CL06- IF OPTION = 'HOLD' AND/OR 'NOHOLD' SET 00217000
- * FLAG IN SAVEWRK1 AND GO TO STEP 2. 00218000
- * 6. CL05- IF OPTION = 'DIST', CALL DMKSCNFD TO LOCATE 00219000
- * DIST-CODE: IF NONE OR INVALID, EXIT GIVING MSG032E. 00220000
- * IF DIST-CODE VALID, SAVE IN SAVEWRK8,9 AND GO TO 00221000
- * STEP 8. 00222000
- * 7. IF OPTION = 'NAME', CLASS GETNAME: OTHERWISE EXIT 00223000
- * GIVING MSG003E 00224000
- * 8. CL-8,CL09,CL10,CL11- LOCATE SPOOL CONTROL AND SPOOL 00225000
- * FILE BLOCKS- IF INPUT DEVICE, GO TO STEP 9. 00226000
- * SET NEW INFORMATION IN SPOOL FILE BLOK. 00227000
- * IF OUTPUT SPOOL CONTINOUS (VDEVCP), GO TO STEP 10: 00228000
- * OTHERWISE, CALL DMKVSPCO TO CLOSE FILE AND 00229000
- * GO TO STEP 10. 00230000
- * 9. CLOSERDR- CALL DMKVSPCR TO CLOSE READER. 00231000
- * 10. IF TYPE = VADDR, EXIT. OTHERWISE CALL GETDEVIC 00232000
- * AND GO TO STEP 8. 00233000
- * 00234000
- * RESPONSE - 00235000
- * 00236000
- * PRT TO 00237000
- * PUN FILE NNNN FOR USERID COPY NN NOHOLD 00238000
- * CON FROM HOLD 00239000
- * 00240000
- * 00241000
- * ERROR MESSAGES - 00242000
- * 00243000
- * DMKCSQ003E INVALID OPTION - (OPTION) 00244000
- * DMKCSQ006E INVALID DEVICE TYPE - (ADDR) 00245000
- * DMKCSQ013E CONFLICTING OPTION - (OPTION) 00246000
- * DMKCSQ022E VADDR MISSING OR INVALID 00247000
- * DMKCSQ029E FNAME FTYPE MISSING OR INVALID 00248000
- * DMKCSQ032E DISTCODE MISSING OR INVALID 00249000
- * DMKCSQ040E DEV (ADDR) DOES NOT EXIST 00250000
- *. 00251000
- EJECT 00252000
- SPACE 3 00253000
- DMKCSQCL RELOC 00254000
- SPACE 00255000
- USING VSPLCTL,R9 00256000
- SPACE 00257000
- BAL R4,CLEAR CLEAR SAVEWRK1,2-9 00258000
- MVC SAVEWRK8(8),BLANKS PUT BLANKS IN DIST AREA 00259000
- SR R6,R6 INDICATE POSSIBLE VADDR 00260000
- BAL R4,GETYPE GET DEVICE TYPE @V200930 00261000
- EX R5,CLIALL TYPE = ALL ?? 00262000
- BE MSG006E YES - INVALID TYPE 00263000
- SPACE 00264000
- CL01 EQU * 00265000
- CALL DMKSCNFD LOCATE NEXT OPTION 00266000
- BNZ CL08 NONE -- GO PROCESS 00267000
- SPACE 00268000
- LR R14,R0 COUNT 00269000
- BCTR R14,0 -1 00270000
- C R0,F2 COUNT OF 1 00271000
- BL MSG003E INVALID OPTION 00272000
- BE CL02 -- 00273000
- EX R14,CLCNOHLD NOHOLD ?? 00274000
- BNE CL02 NO -- 00275000
- TM SAVEWRK1,SFBNOHLD+SFBHOLD OPTION ERROR ? 00276000
- BNZ MSG013E YES -- CONFLICTING OPTION 00277000
- OI SAVEWRK1,SFBNOHLD SET NOHOLD 00278000
- B CL01 GET NEXT - 00279000
- SPACE 00280000
- CL02 EQU * 00281000
- EX R14,CLCHOLD HOLD ?? 00282000
- BNE CL03 NO, TEST NEXT OPTION @V200930 00283000
- TM SAVEWRK1,SFBNOHLD+SFBHOLD HOLD OR NOHOLD ?? 00284000
- BNZ MSG013E YES -- CONFLICTING OPTION 00285000
- OI SAVEWRK1,SFBHOLD SET HOLD ?? 00286000
- B CL01 GET NEXT 00287000
- SPACE 00288000
- CL03 DS 0H @V200930 00289000
- EX R14,CLCPURG PURGE ?? 00290000
- BNE CL04 NO - 00291000
- TM VDEVTYPC,CLASURI IS IT A READER ?? @V200930 00292000
- BO MSG003E YES, INVALID OPTION @V200930 00293000
- TM SAVEWRK1+1,VDEVPURG PURGE ALL READY SET ?? 00294000
- BO MSG013E YES -- CONFLICTING OPTION 00295000
- OI SAVEWRK1+1,VDEVPURG SAVE IT 00296000
- CLI SAVEWRK1,X'00' HOLD OR NOHOLD OPTIONS ?? 00297000
- BNE MSG003E INVALID OPTION 00298000
- CLI SAVEWRK8,C' ' DIST CODE PRESENT ?? 00299000
- BNE MSG003E YES -- INVALID OPTION 00300000
- B CL08 GO - PROCESS 00301000
- SPACE 00302000
- CL04 EQU * 00303000
- TM SAVEWRK1+1,VDEVPURG PURGE OPTION PRESENT ?? 00304000
- BO MSG003E YES - INVALID OPTION 00305000
- EX R14,CLCDIST DISTRIBUTION ?? 00306000
- BNE CL07 NO, TEST FOR NAME @V200930 00307000
- CLI SAVEWRK8,X'40' DIST CODE PRESENT ?? 00308000
- BH MSG013E YES -- CONFLICTING OPTION 00309000
- CALL DMKSCNFD GET DIST CODE 00310000
- BNZ MSG032E DIST CODE MISSING 00311000
- C R0,F8 OVER MAX LENGTH 00312000
- BH MSG032E YES - INVALID 00313000
- LR R14,R0 COUNT 00314000
- BCTR R14,0 -1 00315000
- EX R14,MVCDIST SAVE DISTCODE 00316000
- B CL01 00317000
- SPACE 00318000
- CL07 EX R14,CLCNAME NAME ?? 00319000
- BNE MSG003E NO - INVALID OPTION 00320000
- BAL R4,GETNAME GET FILE NAME TYPE @V200930 00321000
- SPACE 00322000
- CL08 EQU * 00323000
- CALL DMKSCNFD 00324000
- BZ MSG003E TOO MANY OPTIONS 00325000
- CL08A EQU * 00326000
- L R9,VDEVSPL POINTER TO VSPLCTL BLOK 00327000
- LTR R9,R9 VALID ADDRESS 00328000
- BZ CL12 NO -- DO NEXT 00329000
- L R7,VSPSFBLK ADDRESS OF SPOOL FILE BLOK 00330000
- LTR R7,R7 FILE BLOK PRESENT ?? 00331000
- BZ CL10 NO -- CLEAR VSPLCTL BLOK 00332000
- SPACE 00333000
- L R14,SAVEWRK4 ADDRESS OF NEW FNAME FTYPE 00334000
- LTR R14,R14 ONE PRESENT ?? 00335000
- BZ *+10 NO -- 00336000
- MVC SFBFNAME(24),0(R14) MOVE NEW NAME TO SFBLOK 00337000
- CLI SAVEWRK8,C' ' NEW DIST CODE PRESENT ?? 00338000
- BE CL08B NO -- 00339000
- MVC SFBDIST(8),SAVEWRK8 MOVE IN NEW DIST CODE 00340000
- CL08B TM SAVEWRK1,SFBNOHLD NOHOLD TO BE SET ?? 00341000
- BZ CL09 NO - 00342000
- OI SFBFLAG2,SFBNOHLD YES - SET NOHOLD 00343000
- NI SFBFLAG2,X'FF'-SFBHOLD RESET HOLD - 00344000
- B CL10 00345000
- SPACE 00346000
- CL09 EQU * 00347000
- TM SAVEWRK1,SFBHOLD HOLD TO BE SET 00348000
- BZ CL10 NO - 00349000
- OI SFBFLAG2,SFBHOLD SET HOLD BIT 00350000
- NI SFBFLAG2,X'FF'-SFBNOHLD RESET NOHOLD BIT 00351000
- SPACE 00352000
- CL10 EQU * 00353000
- L R1,=C'CLOS' PARM REG FOR DMKVSP @VA01460 00354000
- TM VDEVTYPC,CLASURI INPUT DEVICE ?? 00355000
- BO CLOSERDR YES -- CLOSE READERS 00356000
- TM SAVEWRK1+1,VDEVPURG IS PURGE FLAG TO BE SET 00357000
- BZ CL11 NO - 00358000
- LA R2,VDEVPURG PURGE ACTIVE FILE @VA01460 00359000
- B CL11A GO CLOSE AND PURGE @V200930 00360000
- SPACE 00361000
- CL11 EQU * 00362000
- TM VDEVSFLG,VDEVCONT CONT OUTPUT ?? @V200930 00363000
- BO CL12 YES -- DO NOT CLOSE 00364000
- SR R2,R2 NO PARMS @VA01460 00365000
- CL11A SL R8,VMDVSTRT VDEVBLOK DISPLACEMENT @VA01460 00366000
- CALL DMKVSPCO CALL OUTPUT CLOSE ROUTINE 00367000
- AL R8,VMDVSTRT VDEVBLOK ADDRESS @VA01460 00368000
- B CL12 -- 00369000
- SPACE 00370000
- CLOSERDR SL R8,VMDVSTRT VDEVBLOK DISPLACEMENT @VA01460 00371000
- CALL DMKVSPCR CLOSE READER @VA01460 00372000
- AL R8,VMDVSTRT VDEVBLOK ADDRESS @VA01460 00373000
- SPACE 00374000
- CL12 EQU * 00375000
- LTR R5,R5 VADDR ?? 00376000
- BZ CL13 YES - EXIT 00377000
- BAL R3,GETDEVIC GET NEXT DEVICE @V200930 00378000
- LTR R10,R10 ALL DONE ?? 00379000
- BNZ CL08A NO - DO NEXT DEVICE 00380000
- SPACE 00381000
- CL13 B CSQEXIT 00382000
- EJECT 00383000
- *. 00384000
- * SUBROUTINE NAME - 00385000
- * 00386000
- * DMKCSQHL 00387000
- * 00388000
- * FUNCTION - 00389000
- * 00390000
- * TO HOLD THE PRINTER, PUNCH OR BOTH QUEUES FOR A PARTICULAR 00391000
- * USER. THE COMMAND APPLIES TO CURRENT CLOSE SPOOL FILES 00392000
- * AND IS ALSO REMEMBERED TO FILES AS THEY ARE CLOSED. 00393000
- * THE FILES AND HOLD STATUS CAN BE RESET WITH THE FREE 00394000
- * COMMAND. THIS IS A CLASS D COMMAND. 00395000
- * 00396000
- * COMMAND LINE FORMAT - 00397000
- * 00398000
- * +------+-----------------+ 00399000
- * | HOLD | USERID PRINTER | 00400000
- * | HO | PUNCH | 00401000
- * | | ALL | 00402000
- * | | --- | 00403000
- * +------+-----------------+ 00404000
- * 00405000
- * PRINTER PUNCH ALL 00406000
- * P PRT PU PCH ALL 00407000
- * 00408000
- * 00409000
- * OPERATION - 00410000
- * 00411000
- * 1. CALL GETUSER 00412000
- * 2. CALL GETYPE: IF READER OR VADDR, EXIT GIVING 00413000
- * ERROR MSG006E. 00414000
- * 3. IF TYPE = 'ALL', CALL GETCHAIN. 00415000
- * 4. HL01A- LOCATE SPOOL HOLD QUEUE BLOK FOR 00416000
- * THIS USER ON (DMKRSPHQ) CHAIN. IF NONE, 00417000
- * CREATE AND CHAIN BLOK TO CHAIN. 00418000
- * SET SHQFLAG FOR THIS DEVICE. 00419000
- * 5. CALL GETFILE: IF NONE, GO TO STEP 6. 00420000
- * SET SFBSHOLD FLAG IN SPOOL FILE FLOK AND GO TO STEP 5. 00421000
- * 6. CALL GETCHAIN: IF ALL DONE, EXIT: OTHERWISE, GO TO STEP 5. 00422000
- * 00423000
- * RESPONSE - 00424000
- * 00425000
- * NONE 00426000
- * 00427000
- * ERROR MESSAGES - 00428000
- * 00429000
- * 00430000
- * DMKCSQ006E INVALID DEVICE TYPE - (ADDR) 00431000
- * DMKCSQ007E INVALID USERID - (USERID) 00432000
- * DMKCSQ020E USERID MISSING OR INVALID 00433000
- * DMKCSQ053E (USERID) NOT IN CP DIRECTORY 00434000
- *. 00435000
- SPACE 3 00436000
- DMKCSQHL RELOC 00437000
- SPACE 00438000
- BAL R4,CLEAR CLEAR SAVEWRK1,2-9 00439000
- BAL R4,GETUSER GET USERID @V200930 00440000
- SPACE 00441000
- L R6,FFS INDICATE NO VADDR POSSIBLE AND 00442000
- * DO NOT GET VDEVBLOK ADDRESS 00443000
- BAL R4,GETYPE GET DEVICE TYPE @V200930 00444000
- LTR R5,R5 TYPE = VADDR ?? 00445000
- BZ MSG006E YES INVALID 00446000
- EX R5,TMCON TYPE EQUAL CONSOLE? @VA05854 00447000
- BO MSG006E YES, INVALID @VA05854 00448000
- SPACE 00449000
- EX R5,TMRDR TYPE = READER ?? 00450000
- BZ HL01 NO 00451000
- EX R5,CLIALL TYPE = ALL ?? 00452000
- BE *+8 YES 00453000
- B MSG006E INVALID TYPE 00454000
- * 00455000
- * USE GETCHAIN TO TURN OFF RDR BIT 00456000
- * 00457000
- BAL R3,GETCHAIN GET NEXT FILE IN CHAIN @V200930 00458000
- SPACE 00459000
- HL01 EQU * 00460000
- EJECT 00461000
- USING SHQBLOK,R1 00462000
- SPACE 00463000
- L R2,=A(DMKRSPHQ) ADDRESS OF SPOOL HOLD QUEUE POINTER 00464000
- SPACE 00465000
- * 1ST TIME 2ND TO LAST TIME 00466000
- * COMMENTS COMMENTS 00467000
- SPACE 00468000
- SHQLP L R1,0(R2) 1ST SHQBLOK NEXT SHQBLOK 00469000
- * ADDRESS ADDRESS 00470000
- LTR R1,R1 LIST EMPTY ?? END OF LIST ?? 00471000
- BZ BUILDSHQ YES YES 00472000
- SPACE 00473000
- * SEARCH THE LIST FOR BLOK WITH THIS USER'S ID 00474000
- SPACE 00475000
- CLC SAVEWRK2(8),SHQUSER SHQBLOK BELONG TO THIS USER ?? 00476000
- BE SHQEQUAL YES 00477000
- LR R2,R1 SAVE SHQBLOK ADDRESS 00478000
- B SHQLP TRY NEXT BLOK 00479000
- SPACE 00480000
- BUILDSHQ EQU * BUILD SHQBLOK FOR THIS USER 00481000
- LA R0,SHQBSIZE LENGTH IN DOUBLE WORDS 00482000
- SPACE 00483000
- CALL DMKFREE GET STORAGE FOR BLOK 00484000
- SPACE 00485000
- ST R1,0(R2) CHAIN LAST BLOK TO THIS NEW BLOK 00486000
- XC SHQBLOK(SHQBSIZE*8),SHQBLOK CLEAR TO ZEROES 00487000
- MVC SHQUSER(8),SAVEWRK2 MOVE USER ID TO SHQBLOK 00488000
- SPACE 00489000
- SHQEQUAL EQU * 00490000
- EX R5,OISUSER SET TYPE FLAGS FOR SYSTEM HOLDING 00491000
- * USER 00492000
- CALL DMKCKSPL,PARM=CHGSHQ+CHGSFB @V304298 00493000
- SPACE 00494000
- HL02 EQU * 00495000
- LR R9,R7 SAVE CHAIN ANCHOR @V304298 00496000
- HL02A DS 0H @V304298 00497000
- BAL R4,GETFILE GET NEXT SPOOL FILE @V200930 00498000
- LTR R7,R7 MORE FILES THIS CHAIN ?? 00499000
- BZ HL03 NO TRY NEXT CHAIN 00500000
- SPACE 00501000
- * HERE TO SET HOLD FLAGS IN SFBLOK 00502000
- SPACE 00503000
- OI SFBFLAG,SFBSHOLD SET CLASS D USER HOLDING USER FILE 00504000
- CALL DMKCKSPL,PARM=CHGSFB CHECKPOINT @V304298 00505000
- LR R2,R7 SAVE CURRENT SFBLOK @V304298 00506000
- LR R7,R9 RESTORE ANCHOR @V304298 00507000
- HL02B L R7,0(R7) NEXT SFBLOK @V304298 00508000
- LTR R7,R7 ANY MORE? @V304298 00509000
- BZ HL03 XFER IF NOT @V304298 00510000
- CR R7,R2 IS THIS THE CURRENT ONE? @V304298 00511000
- BE HL02A XFER IF SO @V304298 00512000
- B HL02B TRY AGAIN @V304298 00513000
- SPACE 00514000
- HL03 EQU * 00515000
- BAL R3,GETCHAIN GET NEXT FILE CHAIN @V200930 00516000
- SPACE 00517000
- HL04 LTR R6,R6 ALL DONE ?? 00518000
- BNZ HL02 NO - DO PUNCH CHAIN 00519000
- B CSQEXIT 00520000
- SPACE 00521000
- * ***EXECUTED INSTRUCTIONS*** 00522000
- OISUSER OI SHQSHOLD,X'00' SET TYPE BITS IN SYSTEM HOLD OF 00523000
- * SHQBLOK 00524000
- SPACE 00525000
- EJECT 00526000
- *. 00527000
- * SUBROUTINE NAME - 00528000
- * 00529000
- * DMKCSQFR 00530000
- * 00531000
- * FUNCTION - 00532000
- * 00533000
- * TO FREE PREVIOUSLY HELD SPOOLING FILES. FILES MAY BE 00534000
- * FREED BY FILE TYPE. THIS IS A CLASS D COMMAND. 00535000
- * 00536000
- * COMMAND LINE FORMAT - CLASS D 00537000
- * 00538000
- * +---------+------------------+ 00539000
- * | FREE | USERID PRINTER | 00540000
- * | FR | PUNCH | 00541000
- * | | ALL | 00542000
- * | | --- | 00543000
- * +---------+------------------+ 00544000
- * 00545000
- * PRINTER PUNCH ALL 00546000
- * P PRT PU PCH ALL 00547000
- * 00548000
- * OPERATION - 00549000
- * 1. CALL GETUSER 00550000
- * 2. CALL GETYPE: IF TYPE = VADDR OR READER, EXIT GIVING 00551000
- * ERROR MSG006E. 00552000
- * IF TYPE = ALL OR NONE, CALL GETCHAIN. 00553000
- * 3. FR01- CALL GETFILE- IF NONE, GO TO STEP 4. 00554000
- * RESET SFBSHOLD FLAG IN SFBLOK AND GO TO STEP 3. 00555000
- * 4. LOCATE SPOOL HOLD QUEUE BLOK FOR THIS USER: 00556000
- * IF NONE, GO TO STEP 6. 00557000
- * RESET THE SHQSHOLD FLAG FOR THIS DEVICE TYPE. 00558000
- * IF SHQFLAG = ZERO, UNCHAIN THE SHQBLOK AND CALL 00559000
- * DMKFRET TO FRET THE BLOK. 00560000
- * 5. IF TYPE NOT = TO 'ALL' GO TO STEP 6. 00561000
- * OTHERWISE, CALL GETCHAIN: IF NOT LAST CHAIN, GO TO 00562000
- * STEP 3. 00563000
- * 6. CALL DMKCSOSD - TO GIVE DEVICE END INTERRUPT IF 00564000
- * DEVICE NOT ACTIVE AND EXIT. 00565000
- * 00566000
- * 00567000
- * RESPONSE - 00568000
- * 00569000
- * NONE 00570000
- * 00571000
- * ERROR MESSAGES - 00572000
- * 00573000
- * 00574000
- * DMKCSQ006E INVALID DEVICE TYPE - (ADDR) 00575000
- * DMKCSQ007E INVALID USERID - (USERID) 00576000
- * DMKCSQ020E USERID MISSING OR INVALID 00577000
- * DMKCSQ053E (USERID) NOT IN CP DIRECTORY 00578000
- *. 00579000
- EJECT 00580000
- DMKCSQFR RELOC 00581000
- SPACE 00582000
- BAL R4,CLEAR CLEAR SAVEWRK1,2-9 00583000
- BAL R4,GETUSER GET USERID @V200930 00584000
- L R6,FFS INDICATE NO VADDR POSSIBLE 00585000
- * AND DO NOT GET VDEVBLOK ADDRESS 00586000
- BAL R4,GETYPE GET DEVICE TYPE @V200930 00587000
- LTR R5,R5 TYPE = VADDR ?? 00588000
- BZ MSG006E YES INVALID 00589000
- EX R5,TMCON TYPE EQUAL CONSOLE? @VA05139 00590000
- BO MSG006E YES, INVALID @VA05139 00591000
- EX R5,CLIALL TYPE = ALL ?? 00592000
- BNE TSTRDR NO TEST FOR READER TYPE 00593000
- BAL R3,GETCHAIN GET NEXT FILE CHAIN @V200930 00594000
- SPACE 00595000
- TSTRDR EX R5,TMRDR TYPE = READER ?? 00596000
- BO MSG006E YES INVALID 00597000
- STC R5,SAVEWRK9+1 SAVE TYPE MASK 00598000
- FR01 EQU * 00599000
- LR R9,R7 SSAVE CURRENT ANCHOR @V304298 00600000
- FR01A DS 0H @V304298 00601000
- BAL R4,GETFILE GET NEXT SPOOL FILE @V200930 00602000
- LTR R7,R7 SFBLOK PRESENT ?? 00603000
- BZ FR03 NO - DO SHQBLOKS 00604000
- FR02 NI SFBFLAG,X'FF'-SFBSHOLD RESET USER 'SYSTEM HOLD' FLAG 00605000
- CALL DMKCKSPL,PARM=CHGSFB CHECKPOINT @V304298 00606000
- LR R2,R7 SAVE CURRENT SFBLOK @V304298 00607000
- LR R7,R9 RESTORE ANCHOR @V304298 00608000
- FR02A L R7,0(R7) NEXT SFBLOK @V304298 00609000
- LTR R7,R7 ANY MORE? @V304298 00610000
- BZ FR03 XFER IF NOT @V304298 00611000
- CR R2,R7 IS THIS THE CURRENT ONE? @V304298 00612000
- BE FR01A XFER IF SO @V304298 00613000
- B FR02A TRY AGAIN @V304298 00614000
- SPACE 00615000
- USING SHQBLOK,R1 00616000
- FR03 L R2,=A(DMKRSPHQ) ADDRESS OF SPOOL HOLD QUEUE POINTER 00617000
- LA R14,255 SET TO X'FF' 00618000
- SR R14,R5 'NI' MASK TO RESET FLAGS IN SHQBLOK 00619000
- NEXTSHQ L R1,0(R2) SHQBLOK ADDRESS 00620000
- LTR R1,R1 LAST ENTRY ?? 00621000
- BZ FR04A YES @V304298 00622000
- CLC SAVEWRK2(8),SHQUSER BLOK FOR THIS USER OR USERID 00623000
- BE SHQEQ YES 00624000
- LR R2,R1 SET BASE TO NEXT BLOK 00625000
- B NEXTSHQ TEST THIS BLOK 00626000
- SPACE 00627000
- SHQEQ EX R14,NIUSYS RESET SHQBLOK SYSTEM HOLD 00628000
- SPACE 00629000
- L R14,SHQFLAGS LOAD FLAGS 00630000
- LTR R14,R14 ALL FLAGS EQUAL TO ZERO ?? 00631000
- BNZ FR04 NO TEST FOR OTHER CHAIN 00632000
- SPACE 00633000
- MVC 0(4,R2),SHQPNT UNCHAIN CURRENT SHQBLOK 00634000
- CALL DMKCKSPL,PARM=CHGSHQ+DELSFB CHECKPOINT @V304298 00635000
- LA R0,SHQBSIZE LOAD SIZE OF BLOK IN DOUBLE WORDS 00636000
- CALL DMKFRET FREE BLOK 00637000
- B FR04A CONTINUE @V304298 00638000
- SPACE 00639000
- FR04 EQU * 00640000
- CALL DMKCKSPL,PARM=CHGSHQ+CHGSFB CHECKPOINT @V304298 00641000
- FR04A DS 0H @V304298 00642000
- BAL R3,GETCHAIN GET NEXT FILE CHAIN @V200930 00643000
- SPACE 00644000
- LTR R6,R6 LAST FILE ?? 00645000
- BNZ FR01 00646000
- SPACE 00647000
- FR05 EQU * 00648000
- IC R5,SAVEWRK9+1 GET TYPE MASK 00649000
- CALL DMKCSOSD CALL START ROUTINE TO GIVE INTERRUPT 00650000
- B CSQEXIT 00651000
- SPACE 3 00652000
- * ***EXECUTED INSTRUCTIONS*** 00653000
- NIUSYS NI SHQSHOLD,X'00' RESET USER 'SYSTEM HOLD' FLAG 00654000
- CLIALL CLI =AL1(CSQRDR+TYPPRT+TYPPUN),X'00' MASK = READER PRINTER 00655000
- * PUNCH 00656000
- TMRDR TM =AL1(CSQRDR),X'00' MASK = READER 00657000
- TMPRT TM =AL1(TYPPRT),X'00' MASK = PRINTER 00658000
- TMPUN TM =AL1(TYPPUN),X'00' MASK = PUNCH 00659000
- TMTYPE TM VDEVTYPE,X'00' TEST VDEV TYPE 00660000
- TMCON TM =AL1(CSQCON),X'00' MASK = CONSOLE 00661000
- EJECT 00662000
- *. 00663000
- **************************************** 00664000
- * 00665000
- * SUBROUTINES 00666000
- * 00667000
- **************************************** 00668000
- * 00669000
- * 00670000
- * 00671000
- * OPERATION OF GETUSER - 00672000
- * 00673000
- * 1. CALL DMKSCNFD TO LOCATE USERID: 00674000
- * IF NONE, EXIT GIVING ERROR MSG020E. 00675000
- * 2. CALL DMKUDRFU: VERIFY USERID. 00676000
- * IF INVALID, EXIT GIVING ERROR MSG007E 00677000
- * IF NOT IN CP DIRECTORY, EXIT GIVING ERROR MSG053E 00678000
- * 3. MOVE USERID TO SAVEWRK2,3 AND RETURN TO CALLER. 00679000
- *. 00680000
- SPACE 3 00681000
- GETUSER EQU * HERE TO MOVE USERID TO SAVEWRK2,3 00682000
- SPACE 00683000
- GU01 EQU * 00684000
- CALL DMKSCNFD LOCATE USERID 00685000
- BNZ MSG020E USERID MISSING 00686000
- C R0,F8 LENGTH GREATER THAN 8 ? 00687000
- BH MSG007E YES -- INVALID USERID 00688000
- SPACE 00689000
- GU02 MVC SAVEWRK2(8),BLANKS BLANK ID AREA 00690000
- SR R2,R2 PARM REG 00691000
- CALL DMKUDRFU VERIFY USER 00692000
- BNZ MSG053E USERID NOT IN DIRECTORY 00693000
- GU03 LR R14,R0 COUNT 00694000
- BCTR R14,0 -1 00695000
- EX R14,MVCID MOVE USER ID FROM COMMAND LINE TO 00696000
- * SAVEWRK2,3 00697000
- BR R4 RETURN TO CALLER 00698000
- SPACE 00699000
- MVCID MVC SAVEWRK2(0),0(R1) ***EXECUTED*** 00700000
- SPACE 3 00701000
- CLEAR XC SAVEWRK2(32),SAVEWRK2 CLEAR SAVEWRK AREA 00702000
- XC SAVEWRK1(4),SAVEWRK1 00703000
- BR R4 RETURN TO CALLER 00704000
- EJECT 00705000
- *. 00706000
- * 00707000
- * OPERATION OF GETYPE - 00708000
- * 00709000
- * 1. CALL DMKSCNFD TO LOCATE DEVICE TYPE FIELD 00710000
- * 2. IF OPTION='READER','PRINTER','PUNCH','CONSOLE','ALL' ; SET 00711000
- * GPR5 = APPROPRIATE DEVICE TYPE. IF OPTION = 'ALL', SET 00712000
- * GPR5 EQUAL TO CSQRDR+TYPPRT+TYPPUN; THEN, GO TO STEP 4 00713000
- * IF MISSING OR INVALID AND COMMAND IS SPOOL OR CLOSE, 00714000
- * EXIT GIVING MSG022E. 00715000
- * 3. IF OPTION = VADDR, CALL DMKSCNVU TO LOCATE THE VDEVBLOK, 00716000
- * SET GPR5 AND GPR10 = 0, AND EXIT 00717000
- * 4. IF TYPE WAS NOT VADDR, LOAD GPR8 WITH VMDVSTRT-VDEVSIZE, 00718000
- * AND GPR10 WITH VMDVCNT, AND CALL GETDEVIC TO LOCATE THE 00719000
- * FIRST DEVICE OF THE CORRECT TYPE 00720000
- * 5. SET GPR6 TO FFS, CALL GETCHAIN (GPR6 WILL BE FILLED BY 00721000
- * GETCHAIN WITH THE APPROPRIATE FILE CHAIN ANCHOR) 00722000
- * 6. EXIT 00723000
- *. 00724000
- SPACE 3 00725000
- GETYPE EQU * 00726000
- SPACE 00727000
- GT01 LA R5,CSQRDR+TYPPRT+TYPPUN SET FOR ALL TYPE 00728000
- CALL DMKSCNFD LOCATE DEVICE TYPE FIELD 00729000
- STM R0,R1,SAVEWRK6 SAVE COUNT AND ADDRESS OF TYPE 00730000
- BZ GT02 -- 00731000
- LTR R6,R6 VIRTUAL ADDRESS POSSIBLE ?? 00732000
- BZ MSG022E YES -- VADDR MISSING 00733000
- B DEVIC NO OPTION DEFAULT TO ALL 00734000
- SPACE 00735000
- GT02 EQU * 00736000
- * GPR1 ADDRESS OF TYPE 00737000
- LR R14,R0 GET OPTION COUNT 00738000
- BCTR R14,0 -1 00739000
- C R0,F2 COUNT LENGTH OF 2 00740000
- BE GT02A VALID FOR PUNCH 00741000
- BL GT02B VALID FOR READER PRINTER 00742000
- EX R14,CLCALL ALL ?? 00743000
- BE DEVIC YES 00744000
- LA R5,CSQCON SET R5 TO CONSOLE TYPE 00745000
- EX R14,CLCCONS CONSOLE ?? 00746000
- BE DEVIC YES -- 00747000
- LA R5,CSQRDR SET R5 TO READER TYPE 00748000
- EX R14,CLCRDR RDR ?? 00749000
- BE DEVIC YES 00750000
- LA R5,TYPPRT PRINTER MASK 00751000
- EX R14,CLCPRT PRT ?? 00752000
- BE DEVIC YES - 00753000
- SPACE 00754000
- LA R5,TYPPUN SET GPR5 TO PUNCH TYPE 00755000
- EX R14,CLCPCH PCH ?? 00756000
- BE DEVIC YES 00757000
- GT02A LA R5,TYPPUN PUNCH MASK 00758000
- EX R14,CLCPUN PUNCH ?? 00759000
- BE DEVIC YES - 00760000
- SPACE 00761000
- GT02B LA R5,TYPPRT SET GPR5 TO PRINTER TYPE 00762000
- EX R14,CLCPRINT PRINTER ?? 00763000
- BE DEVIC YES - 00764000
- SPACE 00765000
- LA R5,CSQRDR TYPE MASK FOR READER 00766000
- EX R14,CLCREAD READER ?? 00767000
- BE DEVIC 00768000
- LTR R6,R6 POSSIBLE VADDR ?? 00769000
- BZ GT03 YES -- 00770000
- B MSG006E NO -- ERROR DMKCSQ006E 00771000
- SPACE 00772000
- GT03 EQU * MUST BE VADDR 00773000
- SPACE 00774000
- STM R0,R1,SAVEWRK6 SAVE COUNT AND DEVICE ADDRESS 00775000
- C R0,F3 COUNT OF 3 OR LESS ?? 00776000
- BH MSG022E VADDR INVALID 00777000
- CALL DMKCVTHB CONVERT TO BINARY 00778000
- BNZ MSG022E INVALID VADDRESS 00779000
- CALL DMKSCNVU LOCATE VDEVBLOK 00780000
- BNZ MSG040E NONEXISTENT UNIT 00781000
- TM VDEVTYPC,CLASURO+CLASTERM OUTPUT OR CONSOLE CLASS ? 00782000
- BZ GT03A NO - CHECK INPUT TYPE 00783000
- TM VDEVTYPE,TYPPRT+TYPPUN PRINTER OR PUNCH ?? 00784000
- BNZ GT03B YES -- 00785000
- CLI VDEVTYPE,TYP3210 CONSOLE TYPE ? 00786000
- BE GT03B YES -- 00787000
- B MSG006E INVALID DEVICE TYPE 00788000
- GT03A TM VDEVTYPC,CLASURI INPUT DEVICE TYPE ?? 00789000
- BZ MSG006E NO -- 00790000
- TM VDEVTYPE,TYPRDR READER ?? 00791000
- BZ MSG006E NO -- INVALID DEVICE TYPE 00792000
- GT03B EQU * 00793000
- TM VDEVSTAT,VDEVDED DEDICATED TO REAL DEVICE ?? 00794000
- BO MSG006E YES -- INVALID DEVICE TYPE 00795000
- SR R5,R5 SET GPR5 TO ZERO 00796000
- SR R10,10 SET GPR10 TO ZERO 00797000
- B GT06 RETURN TO CALLER 00798000
- SPACE 2 00799000
- DEVIC EQU * HERE TO SET UP FOR GETDEVIC 00800000
- C R6,FFS DO WE NEED VDEVBLOK ADDRESS ?? 00801000
- BE GT05 NO -- MUST BE HOLD OR FREE CMD 00802000
- GT04 L R8,VMDVSTRT POINTER TO VDEVBLOK TABLE 00803000
- S R8,=A(VDEVSIZE*8) SUBSTRACT BLOK SIZE 00804000
- LH R10,VMDVCNT VDEVICE COUNT 00805000
- LTR R10,R10 ANY DEVICES FOR THIS USER ?? 00806000
- BP GT04A YES -- 00807000
- MSG040 LA R2,40 NO -- DOES NOT EXIST 00808000
- B EXIT8 ERROR MSG DMKCSQ040E 00809000
- GT04A EQU * 00810000
- A R10,F1 INCREASE DEVICE COUNT BY ONE 00811000
- BAL R3,GETDEVIC GET NEXT DEVICE @V200930 00812000
- LTR R10,R10 ANY MORE VDEVBLOKS ?? 00813000
- BZ MSG040 NO -- ERROR DMKCSQ040E 00814000
- B GT06 SET ZERO COND @V200930 00815000
- SPACE 00816000
- GT05 L R6,FFS SET 1ST TIME SWITCH FOR GETCHAIN 00817000
- BAL R3,GETCHAIN GET NEXT FILE CHAIN @V200930 00818000
- SPACE 00819000
- GT06 CR R2,R2 SET CC = ZERO 00820000
- BR R4 RETURN TO CALLER 00821000
- SPACE 3 00822000
- SPACE 3 00823000
- CLCALL CLC 0(0,R1),=C'ALL ' COMPARE FOR ALL 00824000
- CLCRDR CLC 0(0,R1),=C'RDR ' COMPARE FOR RDR 00825000
- CLCPCH CLC 0(0,R1),=C'PCH ' COMPARE FOR PCH 00826000
- CLCPRT CLC 0(0,R1),=C'PRT ' COMPARE FOR PRT 00827000
- CLCPRINT CLC 0(0,R1),=C'PRINTER ' COMPARE FOR PRINTER 00828000
- CLCPUN CLC 0(0,R1),=C'PUNCH ' COMPARE FOR PUNCH 00829000
- CLCREAD CLC 0(0,R1),=C'READER ' COMPARE FOR READER 00830000
- CLCHOLD CLC 0(0,R1),=C'HOLD ' COMPARE FOR HOLD 00831000
- CLCNOHLD CLC 0(0,R1),=C'NOHOLD ' COMPARE FOR NOHOLD 00832000
- CLCNAME CLC 0(0,R1),=C'NAME ' COMPARE FOR NAME 00833000
- CLCPURG CLC 0(0,R1),=C'PURGE ' COMPARE FOR PURGE 00834000
- CLCDIST CLC 0(0,R1),=C'DIST ' COMPARE FOR DIST 00835000
- CLCCONS CLC 0(0,R1),=C'CONSOLE ' COMPARE FOR CONSOLE 00836000
- MVCDIST MVC SAVEWRK8(0),0(R1) MOVE DIST CODE 00837000
- EJECT 00838000
- *. 00839000
- * 00840000
- * OPERATION OF GETFILE - 00841000
- * 00842000
- * 1. UPON ENTRY, GPR6 = ADDRESS OF A POINTER TO THE NEXT SFBLOK 00843000
- * TO TEST 00844000
- * 2. LOAD GPR7 WITH POINTER TO NEXT BLOK; IF ZERO, EXIT 00845000
- * 3. IF SAVEWRK2,3 EQUALS ZERO OR SFBUSER, GO TO STEP 4; 00846000
- * OTHERWISE GO TO STEP 6 00847000
- * 4. IF SAVEWRK1(1) EQUALS ZERO OR SFBCLAS,GO TO STEP 5; 00848000
- * OTHERWISE GO TO STEP 6 00849000
- * 5. IF SAVEWRK1+2(2) EQUALS ZERO OR SFBFILID, EXIT 00850000
- * 6. IF NO MATCH, GO TO STEP 2 00851000
- *. 00852000
- SPACE 00853000
- GETFILE EQU * HERE TO LOCATE THE REQUESTED FILE 00854000
- SPACE 00855000
- GF01 EQU * GPR7 = POINTER TO NEXT SFBLOK 00856000
- GF02 LR R6,R7 SFBLOK PRESENT ?? 00857000
- L R7,0(R7) 00858000
- LTR R7,R7 00859000
- BCR 8,R4 NO -RETURN TO CALLER WITH GPR7 ZERO 00860000
- SPACE 00861000
- GF03 TM SFBFLAG,SFBINUSE FILE IN USE ?? 00862000
- BO GF02 GET NEXT FILE 00863000
- CLI SAVEWRK2,X'40' USERID PRESENT ?? 00864000
- BNH GF04 NO -- USE ALL FILES 00865000
- CLC SAVEWRK2(8),SFBUSER USERID EQUALS ?? 00866000
- BNE GF02 NO 00867000
- SPACE 00868000
- GF04 CLI SAVEWRK1,X'00' SEARCH BY CLASS ?? 00869000
- BE GF05 NO 00870000
- CLI SAVEWRK1,C'*' ALL CLASS DEVICE ?? @VM01016 00871000
- BE GF05 YES, @VM01016 00872000
- CLC SAVEWRK1(1),SFBCLAS CLASS EQUALS ?? 00873000
- BNE GF02 NO - 00874000
- SPACE 00875000
- GF05 CLC SAVEWRK1+2(2),ZEROES SEARCH BY SPOOLID 00876000
- BE GF06 YES 00877000
- CLC SAVEWRK1+2(2),SFBFILID SPOOLID EQUAL ?? 00878000
- BNE GF02 NO - 00879000
- SPACE 00880000
- GF06 EQU * 00881000
- BR R4 RETURN TO CALLER 00882000
- EJECT 00883000
- *. 00884000
- * OPERATION OF GETDEVIC - 00885000
- * 00886000
- * 1. UPON ENTRY, THE FOLLOWING REGISTERS MUST BE LOADED - 00887000
- * GPR5 = THE DEVICE TYPE TO SEARCH FOR 00888000
- * GPR8 = ADDRESS OF VDEVBLOK AT WHICH TO START SEARCH 00889000
- * GPR10 = NUMBER OF VDEVBLOKS TO SEARCH 00890000
- * 2. ADD VDEVSIZE TO GPR8 AND DECREMENT GPR10; IF GPR10 = 0,EXIT 00891000
- * 3. TEST FOR DEVICE CLASS OF UNIT RECORD; IF NOT U/R, GO TO 2 00892000
- * 4. EXECUTE TM USING MASK IN GPR5 AGAINST VDEVTYPE; BRANCH 00893000
- * ON ONES BACK TO CALLER; OTHERWISE, GO TO STEP 2 00894000
- * 5. NOTE THAT GETDEVIC IS A 2ND LEVEL ROUTINE; LINKAGE IS VIA 00895000
- * GPR3 00896000
- *. 00897000
- SPACE 3 00898000
- GETDEVIC EQU * HERE TO LOCATE NEXT DEVICE FOR THIS TYPE 00899000
- SPACE 00900000
- * GPR5 = DEVICE TYPE TO SEARCH FOR 00901000
- * GPR8 = ADDRESS OF VDEVBLOK TO START SEARCH 00902000
- * GPR10 = NUMBER OF VDEVBLOKS TO SEARCH 00903000
- SPACE 00904000
- GD02 A R8,=A(VDEVSIZE*8) POINT TO NEXT DEVBLOK 00905000
- BCT R10,GD03 DECREMENT COUNT 00906000
- BR R3 COUNT IS ZERO, RETURN TO CALLER 00907000
- SPACE 00908000
- GD03 CLC VDEVADD,FFS ACTIVE DEVICE 00909000
- BE GD02 NO -- 00910000
- TM VDEVSTAT,VDEVDED DEDICATED TO REAL DEVICE ?? 00911000
- BO GD02 YES -- TRY NEXT 00912000
- TM VDEVTYPC,CLASURI INPUT UNIT RECORD ?? 00913000
- BZ GD04 NO - CHECK OUTPUT 00914000
- TM VDEVTYPE,TYPRDR IS IT A READER? @VA03722 00915000
- BZ GD02 NO, TRY NEXT BLOCK @VA03722 00916000
- EX R5,TMRDR VALID READER ?? 00917000
- BCR 7,R3 YES - 00918000
- B GD02 NO - TRY NEXT BLOK 00919000
- SPACE 00920000
- GD04 EQU * 00921000
- CLI VDEVTYPC,CLASURO OUTPUT CLASS ?? 00922000
- BNE GD05 NO -- 00923000
- TM VDEVTYPE,TYPPUN+TYPPRT TYPE PUNCH OR PRINTER 00924000
- BZ GD02 NO - 00925000
- EX R5,TMTYPE MATCH SEARCH DEVICE PUNCH OR PRINTER 00926000
- BZ GD02 NO 00927000
- BR R3 YES - 00928000
- SPACE 00929000
- GD05 CLI VDEVTYPC,CLASTERM CONSOLE CLASS ? 00930000
- BNE GD02 NO -- GET NEXT DEVICE 00931000
- CLI VDEVTYPE,TYP3210 CONSOLE TYPE ? 00932000
- BNE GD02 NO -- GET NEXT DEVICE 00933000
- EX R5,TMCON CONSOLE TYPE REQUESTED ? 00934000
- BZ GD02 NO -- GET NEXT DEVICE 00935000
- BR R3 RETURN TO CALLER 00936000
- SPACE 00937000
- EJECT 00938000
- *. 00939000
- * OPERATION OF GETNAME - 00940000
- * 00941000
- * 1. CALL DMKFREE FOR A 24 BYTE AREA FOR FNAME AND FTYPE 00942000
- * AND SAVE IN SAVEWRK4 00943000
- * 2. CALL DMKSCNFD TO LOCATE FNAME. IF MISSING OR INVALID, 00944000
- * EXIT GIVING MSG029E. OTHERWISE MOVE FNAME TO 00945000
- * THE ADDRESS IN SAVEWRK4. IF FNAME IS GREATER THAN 00946000
- * 8 BYTES RETURN TO CALLER. 00947000
- * 3. CALL DMKSCNFD TO LOCATE FTYPE, IF NONE, RETURN; 00948000
- * IF INVALID, EXIT GIVING MSG029E. 00949000
- * MOVE FTYPE TO ADDRESS IN SAVEWRK4+11 AND RETURN. 00950000
- * 00951000
- *. 00952000
- SPACE 3 00953000
- GETNAME EQU * HERE TO LOCATE FNAME FTYPE 00954000
- SPACE 00955000
- GN01 LA R0,3 LENGTH FOR 24 BYTE AREA 00956000
- CALL DMKFREE GET STORAGE FOR NEW FNAME FTYPE 00957000
- ST R1,SAVEWRK4 SAVE ADDRESS IN SAVEWRK4 00958000
- LR R2,R1 00959000
- MVI 0(R2),C' ' CLEAR 00960000
- MVC 1(23,R2),0(R2) AREA TO BLANKS 00961000
- SPACE 00962000
- GN02 CALL DMKSCNFD LOCATE FNAME 00963000
- BNZ MSG029E FNAME MISSING 00964000
- LR R14,R0 GET LENGTH COUNT 00965000
- BCTR R14,R0 -1 FOR MOVE 00966000
- CH R14,=H'23' LENGTH OVER 24 BYTES ?? 00967000
- BH MSG029E YES - INVALID 00968000
- SPACE 00969000
- EX R14,MVCFNAME MOVE FNAME AND MAYBE FTYPE 00970000
- C R14,F7 LENGTH OVER 8 BYTES ?? 00971000
- BCR 2,R4 YES - RETURN NO FTYPE 00972000
- SPACE 00973000
- GN03 CALL DMKSCNFD LOCATE FTYPE 00974000
- BCR 7,R4 NO FTYPE PRESENT - RETURN 00975000
- EJECT 00976000
- LR R14,R0 GET LENGTH OF FTYPE 00977000
- BCTR R14,R0 -1 FOR MOVE 00978000
- C R14,F7 OVER 8 CHARACTERS ?? 00979000
- BH MSG029E YES - INVALID FOR FTYPE 00980000
- EX R14,MVCFTYPE MOVE FTYPE 00981000
- BR R4 RETURN TO CALLER 00982000
- SPACE 2 00983000
- MVCFNAME MVC 0(0,R2),0(R1) MOVE FNAME 00984000
- MVCFTYPE MVC 12(0,R2),0(R1) MOVE FTYPE 00985000
- EJECT 00986000
- *. 00987000
- * OPERATION OF GETCHAIN - 00988000
- * 00989000
- * 1. IF GPR5 = 0, SET GPR6 = 0 AND EXIT; 00990000
- * 2. IF GPR6 = FFS, GO TO STEP 6; 00991000
- * 3. IF GPR5 HAS CSQRDR BIT ON,REMOVE BIT, GO TO STEP 7; 00992000
- * 4. IF GPR5 HAS TYPPRT BIT ON,REMOVE BIT, GO TO STEP 8; 00993000
- * 5. REMOVE TYPPUN BIT IN GPR5, SET GPR6 TO ZERO, EXIT 00994000
- * 6. IF GPR5 HAS CSQRDR BIT ON, LOAD GPR6 WITH ARSPRD, EXIT; 00995000
- * 7. IF GPR5 HAS TYPPRT BIT ON, LOAD GPR6 WITH ARSPPR, EXIT; 00996000
- * 8. IF GPR5 HAS TYPPUN BIT ON, LOAD GPR6 WITH ARSPPU,EXIT; 00997000
- * 9. SET GPR6 = 0, EXIT 00998000
- *. 00999000
- SPACE 3 01000000
- GETCHAIN EQU * HERE TO GET NEXT FILE CHAIN ANCHOR POINTER 01001000
- SPACE 01002000
- GC01 LTR R5,R5 FILE TYPE ZERO ?? 01003000
- BNZ GC02 NO-- 01004000
- SR R6,R6 YES - ZERO GPR6 01005000
- BR R3 RETURN TO CALLER 01006000
- SPACE 01007000
- GC02 C R6,FFS 1ST TIME SWITCH ON ?? 01008000
- LR R6,R5 SAVE DEVICE TYPE FOR CHANGE COMPARE 01009000
- BE GC06 YES - DO NOT RESET ANY BITS, JUST 01010000
- * LOAD GPR6 01011000
- SPACE 01012000
- GC03 N R5,=A(255-CSQRDR) REMOVE READER BIT 01013000
- CR R6,R5 WAS IT ON ?? 01014000
- BNE GC07 NO 01015000
- SPACE 01016000
- GC04 N R5,=A(255-TYPPRT) REMOVE PRINTER BIT 01017000
- CR R6,R5 WAS IT ON ?? 01018000
- BNE GC08 NO 01019000
- SPACE 01020000
- GC05 SR R5,R5 REMOVE PUNCH BIT 01021000
- SR R6,R6 SET GPR6 TO ZERO 01022000
- BR R3 RETURN TO CALLER - END OF CHAIN 01023000
- SPACE 01024000
- GC06 L R7,ARSPRD LOAD READER FILE CHAIN POINTER 01025000
- * ANCHOR 01026000
- EX R5,TMRDR READER BIT ON ?? 01027000
- BCR 7,R3 YES - RETURN TO CALLER 01028000
- SPACE 01029000
- GC07 L R7,ARSPPR LOAD PRINTER FILE CHAIN POINTER 01030000
- * ANCHOR 01031000
- EX R5,TMPRT PRINTER BIT ON ?? 01032000
- BCR 7,R3 YES - RETURN TO CALLER 01033000
- SPACE 01034000
- GC08 L R7,ARSPPU LOAD PUNCH FILE CHAIN POINTER ANCHOR 01035000
- EX R5,TMPUN PUNCH BIT ON ?? 01036000
- BCR 7,R3 YES - RETURN TO CALLER 01037000
- SPACE 01038000
- GC09 SR R6,R6 SET GPR6 = ZERO - ALL DONE 01039000
- SR R7,R7 01040000
- BR R3 RETURN TO CALLER 01041000
- EJECT 01042000
- **************************************** 01043000
- * 01044000
- * ERROR EXITS FROM DMKCSQ 01045000
- * 01046000
- **************************************** 01047000
- SPACE 2 01048000
- MSG003E EQU * HERE IF INVALID OPTION FOR THIS COMMAND 01049000
- LA R2,003 ERROR MSG DMKCSQ003E 01050000
- B EXIT8 EXIT TO ERROR MODULE 01051000
- SPACE 2 01052000
- MSG006E EQU * HERE IF DEVICE TYPE IS INVALID 01053000
- LA R2,006 ERROR MSG DMKCSQ006E 01054000
- LM R0,R1,SAVEWRK6 COUNT AND ADDRESS OF INVALID TYPE 01055000
- B EXIT8 EXIT TO ERROR MODULE 01056000
- SPACE 2 01057000
- MSG007E EQU * HERE IF USERID IS INVALID 01058000
- LA R2,007 ERROR MSG DMKCSQ007E 01059000
- B EXIT8 01060000
- SPACE 2 01061000
- MSG013E EQU * HERE IF CONFLICTING OPTIONS 01062000
- LA R2,013 ERROR MSG DMKCSQ013E 01063000
- B EXIT8 01064000
- SPACE 2 01065000
- MSG020E EQU * HERE IF USERID IS MISSING OR INVALID 01066000
- LA R2,020 ERROR MSG DMKCSQ020E 01067000
- B EXIT8R1 EXIT TO ERROR MODULE 01068000
- SPACE 2 01069000
- MSG022E EQU * HERE IF VIRTUAL ADDRESS MISSING OR 01070000
- * INVALID 01071000
- LA R2,022 ERROR MSG DMKCSQ022E 01072000
- B EXIT8R1 .. 01073000
- SPACE 01074000
- MSG028E EQU * HERE IF CLASS IS MISSING OR INVALID 01075000
- LA R2,028 ERROR MSG DMKCSQ028E 01076000
- B EXIT8R1 01077000
- SPACE 01078000
- MSG029E EQU * HERE IF FNAME FTYPE MISSING OR INVALID 01079000
- LA R2,029 ERROR MSG DMKCSQ029E 01080000
- B EXIT8R1 EXIT TO ERROR MODULE 01081000
- SPACE 2 01082000
- MSG030E EQU * HERE IF COPIES IS MISSING OR INVALID 01083000
- LA R2,030 ERROR MSG DMKCSQ030E 01084000
- B EXIT8R1 EXIT TO ERROR MODULE 01085000
- SPACE 2 01086000
- MSG032E EQU * HERE IF DISTCODE IS MISSING OR INVALID 01087000
- LA R2,032 ERROR MSG DMKCSQ032E 01088000
- B EXIT8R1 EXIT TO ERROR MODULE 01089000
- SPACE 2 01090000
- MSG040E EQU * HERE IF DEVICE DOES NOT EXIST 01091000
- LA R2,040 ERROR MSG DMKCSQ040E 01092000
- LM R0,R1,SAVEWRK6 COUNT AND ADDRESS OF OPTION 01093000
- B EXIT8 01094000
- SPACE 2 01095000
- MSG053E EQU * HERE IF USERID NOT IN CP DIRECTORY 01096000
- LA R2,053 ERROR MSG DMKCSQ053E 01097000
- B EXIT8 01098000
- EJECT 01099000
- **************************************** 01100000
- * 01101000
- * FINAL EXIT BACK TO DMKCFM 01102000
- * 01103000
- **************************************** 01104000
- SPACE 3 01105000
- CSQEXIT EQU * HERE FOR NORMAL EXIT FROM DMKCSQ 01106000
- SR R2,R2 CLEAR ERROR REGISTER 01107000
- B EXIT1 NOW EXIT 01108000
- SPACE 2 01109000
- EXIT8R1 SR R1,R1 01110000
- SR R0,R0 01111000
- EXIT8 ICM R0,14,ID+3 MOVE IN MODULE ID 01112000
- EXIT1 STM R0,R2,SAVEWRK5 SAVE CALL GPRS 01113000
- L R1,SAVEWRK4 ADDRESS OF 24 BYTE AREA 01114000
- LTR R1,R1 ADDRESS PRESENT ?? 01115000
- BZ EXIT2 NO --- 01116000
- LA R0,3 LENGTH OF AREA 01117000
- CALL DMKFRET RETURN AREA TO FREE STORAGE 01118000
- EXIT2 LM R0,R2,SAVEWRK5 RESTORE GPRS 01119000
- LTR R2,R2 ERROR CODE PRESENT ?? 01120000
- BNZ ERREXIT YES -- 01121000
- EXIT EXIT NO ERROR 01122000
- SPACE 01123000
- ERREXIT CALL DMKERMSG EXIT TO MESSAGE MODULE 01124000
- SPACE 01125000
- * MODULE DMKERMSG WILL GIVE SVC16 AND RETURN CONTROL TO DMKCFM 01126000
- EJECT 01127000
- **************************************** 01128000
- * 01129000
- * MESSAGES AND CONSTANTS 01130000
- * 01131000
- **************************************** 01132000
- SPACE 2 01133000
- LTORG 01134000
- EJECT 01135000
- CSQRDR EQU X'20' 01136000
- CSQCON EQU X'10' 01137000
- SPACE 01138000
- PSA , @V306638 01139000
- COPY CONBUF @V306638 01140000
- COPY DEVTYPES @V306638 01141000
- COPY EQU @V306638 01142000
- COPY IOBLOKS @V306638 01143000
- COPY RBLOKS @V306638 01144000
- COPY SAVE @V306638 01145000
- COPY SPOOL @V306638 01146000
- COPY UDIRECT @V306638 01147000
- COPY VBLOKS @V306638 01148000
- COPY VMBLOK @V306638 01149000
- END 01150000
ibm/vm370-lib/cp/dmkcsq.assemble_src.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator