CSP TITLE 'DMKCSP (CP) VM/370 - RELEASE 6' 00001000
ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
*. 00003000
* MODULE NAME - 00004000
* 00005000
* DMKCSP 00006000
* 00007000
* FUNCTION - 00008000
* 00009000
* DMKCSP CONTAINS THE SPOOL COMMAND FOR 00010000
* CLASS G USERS. 00011000
* 00013000
* ATTRIBUTES - 00014000
* 00015000
* REENTRANT, PAGEABLE, CALLED VIA SVC 00016000
* 00017000
* ENTRY POINTS - 00018000
* 00019000
* DMKCSPSP - SPOOL COMMAND 00023000
* 00024000
* ENTRY CONDITIONS - 00025000
* 00026000
* GPR9 = ADDRESS OF THE COMMAND LINE BUFFER; MUST BE PRESERVED 00027000
* FOR CALLS TO DMKSCNFD 00028000
* GPR12 = ADDRESS OF ENTRY POINT 00029000
* GPR13 = ADDRESS OF SAVEAREA 00030000
* 00031000
* EXIT CONDITIONS - 00032000
* 00033000
* NORMAL - 00034000
* GPR2 = 0 00035000
* 00036000
* ERROR - 00037000
* 00038000
* GPR2 = CONTAINS THE BINARY MESSAGE NUMBER 00039000
* - EITHER AN OPTION IS ILLEGAL OR SOME CONDITION 00040000
* EXISTS THAT MAKES IT IMPOSSIBLE TO EXECUTE THE COMMAND 00041000
* A MESSAGE IS TYPED TO DESCRIBE THE ERROR; THE ERROR 00042000
* MESSAGES THAT MAY OCCUR ARE LISTED WITH EACH COMMAND 00043000
EJECT 00044000
* 00045000
* CALLS TO OTHER ROUTINES - 00046000
* 00047000
* DMKFREE - TO OBTAIN A BLOCK FROM FREE STORAGE 00048000
* DMKFRET - TO RETURN STORAGE 00049000
* DMKUDRFU - TO VERIFY A 'USERID' 00050000
* DMKCSOSD - TO START RDR, PRINTER OR PUNCH 00051000
* DMKSTKIO - TO STACK AN IOBLOK 00052000
* DMKSCNVU - LOCATE A VDEVBLOK 00053000
* DMKUDRRV - TO CLOSE THE DIRECTORY 00054000
* DMKSCNFD - SCAN THE COMMAND LINE BUFFER FOR OPTIONS 00055000
* DMKQCNWT - WRITE RESPONSE AND ERROR MESSAGES 00056000
* DMKVSPCO - CLOSE (AND OPTIONALLY PURGE) OUTPUT SPOOL FILES 00057000
* DMKVSPCR - CLOSE READER FILES 00058000
* DMKSPLDL - DELETE PURGED FILES FROM THE SYSTEM 00059000
* DMKCVTHB - CONVERT HEX ADDRESS OPTIONS TO BINARY 00060000
* DMKCVTDB - CONVERT DECIMAL SPOOLID NUMBERS TO BINARY 00061000
* DMKERMSG - WRITE ERROR MESSAGES 00062000
* DMKCKSPL - CHECKPOINT THE BLOCKS 00063000
* EXTERNAL REFERENCES - 00064000
* 00065000
* DMKRSPHQ - SPOOL HOLD QUEUE CHAIN ANCHOR 00066000
* DMKRSPRD - (ARSPRD) READER FILE CHAIN ANCHOR 00067000
* DMKRSPPR - (ARSPPR) PRINTER FILE CHAIN ANCHOR 00068000
* DMKRSPPU - (ARSPPU) PUNCH FILE CHAIN ANCHOR 00069000
* DMKRSPID - SYSTEM SPOOL ID COUNTER 00070000
* DMKRSPDL - SPOOL DELETE CHAIN ANCHOR 00071000
* DMKVIOIN - IOBIRA ADDRESS FOR IOBLOK 00072000
* 00073000
* TABLES / WORKAREAS - 00074000
* 00075000
* IOBLOK 00076000
* 00077000
* VDEVBLOK, VSPXBLOK, AND SFBLOKS ARE UPDATED OR DELETED 00078000
* 00079000
* THE SAVEWRK FIELDS IN THE STANDARD SAVEAREA ARE USED BY THE 00080000
* OPTION PROCESSING SUBROUTINES FOR THE FOLLOWING VALUES - 00081000
* 00082000
* SAVEWRK1 - FILE OUTPUT CLASS (1 BYTE) 00083000
* SAVEWRK1+1 - NUMBER OF COPIES (1 BYTE) 00084000
* SAVEWRK1+2 - SPOOLID NUMBER (HALF-WORD) 00085000
* SAVEWRK2,3 - USERID OF FILE'S OWNER 00086000
* SAVEWRK4 - VALUE OF CHARS PARAMETER IF SPECIFIED 00087000
* SAVEWRK5 - VALUE OF FLASH OVERLY IS SPECIFIED 00087500
* SAVEWRK6,7 - SAVE AREA FOR R0,R1 SCAN OPTIONS (TYPE ERROR) 00088000
* SAVEWRK6 - COPY MOD NAME IF SPECIFIED (WHEN NO TYPE ERROR) 00088500
* SAVEWRK7 - FCB NAME (WHEN NO TYPE ERROR) 00089000
* SAVEWRK8 - USED FOR FLAGS 00089500
* SAVEWRK9 - FIRST BYTE USED FOR FLASH COUNT IF SPECIFIED 00090000
* 00091000
* REGISTER USAGE - 00092000
* 00093000
* ALL SUBROUTINES IN THE MODULE CONFORM GENERALLY TO THIS USAGE; 00094000
* ANY INDIVIDUAL DEVIATIONS OR EXTENSIONS ARE LISTED WITH THE 00095000
* COMMAND DESCRIPTION 00096000
* 00097000
* GPR0 = LENGTH OF OPTION - RETURNED FROM DMKSCNFD 00098000
* GPR1 = ADDRESS OF OPTION - RETURNED FROM DMKSCNFD 00099000
* GPR2 = SCRATCH 00100000
* GPR3 = INTERNAL LINKAGE - 2ND LEVEL 00101000
* GPR4 = INTERNAL LINKAGE - 1ST LEVEL 00102000
* GPR5 = DEVICE TYPE FLAGS - LOGICAL SUM OF TYPES 00103000
* GPR6 = POINTER TO PREVIOUS SFBLOK ON CHAIN 00104000
* GPR7 = SFBLOK BASE 00105000
* GPR8 = VDEVBLOK BASE 00106000
* GPR9 = INPUT COMMAND LINE ADDRESS 00107000
* GPR10 = REMAINING DEVICE COUNT AND IOBLOK ADDRESS 00108000
* GPR11 = VMBLOK BASE 00109000
* GPR12 = DMKCSP BASE 00110000
* GPR13 = SAVEAREA BASE 00111000
* GPR14 = EXTERNAL LINKAGE 00112000
* GPR15 = EXTERNAL LINKAGE 00113000
* 00114000
* NOTES - 00115000
* 00116000
* NONE 00117000
* 00118000
* OPERATION - 00119000
* 00120000
* EACH COMMAND PROCESSOR IS ENTERED VIA A CALL FROM DMKCFM. THE 00121000
* PROCESSING LOGIC IS EMBODIED IN A SERIES OF INTERNAL CALLS TO 00122000
* A SET OF OPTION PROCESSORS AND LIST SCANNERS. IN GENERAL, 00123000
* THE OPTION PROCESSORS ARE CALLED WHEN IT IS KNOWN, EITHER BY 00124000
* POSITION OR KEYWORD, WHAT TYPE OF OPERAND MUST APPEAR NEXT ON 00125000
* THE COMMAND LINE. THE OPTION PROCESSORS SCAN FOR THE NEXT 00126000
* FIELD, VERIFY ITS VALIDITY, AND SET UP INFORMATION FOR USE BY 00127000
* THE LIST SCANNERS. SINCE THE OPERATIONAL DESCRIPTION OF EACH 00128000
* OF EACH COMMAND PROCESSOR REFERENCES THESE SUBROUTINES, A LIST 00129000
* OF THEIR NAMES AND FUNCTIONS IS GIVEN HERE; A DESCRIPTION OF 00130000
* THE OPERATIONAL LOGIC AND REGISTER SETS FOR EACH SUBROUTINE 00131000
* APPEAR AT THE END OF THE MODULE 00132000
* 00133000
* OPTION PROCESSORS - 00134000
* 1. GETUSER - SAVE THE USER ID OF THE FILE'S OWNER 00135000
* 2. GETYPE - SAVE THE FILE TYPE (OR DEVICE TYPE) 00136000
* 3. GETCOPY - LOCATE AND SAVE THE NUMBER OF COPIES REQUESTED 00137000
* AND METHOD OF MULTIPLE COPY TRANSMISSION 00137500
* 4. GETNAME - LOCATE AND SAVE THE FILE NAME (AND TYPE) 00138000
* 5. GETCLASS - LOCATE AND VERIFY THE CLASS REQUESTED (2ND LEVEL 00139000
* ROUTINE) 00140000
* 6. GETCHARS - SAVE AND VERIFY CHARS VALUE SPECIFIED 00140200
* 7. GETFLASH - SAVE AND VERIFY FLASH VALUES SPECIFIED 00140400
* 8. GETCMOD - SAVE AND VERIFY COPY MOD NAME 00140600
* 9. GETFCB - SAVE AND VERIFY FCB NAME SPECIFIED 00140800
* 00141000
* LIST SCANNING ROUTINES - 00142000
* 1. GETDEVIC - LOCATE THE NEXT VDEVBLOK OF THE APPROPRIATE 00143000
* ADDRESS, CLASS AND TYPE (2ND LEVEL ROUTINE) 00144000
* 2. GETFILE - LOCATE THE NEXT FILE OF THE CORRECT CLASS, ID, 00145000
* AND OWNER 00146000
* 3. GETCHAIN - LOCATE THE NEXT FILE CHAIN TO SEARCH (2ND 00147000
* LEVEL ROUTINE) 00148000
* 00149000
*. 00150000
EJECT 00151000
COPY OPTIONS 00152000
SPACE 2 00153000
COPY LOCAL OPTIONS 00154000
DMKCSP CSECT 00155000
SPACE 3 00156000
EXTRN DMKSCNVU,DMKSCNFD 00157000
EXTRN DMKVSPCO,DMKVSPCR,DMKCVTHB 00158000
EXTRN DMKCVTDB,DMKRSPHQ 00159000
EXTRN DMKVIOIN,DMKSTKIO @VM01016 00160000
EXTRN DMKCSOSD,DMKUDRFU,DMKERMSG 00161000
EXTRN DMKUDRRV @V200930 00162000
EXTRN DMKCKSPL @V304298 00163000
SPACE 3 00164000
USING PSA,R0 00165000
USING SFBLOK,R7 00166000
USING VDEVBLOK,R8 00167000
USING BUFFER,R9 00168000
USING VMBLOK,R11 00169000
USING SAVEAREA,R13 00170000
SPACE 2 00171000
ID DC CL8'DMKCSP' MODULE NAME 00172000
EJECT 00173000
*. 00660000
* 00661000
* SUBROUTINE NAME - 00662000
* 00663000
* DMKCSPSP 00664000
* 00665000
* FUNCTION - 00666000
* 00667000
* TO SPECIFY THE SPOOLING CHARACTERISTICS OF A DEVICE OR CLASS 00668000
* OF DEVICES. THE DEVICE(S) MAY BE SPECIFIED BY ADDRESS OR GEN- 00669000
* ERIC TYPE; THE OPTIONS FOLLOWING DEVICE TYPE MAY BE SPECIFIED 00670000
* IN ANY ORDER. 00671000
* 00672000
* COMMAND LINE FORMAT - 00673000
* 00674000
* +-------+---------------------------------------+ 00675000
* | SPOOL | READER CLASS A | 00676000
* | SP | VADDR <CONT|NOCONT> | 00677000
* | | <HOLD|NOHOLD> ....... | 00678000
* | | <EOF|NOEOF> | 00679000
* | | | 00680000
* | | CONSOLE <START|STOP> <TERM|NOTERM> ---| 00681000
* | | PRINTER <TO> <USERID|*> | 00682000
* | | PUNCH <FOR><SYSTEM> | 00683000
* | | VADDR OFF | 00684000
* | | | 00685000
* | | ----CONT HOLD CLASS A ------ | 00686000
* | | NOCONT NOHOLD <CLOSE|PURGE> | 00687000
* | | | 00688000
* | | ----COPY <*>NN CHARS CCCC---------- | 00688100
* | | | 00688200
* | | ----FLASH NAME NN MODIFY CCCC---- | 00688300
* | | | 00688400
* | | ----FCB NAME | 00688500
* | | | 00688600
* +-------+---------------------------------------+ 00689000
* 00690000
* READER PRINTER PUNCH CONSOLE CLASS CONT NOCONT 00691000
* R RDR P PRT PU PCH CON CL CON NOC 00692000
* 00693000
* HOLD NOHOLD EOF NOEOF TO OFF COPY START STOP TERM NOTERM 00694000
* HO NOH EOF NOE T OFF CO STA STO TE NOTE 00695000
* 00696000
* CHARS FLASH MODIFY FCB 00697000
* CH FL MO FCB 00697300
* 00697600
* OPERATION - 00698000
* 00699000
* 1. CALL GETYPE; IF TYPE = 'ALL', EXIT GIVING ERROR MSG006E. 00700000
* IF MISSING OR INVALID, EXIT GIVING MSG022E. 00701000
* 2. SP03- IF OUTPUT DEVICE GO TO STEP 3. 00702000
* IF NONE, GO TO STEP 5. IF OPTION = 'EOF' OR 'NOEOF' 00703000
* OR 'CONT' OR 'NOCONT' OR 'HOLD' OR 'NOHOLD', 00704000
* SET FLAG IN SAVEWRK8 AND GO TO STEP 2. 00705000
* IF OPTION = 'CLASS': CALL GETCLASS: GO TO STEP 2. 00706000
* EXIT GIVING ERROR MSG003E. 00707000
* 3. CALL DMKSCNFD: LOCATE NEXT OPTION: 00708000
* IF NONE, GO TO STEP 5. 00709000
* IF OPTION = 'TO', GO TO STEP 4 00710000
* IF OPTION = 'OFF' OR 'HOLD' OR 'NOHOLD' OR 00711000
* 'CONT' OR 'NOCONT', SET FLAG SAVEWRK8 AND GO TO STEP 3. 00712000
* IF OPTION = 'CLASS', CALL GETCLASS AND GO TO STEP 3. 00713000
* IF OPTION = 'COPY', CALL GETCOPY AND GO TO STEP 3. 00714000
* IF CONSOLE AND OPTION = 'START' OR 'STOP' OR 'TERM' OR 00715000
* 'NOTERM' SET OR RESET THE PROPER FLAGS AND GO TO STEP 3. 00716000
* 4. CALL GETUSER 00717000
* CALL DMKUDRFU TO VERIFY USERID. 00718000
* IF NOT FOUND TEST FOR SYSTEM, PROCESS AS OFF 00719000
* IF INVALID USERID, EXIT GIVING ERROR MSG020E. 00720000
* OTHERWISE, GO TO STEP 3. 00721000
* 5. RESET ANY NONZERO FIELDS IN VDEVBLOK AND 'NI' 00722000
* SAVEWRK8+1 INTO VDEVSFLG, SET SAVEWRK8 INTO VDEVSFLG. 00723000
* TEST FOR CALL TO CLOSE (DMKVSPCO) WITH OR WITHOUT PURGE FLAG. 00724000
* CALL GETDEVIC: IF LAST DEVICE, EXIT; OTHERWISE GO TO 00725000
* STEP 5. 00726000
* 00727000
* RESPONSE - 00728000
* 00729000
* NONE 00730000
* 00731000
* ERROR MESSAGES - 00732000
* 00733000
* DMKCSP003E INVALID OPTION - (OPTION) 00734000
* DMKCSP006E INVALID DEVICE TYPE - (ADDR) 00735000
* DMKCSP007E INVALID USERID - (USERID) 00736000
* DMKCSP013E CONFLICTING OPTION - (OPTION) 00737000
* DMKCSP020E USERID MISSING OR INVALID 00738000
* DMKCSP022E VADDR MISSING OR INVALID 00739000
* DMKCSP026E OPERAND MISSING OR INVALID 00740000
* DMKCSP028E CLASS MISSING OR INVALID 00741000
* DMKCSP030E COPIES MISSING OR INVALID 00742000
* DMKCSP040E DEV (ADDR) DOES NOT EXIST 00743000
* DMKCSP053E (USERID) NOT IN CP DIRECTORY 00744000
*. 00745000
SPACE 3 00746000
DMKCSPSP RELOC 00747000
SPACE 00748000
* SAVEWRK8+3 X'80' OPTIONS PROCESSED 00749000
* SAVEWRK8+3 X'40' CONSOLE START OPTION IN COMMAND 00750000
* SAVEWRK8+3 X'20' CONSOLE STIOP OPTION IN COMMAND 00751000
* SAVEWRK8+3 X'10' SPOOL CONSOLE ACTIVITY 00752000
* SAVEWRK8+3 X'04' CLOSE DEVICE 00753000
* SAVEWRK8+3 X'02' CLOSE AND PURGE FILE 00754000
* SAVEWRK8+3 X'01' MULT COPY IN 1 XMISSION FLAG 00754500
SPACE 00755000
USING VSPLCTL,R9 ADDRESSIBILITY @V60B9BA 00755500
SPACE 00756000
BAL R4,CLEAR CLEAR SAVEWRK1,2-9 00757000
SR R6,R6 INDICATE POSSIBLE VADDR 00758000
BAL R4,GETYPE GET DEVICE TYPE @V200930 00759000
MVC SAVEWRK8+2(1),VDEVTYPC SAVE DEVICE CLASS @VW01375 00760000
SPACE 00761000
SP02 EX R5,CLIALL TYPE = ALL ?? 00762000
BE MSG006E YES - INVALID TYPE 00763000
MVC SAVEWRK8(2),=AL2(255) SET TO X'00FF' 00764000
SPACE 00765000
SPACE 00766000
SP04 BALR R4,R0 SET UP RETURN REG 00767000
CALL DMKSCNFD LOCATE NEXT OPTION 00768000
BNZ SP25 NONE- ALL OPTION READ NOW PROCESS 00769000
OI SAVEWRK8+3,X'80' INDICATE AT LEAST ONE OPTION 00770000
LR R14,R0 COUNT 00771000
BCTR R14,0 -1 00772000
C R0,F2 COUNT LESS THAN 2 00773000
BL SP12 TEST FOR TO AND FOR @V200930 00774000
BE SP10 GO DO COUNT 2 OPTIONS 00775000
TM VDEVTYPC,CLASURO+CLASTERM IS IT OUTPUT TYPE ? @VM08757 00776000
BNZ SP07 YES -- @VM08757 00777000
SPACE 00778000
SP05 EX R14,CLCEOF EOF ?? 00779000
BNE SP06 NO 00780000
TM SAVEWRK8,VDEVEOF EOF FLAG SET ?? 00781000
BO MSG013E YES -- CONFLICTING OPTION 00782000
TM SAVEWRK8+1,VDEVEOF NOEOF SET ?? 00783000
BZ MSG013E YES -- CONFLICTING OPTION 00784000
OI SAVEWRK8,VDEVEOF SET EOF 00785000
BR R4 RETURN TO SCAN COMMAND LINE 00786000
SPACE 00787000
SP06 EX R14,CLCNOEOF NOEOF ?? 00788000
BNE SP07 NO 00789000
TM SAVEWRK8+1,VDEVEOF NOEOF FLAG SET ?? 00790000
BZ MSG013E YES -- CONFLICTING OPTION 00791000
TM SAVEWRK8,VDEVEOF EOF SET ?? 00792000
BO MSG013E YES -- CONFLICTING OPTION 00793000
NI SAVEWRK8+1,X'FF'-VDEVEOF SET UP RESET FLAG 00794000
BR R4 RETURN TO SCAN COMMAND LINE @VM08757 00795000
SPACE 00796000
SP07 EX R14,CLCCON CONT CONTINUOUS INPUT READING ?? 00797000
BNE SP08 NO 00798000
TM SAVEWRK8,VDEVCONT CONT SET ?? 00799000
BO MSG013E YES -- CONFLICTING OPTION 00800000
TM SAVEWRK8+1,VDEVCONT NOCONT SET ?? 00801000
BZ MSG013E YES -- CONFLICTING OPTION 00802000
OI SAVEWRK8,VDEVCONT SET CONT 00803000
BR R4 RETURN TO SCAN COMMAND LINE 00804000
SPACE 00805000
SP08 EX R14,CLCNOCON NO CONTINOUS INPUT READING ?? 00806000
BNE SP09 NO 00807000
TM SAVEWRK8,VDEVCONT CONT SET ?? 00808000
BO MSG013E YES -- CONFLICTING OPTION 00809000
TM SAVEWRK8+1,VDEVCONT NOCONT SET ?? 00810000
BZ MSG013E YES -- CONFLICTING OPTION 00811000
NI SAVEWRK8+1,X'FF'-VDEVCONT RESET 00812000
BR R4 RETURN TO SCAN COMMAND LINE 00813000
SPACE 00814000
SP09 EX R14,CLCNOHLD NOHOLD ?? 00815000
BNE SP09A NO @V60B9BA 00816000
TM SAVEWRK8,VDEVHOLD HOLD SET ?? 00817000
BO MSG013E YES -- CONFLICTING OPTION 00818000
TM SAVEWRK8+1,VDEVHOLD NOHOLD SET ?? 00819000
BZ MSG013E YES -- CONFLICTING OPTION 00820000
NI SAVEWRK8+1,X'FF'-VDEVHOLD 00821000
BR R4 00822000
SPACE 1 00822100
SP09A TM VDEVTYPC,CLASURI INPUT DEVICE ? @V60B9BA 00822200
BO SP10 XFER IF SO @V60B9BA 00822300
EX R14,CLCFCB IS IT FCB OPTION ? @V60B9BA 00822400
BNE SP10 XFER IF NOT @V60B9BA 00822500
CLI SAVEWRK7,X'00' FCB PRESENT ? @V60B9BA 00822600
BNE MSG013E YES - CONFLICTING OPTION @V60B9BA 00822700
BAL R4,GETFCB GET FCB SPECIFIED @V60B9BA 00822800
B SP04 SCAN FOR NEXT FIELD @V60B9BA 00822900
SPACE 00823000
SP10 EX R14,CLCHOLD HOLD ?? 00824000
BNE SP11 NO 00825000
TM SAVEWRK8,VDEVHOLD HOLD SET ?? 00826000
BO MSG013E YES -- CONFLICTING OPTION 00827000
TM SAVEWRK8+1,VDEVHOLD NOHOLD SET ?? 00828000
BZ MSG013E YES -- CONFLICTING OPTION 00829000
OI SAVEWRK8,VDEVHOLD SET HOLD 00830000
BR R4 RETURN TO SCAN COMMAND LINE 00831000
SPACE 00832000
SP11 EX R14,CLCCLASS CLASS ?? 00833000
BNE SP12 NO, TEST FOR TO AND FOR @V200930 00834000
CLI SAVEWRK1,X'00' CLASS PRESENT ?? 00835000
BNE MSG013E YES -- CONFLICTING OPTION 00836000
BAL R3,GETCLASS GET FILE CLASS @V200930 00837000
BR R4 00838000
SPACE 00839000
SP12 TM VDEVTYPC,CLASURI IS THIS A READER ?? @V200930 00840000
BO MSG003E YES, ANYTHING ELSE INVALID @V200930 00841000
EX R14,CLCTO IS IT TO ?? @V200930 00842000
BE SP14 YES, DO IT @V200930 00843000
EX R14,CLCFOR IS IT FOR ?? @V200930 00844000
BE SP30 YES, DO IT @V200930 00845000
CL R0,F2 IS IT ONE BYTE OPTION ?? @V200930 00846000
BL SP24A YES, TEST FOR USERID @V200930 00847000
B SP17 TEST FOR OTHER OPTIONS @V200930 00848000
SP30 TM SAVEWRK8+1,VDEVFOR+VDEVXFER OPTIONS BEFORE ?? @V200930 00849000
BNO MSG013E YES, CONFLICT @V200930 00850000
OI SAVEWRK8,VDEVFOR SET FOR USERID @V200930 00851000
NI SAVEWRK8+1,X'FF'-VDEVXFER RESET TO USERID @V200930 00852000
B SP14A CHECK OUT CONFLICTS @V200930 00853000
SPACE 00854000
SP14 TM SAVEWRK8+1,VDEVFOR+VDEVXFER OPTIONS BEFORE ?? @V200930 00855000
BNO MSG013E YES, CONFLICT @V200930 00856000
OI SAVEWRK8,VDEVXFER SET TO USERID @V200930 00857000
NI SAVEWRK8+1,X'FF'-VDEVFOR RESET FOR USERID @V200930 00858000
SP14A DS 0H @V200930 00859000
CALL DMKSCNFD LOCATE USER ID 00860000
BNZ MSG020E USERID MISSING 00861000
SPACE 00862000
SP15 LR R14,R0 LENGTH OF USER ID 00863000
BCTR R14,0 LENGTH -1 00864000
SP15A C R0,F8 VALID LENGTH ?? 00865000
BH MSG007E INVALID USERID 00866000
C R0,F1 LENGTH OF ONE 00867000
BNE SP15B NO -NOT * 00868000
MVC SAVEWRK2(8),VMUSER GET SELF USERID @V200930 00869000
CLI 0(R1),C'*' IS IT SELF ?? @V200930 00870000
BE SP15C YES, TEST FOR SELF FOR @V200930 00871000
SP15B MVC SAVEWRK2(8),BLANKS BLANK AREA 00872000
EX R14,MVCID MOVE USERID TO SAVEWRK2,3 00873000
SP15C TM SAVEWRK8,VDEVFOR FOR OPTION ?? @V200930 00874000
BZ SP16 NO, CONT @V200930 00875000
CLC SAVEWRK2(8),VMUSER FOR SELF ?? SAME AS OFF @V200930 00876000
BNE SP16 NO, CONT @V200930 00877000
NI SAVEWRK8,X'FF'-VDEVFOR TURN FOR OFF @V200930 00878000
B SP17A CONT @V200930 00879000
SP16 LA R0,UDIRSIZE GET DIRECTORY BUFFER @V200930 00880000
CALL DMKFREE FOR USER SEARCH @V200930 00881000
LR R2,R1 BUFFER ADDRESS @V200930 00882000
LA R1,SAVEWRK2 USERID TO SEARCH @V200930 00883000
LA R0,8 USERID SIZE @V200930 00884000
SL R8,VMDVSTRT SAVE VDEV DISPLACEMENT @VA05147 00884500
CALL DMKUDRFU VERIFY USER ID 00885000
BALR R0,0 SAVE CONDITION CODE @VA05147 00885250
AL R8,VMDVSTRT RESTORE VDEVBLOK ADDRESS @VA05147 00885500
SPM R0 RESTORE CONDITION CODE @VA05147 00885750
BNZ UDRFRET NOT FOUND @V200930 00886000
TM SAVEWRK8,VDEVXFER IS IT TO USERID OPTION ON ?? @V200930 00887000
BZ OKFRET NO, FOR USERID IS OK @V200930 00888000
USING UDIRBLOK,R2 @V200930 00889000
CLC UDIRPASS,=CL8'NOLOG' CAN USER LOGON ?? @V200930 00890000
BE UDRFRET NO, CONT @V200930 00891000
OKFRET LA R0,UDIRSIZE GET SIZE @V200930 00892000
LR R1,R2 BUFFER ADDRESS @V200930 00893000
CALL DMKFRET RETURN @V200930 00894000
B SP04 GET NEXT FIELD @V200930 00895000
UDRFRET LA R0,UDIRSIZE GET SIZE @V200930 00896000
LR R1,R2 BUFFER ADDRESS @V200930 00897000
CALL DMKFRET RETURN @V200930 00898000
LA R1,SAVEWRK2 USERID THAT IS INVALID @V200930 00899000
LA R0,8 SET TO 8 CHARACTERS @V200930 00900000
CLC SAVEWRK2(8),=CL8'SYSTEM' SPOOL TO SYSTEM ?? @V200930 00901000
BNE MSG053E NO, INVALID USERID, NOT KNOWN @V200930 00902000
NI SAVEWRK8,X'FF'-VDEVFOR-VDEVXFER RESET FOR OR TO @V200930 00903000
B SP17A PROCESS AS OFF @V200930 00904000
SPACE 00905000
SP17 EX R14,CLCOFF IS IT OFF ?? @V200930 00906000
BNE SP22 NO, TEST FOR COPY @V200930 00907000
C R14,F2 DID HE SAY OTHER THAN 'OFF' @VM08758 00908000
BNE SP22 YES, ITS NOT THE OFF OPTION THEN @VM08758 00909000
SP17A TM SAVEWRK8,VDEVXFER+VDEVFOR TO OR FOR ALREADY ?? @V200930 00910000
BNZ MSG013E YES, CONFLICT @V200930 00911000
TM SAVEWRK8+1,VDEVXFER+VDEVFOR USERID OFF ALREADY @V200930 00912000
BZ MSG013E YES -- CONFLICTING OPTION 00913000
NI SAVEWRK8+1,X'FF'-VDEVXFER-VDEVFOR FLAG OFF DONE @V200930 00914000
B SP04 GET NEXT @V200930 00915000
SPACE 00916000
SP22 C R0,F2 COUNT CORRECT 00917000
BL SP24A TEST FOR USERID 00918000
EX R14,CLCCOPY COPY ?? 00919000
BNE SP22A NO, TEST FOR CLOSE @V200930 00920000
CLI SAVEWRK1+1,X'00' COPIES PRESENT ?? 00921000
BNE MSG013E YES -- CONFLICTING OPTION 00922000
BAL R4,GETCOPY GET COPIES @V200930 00923000
B SP04 GET NEXT @V200930 00924000
SPACE 00925000
SP22A EX R14,CLCCLOSE TEST FOR CLOSE @V200930 00926000
BNE SP23 NO, TEST FOR PURGE @V200930 00927000
TM SAVEWRK8+3,X'06' CLOSE OR PURGE BEFORE ?? @V200930 00928000
BNZ MSG013E YES @V200930 00929000
OI SAVEWRK8+3,X'04' CLOSE OPTION @V200930 00930000
B SP04 GET NEXT @V200930 00931000
SPACE 00932000
SP23 EX R14,CLCPURG TEST FOR PURGE @V200930 00933000
BNE SP23A NO, TEST FOR FLASH @V60B9BA 00934000
C R0,F3 MIN IS PUR @V200930 00935000
BL SP24AA NO GOOD @V200930 00936000
TM SAVEWRK8+3,X'06' CLOSE OR PURGE BEFORE ?? @V200930 00937000
BNZ MSG013E YES @V200930 00938000
OI SAVEWRK8+3,X'02' PURGE OPTION @V200930 00939000
B SP04 GET NEXT OPTION @V200930 00940000
SPACE 00940100
SP23A EX R14,CLCFLASH TEST FOR FLASH @V60B9BA 00940200
BNE SP23B XFER IF NOT FLASH @V60B9BA 00940300
CLI SAVEWRK5,X'00' FLASH PRESENT? @V60B9BA 00940400
BNE MSG013E YES - CONFLICTING OPTION @V60B9BA 00940500
BAL R4,GETFLASH GET FLASH PARAMETERS @V60B9BA 00940600
B SP04 SCAN FOR NEXT PARAMETER @V60B9BA 00940700
SPACE 00941000
SP23B EX R14,CLCCHARS TEST FOR CHARS @V60B9BA 00941060
BNE SP23C XFER IF NOT CHARS @V60B9BA 00941120
CLI SAVEWRK4,X'00' CHARS PRESENT? @V60B9BA 00941180
BNE MSG013E YES - CONFLICTING OPTION @V60B9BA 00941240
BAL R4,GETCHARS GET CHARS PARAMETER @V60B9BA 00941300
B SP04 SCAN FOR NEXT PARAMETER @V60B9BA 00941360
SPACE 00941420
SP23C EX R14,CLCCMOD TEST FOR MODIFY @V60B9BA 00941480
BNE SP24AA XFER IF NOT FLASH @V60B9BA 00941540
CLI SAVEWRK6,X'00' MODIFY PRESENT ? @V60B9BA 00941600
BNE MSG013E YES - CONFLICTING OPTION @V60B9BA 00941660
BAL R4,GETCMOD GET MODIFY PARAMETER @V60B9BA 00941720
B SP04 SCAN FOR NEXT PARAMETER @V60B9BA 00941780
SPACE 00941840
SP24AA CLI VDEVTYPE,TYP3210 CONSOLE TYPE ?? 00942000
BNE SP24A NO -- 00943000
EX R14,CLCTERM TERM OPTION ? 00944000
BNE SP24B NO -- 00945000
TM SAVEWRK8,VDEVTERM TERM SET ? 00946000
BO MSG013E YES -- CONFLICTING OPTION 00947000
TM SAVEWRK8+1,VDEVTERM NOTERM SET ? 00948000
BZ MSG013E YES -- CONFLICTIONG OPTION 00949000
OI SAVEWRK8,VDEVTERM SET TERM FLAG 00950000
B SP04 GET NEXT @V200930 00951000
SP24B C R0,F3 COUNT OF 3 OR MORE 00952000
BL SP24A NO -- CHECK FOR USERID 00953000
EX R14,CLCSTART START OPTION ?? 00954000
BNE SP24C NO -- CHECK FOR STOP 00955000
TM SAVEWRK8+3,X'60' START OR STOP SET ? 00956000
BNZ MSG013E YES -- CONFLICTING OPTION 00957000
OI SAVEWRK8+3,X'40' INDICATE START OPTION 00958000
B SP04 GET NEXT @V200930 00959000
SP24C EX R14,CLCSTOP STOP OPTION ?? 00960000
BNE SP24D CHECK NOTERM OR TERM 00961000
TM SAVEWRK8+3,X'60' START OR STOP SET ?? 00962000
BNZ MSG013E YES -- CONFLICTING OPTION 00963000
OI SAVEWRK8+3,X'20' SET STOP FLAG 00964000
B SP04 GET NEXT @V200930 00965000
SP24D C R0,F4 VALID COUNT FOR NOTERM 00966000
BL SP24A NO -- CHECK USERID 00967000
EX R14,CLCNOTE NOTERM OPTION ?? 00968000
BNE SP24A NO -- 00969000
TM SAVEWRK8,VDEVTERM TERM OPTION SET ?? 00970000
BO MSG013E YES - CONFLICTING OPTION 00971000
TM SAVEWRK8+1,VDEVTERM NOTERM OPTION SET ?? 00972000
BZ MSG013E YES -- CONFLICTING OPTION 00973000
NI SAVEWRK8+1,X'FF'-VDEVTERM SET NOTERM FLAG 00974000
B SP04 GET NEXT @V200930 00975000
SPACE 00976000
SP24A TM SAVEWRK8+1,VDEVXFER+VDEVFOR USERID OFF ?? @V200930 00977000
BNO MSG003E INVALID OPTION @V200930 00978000
OI SAVEWRK8,VDEVXFER ASSUME SPOOL TO USERID @V200930 00979000
NI SAVEWRK8+1,X'FF'-VDEVFOR RESET FOR USERID @V200930 00980000
B SP15A CHECK FOR USERID 00981000
SPACE 00982000
SP25 EQU * ALL OPTIONS HAVE READ AND NOW TO PROCESS THEM 00983000
SPACE 00984000
TM SAVEWRK8+3,X'80' ANY OPTIONS ?? 00985000
BZ MSG026E NO - MSG026E MISSING OPTION 00986000
SPACE 00987000
L R1,VDEVEXTN XBLOK ADDRESS @V60B9BA 00987250
USING VSPXBLOK,R1 ADDRESSIBILITY @V60B9BA 00987500
SPACE 00987750
CLI SAVEWRK1,X'00' DID CLASS CHANGE ?? 00988000
BE CKCOPY NO 00989000
MVC VDEVCLAS(1),SAVEWRK1 MOVE NEW CLASS 00990000
CKCOPY CLI SAVEWRK1+1,X'00' DID COPY CHANGE ?? 00991000
BE CKXFER NO 00992000
MVC VDEVCOPY+1(1),SAVEWRK1+1 MOVE NEW COPY 00993000
MVI VDEVCOPY,X'00' 00994000
NI VSPXFLG1,X'FF'-VSPXCPYF RESET FLAG @V60B9BA 00995000
TM SAVEWRK8+3,X'01' SHOULD WE SET FLAG ? @V60B9BA 00995500
BZ CKXFER XFER IF NOT @V60B9BA 00996000
OI VSPXFLG1,VSPXCPYF SET THE FLAG @V60B9BA 00996500
CKXFER TM SAVEWRK8+1,VDEVXFER+VDEVFOR SET XFER OFF ?? @V60B9BA 00997000
BZ SP26 JUST GO ONWARD IF SO @V60B9BA 00997500
TM SAVEWRK8,VDEVXFER+VDEVFOR SET XFER ON ?? @V293598 00998000
BZ SP26 XFER TO BE LEFT ALONE @V60B9BA 00999000
CKXUPDAT MVC VSPXXUSR(8),SAVEWRK2 SET NEW XFER VM ID @V293598 01012000
SPACE 01013000
SP26 CLI SAVEWRK7,X'00' FCB CHANGED ? @V60B9BA 01013030
BE SP26A XFER IF NOT @V60B9BA 01013060
MVC VSPXFCB,SAVEWRK7 MOVE IN NEW FCB @V60B9BA 01013090
CLC VSPXFCB,=C'NULL' NULL FCB SPECIFIED ? @V60B9BA 01013120
BNE SP26A XFER IF NOT @V60B9BA 01013150
MVC VSPXFCB,ZEROES MAKE IT INITIALIZED @V60B9BA 01013180
SP26A CLI SAVEWRK5,X'00' FLASH CHANGE ? @V60B9BA 01013210
BE SP26B XFER IF NOT @V60B9BA 01013240
MVC VSPXOVLY,SAVEWRK5 MOVE IN NEW FLASH NAME @V60B9BA 01013270
MVC VSPXFLSH,SAVEWRK9 MOVE IN NEW FLASH COUNT @V60B9BA 01013300
CLI VSPXFLSH,X'00' FLASH COUNT OF ZERO ? @V60B9BA 01013330
BNE SP26B XFER IF NOT @V60B9BA 01013360
XC VSPXOVLY,VSPXOVLY NULLIFY THE FLASH NAME @V60B9BA 01013390
SP26B CLI SAVEWRK4,X'00' CHARS CHANGED ? @V60B9BA 01013420
BE SP26C XFER IF NOT @V60B9BA 01013450
MVC VSPXCHAR,SAVEWRK4 MOVE IN NEW CHARS @V60B9BA 01013480
CLC VSPXCHAR,=C'NULL' NULL CHARS SPECIFIED ? @V60B9BA 01013510
BNE SP26C XFER IF NOT @V60B9BA 01013540
MVC VSPXCHAR,ZEROES MAKE IT INITIALIZED @V60B9BA 01013570
SP26C CLI SAVEWRK6,X'00' MODIFY CHANGED ? @V60B9BA 01013600
BE DOFLAG XFER IF NOT @V60B9BA 01013630
MVC VSPXCMOD,SAVEWRK6 MOVE IN NEW MODIFY @V60B9BA 01013660
CLC VSPXCMOD,=C'NULL' NULL COPY MOD SPECIFIED? @V60B9BA 01013690
BNE DOFLAG XFER IF NOT @V60B9BA 01013720
MVC VSPXCMOD,ZEROES MAKE IT INITIALIZED @V60B9BA 01013750
DROP R1 NO LONGER NEEDED @V60B9BA 01013780
SPACE 01014000
DOFLAG IC R1,SAVEWRK8+1 GET RESET FLAG MASK 01028000
EX R1,NIVDEVFG RESET VEDV FLAG 01029000
IC R1,SAVEWRK8 GET SET FLAG MASK 01030000
EX R1,OIVDEVFG SET NEW FLAGS 01031000
TM SAVEWRK8+3,X'60' START OR STOP OPTION ?? 01032000
BZ SP27 NO -- 01033000
OI VDEVFLAG,VDEVCSPL INDICATE START FLAG 01034000
TM SAVEWRK8+3,X'40' START OPTION IN COMMAND ? 01035000
BO SP27 YES -- LEAVE FLAG SET 01036000
NI VDEVFLAG,X'FF'-VDEVCSPL INDICATE STOP OPTION 01037000
SPACE 01038000
SP27 TM SAVEWRK8+3,X'06' CLOSE OR PURGE ?? @V200930 01039000
BZ SP27A NO, CONT @V200930 01040000
L R9,VDEVSPL GET VDEVSPL BLOK @V200930 01041000
LTR R9,R9 ANY THERE ?? @V200930 01042000
BZ SP27A NO, CONT @V200930 01043000
L R7,VSPSFBLK ANY FILE OPEN ?? @V200930 01044000
LTR R7,R7 .. @V200930 01045000
BZ SP27A NO, CONT @V200930 01046000
SR R2,R2 CLEAR PARM REG @VA01460 01047000
TM SAVEWRK8+3,X'04' CLOSE OPTION ?? @V200930 01048000
BO SP27B YES, CLOSE @V200930 01049000
LA R2,VDEVPURG PURGE ACTIVE FILE @VA01460 01050000
SP27B SL R8,VMDVSTRT VDEVBLOK DISPLACEMENT @VA01460 01051000
CALL DMKVSPCO CLOSE DEVICE @V200930 01052000
AL R8,VMDVSTRT VDEVBLOK ADDRESS @VA01460 01053000
SP27A LTR R5,R5 MORE DEVICES ?? @V200930 01054000
BZ SP28 NO - 01055000
BAL R3,GETDEVIC GET NEXT DEVICE @V200930 01056000
LTR R10,R10 ALL DONE ?? 01057000
BNZ SP25 NO - PROCESS THIS DEVICE 01058000
SP28 CLI SAVEWRK1,X'00' CHANGING CLASS ? @VW01375 01059000
BE CSPEXIT NO - EXIT @V60B9BA 01060000
CLI SAVEWRK8+2,CLASURI READER DEVICE CLASS ? @VW01375 01061000
BNE CSPEXIT NO - EXIT @V60B9BA 01062000
MVC SAVEWRK2(8),VMUSER GET SEARCH USERID @VW01375 01063000
L R7,ARSPRD ADDRESS OF READER CHAIN @VW01375 01064000
PENDLP BAL R4,GETFILE LOCATE RDR SPOOL FILE FOR @VW01375 01065000
* THIS CLASS CHANGE 01066000
LTR R7,R7 SPOOL FILE LOCATED ? @VW01375 01067000
BZ CSPEXIT NO - EXIT @V60B9BA 01068000
TM SFBFLAG,SFBUHOLD FILE IN USER HOLD STATUS ? @VW01375 01069000
BO PENDLP YES - GET NEXT FILE @VW01375 01070000
SPACE 3 01071000
SETPEND EQU * HERE TO POST PENDIN INTERRUPT @VM01016 01072000
SPACE 01073000
USING VCHBLOK,R6 @VM01016 01074000
USING VCUBLOK,R9 @VM01016 01075000
USING IOBLOK,R10 @VM01016 01076000
SPACE 01077000
SR R1,R1 CLEAR CHANNEL TABLE INDEX @VM01016 01078000
LA R4,2 GET GENERAL INDEX INCREMENT @VM01016 01079000
LA R5,30 GET GENERAL COMPARAND FOR BXLE @VM01016 01080000
SPACE 01081000
NEXTCH LH R6,VMCHTBL(R1) GET INDEX TO NEXT VIRTUAL CHANNEL@VM01016 01082000
LTR R6,R6 IS THERE ONE AT THIS ADDRESS @VM01016 01083000
BM CHINDEX NO -- @VM01016 01084000
A R6,VMCHSTRT POINT TO VCHBLOK @VM01016 01085000
SR R2,R2 CLEAR CU TABLE INDEX @VM01016 01086000
NEXTCU LH R9,VCHCUTBL(R2) GET INDEX TO VIRTUAL CU BLOK @VM01016 01087000
LTR R9,R9 IS THERE ONE AT THIS ADDRESS ? @VM01016 01088000
BM CUINDEX NO -- @VM01016 01089000
A R9,VMCUSTRT POINT TO VCUBLOK @VM01016 01090000
SR R3,R3 CLEAR DEVICE BLOK TABLE INDEX @VM01016 01091000
NEXTDEV LH R8,VCUDVTBL(R3) GET INDEX TO DEVICE BLOK @VM01016 01092000
LTR R8,R8 IS THERE ONE AT THIS ADDRESS @VM01016 01093000
BM DEVINDEX NO -- @VM01016 01094000
A R8,VMDVSTRT POINT TO DEVICE BLOK @VM01016 01095000
SPACE 01096000
CLI VDEVTYPC,CLASURI INPUT DEVICE @VM01016 01097000
BNE DEVINDEX NO - @VM01016 01098000
TM VDEVTYPE,TYPRDR IS IT THE RIGHT TYPE ?? @VM01016 01099000
BZ DEVINDEX NO -- @VM01016 01100000
TM VDEVSTAT,X'FF' ANY STATUS PENDING ?? @VM01016 01101000
BNZ DEVINDEX YES, CHECK NEXT DEVICE @VM01016 01102000
CLI VDEVCLAS,C'*' ALL CLASS READER ? @VM01016 01103000
BE TSTBUSY YES, TEST FOR ACTIVE DEVICE @VM01016 01104000
CLC VDEVCLAS(1),SFBCLAS FILE CLASS SAME AS DEVICE ? @VM01016 01105000
BNE DEVINDEX NO - @VM01016 01106000
TSTBUSY ICM R14,B'1111',VDEVSPL IS THE DEVICE BUSY ?? @VM01016 01107000
BZ RDRPEND NO -- FINALLY FOUND A DEVICE @VM01016 01108000
SPACE 01109000
DEVINDEX BXLE R3,R4,NEXTDEV INDEX TO NEXT DEVICE ON CONTROL @VM01016 01110000
* UNIT 01111000
CUINDEX BXLE R2,R4,NEXTCU INDEX TO NEXT CONTROL UNIT ON @VM01016 01112000
* CHANNEL 01113000
CHINDEX BXLE R1,R4,NEXTCH INDEX TO NEXT CHANNEL ON MACHINE @VM01016 01114000
SP31 B CSPEXIT EXIT TO CALLER @VM01016 01115000
SPACE 01116000
RDRPEND EQU * HERE TO QUEUE DEVICE END @VM01016 01117000
LH R2,VDEVADD GET FULL ADDRESS OF DEVICE @VM01016 01118000
LH R5,VCUADD .. @VM01016 01119000
OR R2,R5 .. @VM01016 01120000
AH R2,VCHADD .. @VM01016 01121000
LA R0,IOBSIZE BUILD IOBLOK @VM01016 01122000
CALL DMKFREE .. @VM01016 01123000
LR R10,R1 ADDRESS OF IOBLOK @VM01016 01124000
XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR BLOK @VM01016 01125000
ST R10,IOBLINK INDICATE ORIGINAL COPY @VM01016 01126000
MVI IOBCSW+4,DE FAKE DEVICE END CSW @VM01016 01127000
ST R11,IOBUSER MOVE USER ADDRESS OF VMBLOK @VM01016 01128000
MVC IOBIRA,=A(DMKVIOIN) RETURN ADDRESS @VM01016 01129000
STH R2,IOBVADD PUT ADDRESS IN IOBLOK @VM01016 01130000
OI VDEVSTAT,VDEVPEND SET PENDING FLAG @VM01016 01131000
MVC VDEVCSW(8),IOBCSW MOVE IN DEVICE END CSW @VM01016 01132000
CALL DMKSTKIO GO STACK IO @VM01016 01133000
B PENDLP GET NEXT FILE @VM01016 01134000
DROP R6 @VM01016 01135000
DROP R9 @VM01016 01136000
DROP R10 @VM01016 01137000
SPACE 3 01138000
* ***EXECUTED INSTRUCTIONS*** 01139000
NIVDEVFG NI VDEVSFLG,X'00' 01140000
OIVDEVFG OI VDEVSFLG,X'00' 01141000
MVCID MVC SAVEWRK2(0),0(R1) @V60B9BA 01142000
MVCCHARS MVC SAVEWRK4(0),0(R1) @V60B9BA 01143000
MVCFLASH MVC SAVEWRK5(0),0(R1) @V60B9BA 01144000
MVCCMOD MVC SAVEWRK6(0),0(R1) @V60B9BA 01145000
MVCFCB MVC SAVEWRK7(0),0(R1) @V60B9BA 01146000
CLIALL CLI =AL1(CSPRDR+TYPPRT+TYPPUN),X'00' MASK = READER PRINTER 01147000
* PUNCH 01148000
TMRDR TM =AL1(CSPRDR),X'00' MASK = READER 01149000
TMPRT TM =AL1(TYPPRT),X'00' MASK = PRINTER 01150000
TMPUN TM =AL1(TYPPUN),X'00' MASK = PUNCH 01151000
TMTYPE TM VDEVTYPE,X'00' TEST VDEV TYPE 01152000
TMCON TM =AL1(CSPCON),X'00' MASK = CONSOLE 01153000
SPACE 3 01183000
CLEAR XC SAVEWRK2(32),SAVEWRK2 CLEAR SAVEWRK AREA 01184000
XC SAVEWRK1(4),SAVEWRK1 01185000
BR R4 RETURN TO CALLER 01186000
EJECT 01187000
*. 01188000
* 01189000
* OPERATION OF GETYPE - 01190000
* 01191000
* 1. CALL DMKSCNFD TO LOCATE DEVICE TYPE FIELD 01192000
* 2. IF OPTION='READER','PRINTER','PUNCH','CONSOLE','ALL' ; SET 01193000
* GPR5 = APPROPRIATE DEVICE TYPE. IF OPTION = 'ALL', SET 01194000
* GPR5 EQUAL TO CSPRDR+TYPPRT+TYPPUN; THEN, GO TO STEP 4 01195000
* IF MISSING OR INVALID AND COMMAND IS SPOOL OR CLOSE, 01196000
* EXIT GIVING MSG022E. 01197000
* 3. IF OPTION = VADDR, CALL DMKSCNVU TO LOCATE THE VDEVBLOK, 01198000
* SET GPR5 AND GPR10 = 0, AND EXIT 01199000
* 4. IF TYPE WAS NOT VADDR, LOAD GPR8 WITH VMDVSTRT-VDEVSIZE, 01200000
* AND GPR10 WITH VMDVCNT, AND CALL GETDEVIC TO LOCATE THE 01201000
* FIRST DEVICE OF THE CORRECT TYPE 01202000
* 5. SET GPR6 TO FFS, CALL GETCHAIN (GPR6 WILL BE FILLED BY 01203000
* GETCHAIN WITH THE APPROPRIATE FILE CHAIN ANCHOR) 01204000
* 6. EXIT 01205000
*. 01206000
SPACE 3 01207000
GETYPE EQU * 01208000
SPACE 01209000
GT01 LA R5,CSPRDR+TYPPRT+TYPPUN SET FOR ALL TYPE 01210000
CALL DMKSCNFD LOCATE DEVICE TYPE FIELD 01211000
STM R0,R1,SAVEWRK6 SAVE COUNT AND ADDRESS OF TYPE 01212000
BZ GT02 -- 01213000
LTR R6,R6 VIRTUAL ADDRESS POSSIBLE ?? 01214000
BZ MSG022E YES -- VADDR MISSING 01215000
B DEVIC NO OPTION DEFAULT TO ALL 01216000
SPACE 01217000
GT02 EQU * 01218000
* GPR1 ADDRESS OF TYPE 01219000
LR R14,R0 GET OPTION COUNT 01220000
BCTR R14,0 -1 01221000
C R0,F2 COUNT LENGTH OF 2 01222000
BE GT02A VALID FOR PUNCH 01223000
BL GT02B VALID FOR READER PRINTER 01224000
EX R14,CLCALL ALL ?? 01225000
BE DEVIC YES 01226000
LA R5,CSPCON SET R5 TO CONSOLE TYPE 01227000
EX R14,CLCCONS CONSOLE ?? 01228000
BE DEVIC YES -- 01229000
LA R5,CSPRDR SET R5 TO READER TYPE 01230000
EX R14,CLCRDR RDR ?? 01231000
BE DEVIC YES 01232000
LA R5,TYPPRT PRINTER MASK 01233000
EX R14,CLCPRT PRT ?? 01234000
BE DEVIC YES - 01235000
SPACE 01236000
LA R5,TYPPUN SET GPR5 TO PUNCH TYPE 01237000
EX R14,CLCPCH PCH ?? 01238000
BE DEVIC YES 01239000
GT02A LA R5,TYPPUN PUNCH MASK 01240000
EX R14,CLCPUN PUNCH ?? 01241000
BE DEVIC YES - 01242000
SPACE 01243000
GT02B LA R5,TYPPRT SET GPR5 TO PRINTER TYPE 01244000
EX R14,CLCPRINT PRINTER ?? 01245000
BE DEVIC YES - 01246000
SPACE 01247000
LA R5,CSPRDR TYPE MASK FOR READER 01248000
EX R14,CLCREAD READER ?? 01249000
BE DEVIC 01250000
LTR R6,R6 POSSIBLE VADDR ?? 01251000
BZ GT03 YES -- 01252000
B MSG006E NO -- ERROR DMKCSP006E 01253000
SPACE 01254000
GT03 EQU * MUST BE VADDR 01255000
SPACE 01256000
STM R0,R1,SAVEWRK6 SAVE COUNT AND DEVICE ADDRESS 01257000
C R0,F3 COUNT OF 3 OR LESS ?? 01258000
BH MSG022E VADDR INVALID 01259000
CALL DMKCVTHB CONVERT TO BINARY 01260000
BNZ MSG022E INVALID VADDRESS 01261000
CALL DMKSCNVU LOCATE VDEVBLOK 01262000
BNZ MSG040E NONEXISTENT UNIT 01263000
TM VDEVTYPC,CLASURO+CLASTERM OUTPUT OR CONSOLE CLASS ? 01264000
BZ GT03A NO - CHECK INPUT TYPE 01265000
TM VDEVTYPE,TYPPRT+TYPPUN PRINTER OR PUNCH ?? 01266000
BNZ GT03B YES -- 01267000
CLI VDEVTYPE,TYP3210 CONSOLE TYPE ? 01268000
BE GT03B YES -- 01269000
B MSG006E INVALID DEVICE TYPE 01270000
GT03A TM VDEVTYPC,CLASURI INPUT DEVICE TYPE ?? 01271000
BZ MSG006E NO -- 01272000
TM VDEVTYPE,TYPRDR READER ?? 01273000
BZ MSG006E NO -- INVALID DEVICE TYPE 01274000
GT03B EQU * 01275000
TM VDEVSTAT,VDEVDED DEDICATED TO REAL DEVICE ?? 01276000
BO MSG006E YES -- INVALID DEVICE TYPE 01277000
SR R5,R5 SET GPR5 TO ZERO 01278000
SR R10,10 SET GPR10 TO ZERO 01279000
B GT06 RETURN TO CALLER 01280000
SPACE 2 01281000
DEVIC EQU * HERE TO SET UP FOR GETDEVIC 01282000
C R6,FFS DO WE NEED VDEVBLOK ADDRESS ?? 01283000
BE GT05 NO -- MUST BE HOLD OR FREE CMD 01284000
GT04 L R8,VMDVSTRT POINTER TO VDEVBLOK TABLE 01285000
S R8,=A(VDEVSIZE*8) SUBSTRACT BLOK SIZE 01286000
LH R10,VMDVCNT VDEVICE COUNT 01287000
LTR R10,R10 ANY DEVICES FOR THIS USER ?? 01288000
BP GT04A YES -- 01289000
MSG040 LA R2,40 NO -- DOES NOT EXIST 01290000
B EXIT8 ERROR MSG DMKCSP040E 01291000
GT04A EQU * 01292000
A R10,F1 INCREASE DEVICE COUNT BY ONE 01293000
BAL R3,GETDEVIC GET NEXT DEVICE @V200930 01294000
LTR R10,R10 ANY MORE VDEVBLOKS ?? 01295000
BZ MSG040 NO -- ERROR DMKCSP040E 01296000
B GT06 SET ZERO COND @V200930 01297000
SPACE 01298000
GT05 L R6,FFS SET 1ST TIME SWITCH FOR GETCHAIN 01299000
BAL R3,GETCHAIN GET NEXT FILE CHAIN @V200930 01300000
SPACE 01301000
GT06 CR R2,R2 SET CC = ZERO 01302000
BR R4 RETURN TO CALLER 01303000
SPACE 3 01304000
SPACE 3 01305000
CLCALL CLC 0(0,R1),=C'ALL ' COMPARE FOR ALL 01306000
CLCRDR CLC 0(0,R1),=C'RDR ' COMPARE FOR RDR 01307000
CLCPCH CLC 0(0,R1),=C'PCH ' COMPARE FOR PCH 01308000
CLCPRT CLC 0(0,R1),=C'PRT ' COMPARE FOR PRT 01309000
CLCPRINT CLC 0(0,R1),=C'PRINTER ' COMPARE FOR PRINTER 01310000
CLCPUN CLC 0(0,R1),=C'PUNCH ' COMPARE FOR PUNCH 01311000
CLCREAD CLC 0(0,R1),=C'READER ' COMPARE FOR READER 01312000
CLCCLASS CLC 0(0,R1),=C'CLASS ' COMPARE FOR CLASS 01313000
CLCCON CLC 0(0,R1),=C'CONT ' COPARE FOR CONT 01314000
CLCNOCON CLC 0(0,R1),=C'NOCONT ' COMPARE FOR NOCONT 01315000
CLCHOLD CLC 0(0,R1),=C'HOLD ' COMPARE FOR HOLD 01316000
CLCNOHLD CLC 0(0,R1),=C'NOHOLD ' COMPARE FOR NOHOLD 01317000
CLCEOF CLC 0(0,R1),=C'EOF ' COMPARE FOR EOF 01318000
CLCNOEOF CLC 0(0,R1),=C'NOEOF ' COMPARE FOR NOEOF 01319000
CLCTO CLC 0(0,R1),=C'TO ' COMPARE FOR TO 01320000
CLCFOR CLC 0(0,R1),=C'FOR ' COMPARE FOR FOR @V200930 01321000
CLCOFF CLC 0(0,R1),=C'OFF ' COMPARE FOR OFF 01322000
CLCCOPY CLC 0(0,R1),=C'COPY ' COMPARE FOR COPY 01323000
CLCPURG CLC 0(0,R1),=C'PURGE ' COMPARE FOR PURGE 01325000
CLCCLOSE CLC 0(0,R1),=C'CLOSE ' COMPARE FOR CLOSE @V200930 01326000
CLCCONS CLC 0(0,R1),=C'CONSOLE ' COMPARE FOR CONSOLE 01328000
CLCSTART CLC 0(0,R1),=C'START ' COMPARE FOR START 01329000
CLCSTOP CLC 0(0,R1),=C'STOP ' COMPARE FOR STOP 01330000
CLCTERM CLC 0(0,R1),=C'TERM ' COMPARE FOR TERM 01331000
CLCNOTE CLC 0(0,R1),=C'NOTERM ' COMPARE FOR NOTERM 01332000
CLCCHARS CLC 0(0,R1),=C'CHARS ' COMPARE FOR CHARS @V60B9BA 01333000
CLCFLASH CLC 0(0,R1),=C'FLASH ' COMPARE FOR FLASH @V60B9BA 01333250
CLCCMOD CLC 0(0,R1),=C'MODIFY ' COMPARE FOR MODIFY @V60B9BA 01333500
CLCFCB CLC 0(0,R1),=C'FCB ' COMPARE FOR FCB @V60B9BA 01333750
EJECT 01334000
*. 01335000
* OPERATION OF GETCLASS - 01336000
* 01337000
* 1. CALL DMKSCNFD TO LOCATE THE DESIRED CLASS 01338000
* 2. VERIFY THAT ONLY ONE CLASS IS GIVEN, AND TRT THE CLASS 01339000
* AGAINST A TABLE OF VALID CLASSES TO VERIFY ITS VALIDITY; 01340000
* IF MISSING OR INVALID, EXIT GIVING MSG028E. 01341000
* THE FUNCTION TABLE IS SET TO STORE THE VALID CLASS IN GPR2 01342000
* SAVE THE VALID CLASS IN SAVEWRK1. 01343000
* 3. NOTE THAT GETCLASS IS A 2ND LEVEL ROUTINE; LINKAGE IS VIA 01344000
* GPR3 01345000
*. 01346000
SPACE 3 01347000
GETCLASS EQU * HERE TO LOCATE AND VERIFY CLASS 01348000
SPACE 01349000
GCL01 CALL DMKSCNFD 01350000
BNZ MSG028E CLASS MISSING - EXIT 01351000
SPACE 01352000
GCL02 C R0,F1 MUST BE ONLY ON CLASS COUNT=1 01353000
BNE MSG028E NO-- 01354000
TM VDEVTYPC,CLASURI IS IT A READER CLASS ?? @V200930 01355000
BZ GCL05 NO, CONT @V200930 01356000
TM VDEVTYPE,TYPRDR IS IT A READER ?? @V200930 01357000
BZ GCL05 NO, CONT @V200930 01358000
CLI 0(R1),C'*' IS IT CLASS * ... READ ANY ?? @V200930 01359000
BNE GCL05 NO, CONT @V200930 01360000
IC R2,0(R1) GET CLASS IN R2 @V200930 01361000
B GCL03 SET DEVICE CLASS @V200930 01362000
GCL05 DS 0H @V200930 01363000
CLI 0(R1),C'A' CLASS LOWER THAN A 01364000
BL MSG028E YES - INVALID CLASS 01365000
ST R2,TEMPR2 SAVE GPR2 01366000
TRT 0(1,R1),CLTABLE CLASS VALID ?? 01367000
BH GCL03 VALID 01368000
B MSG028E NO - INVALID CLASS 01369000
SPACE 01370000
GCL03 EQU * 01371000
STC R2,SAVEWRK1 SAVE CLASS 01372000
GCL04 CR R1,R1 CC = ZERO 01373000
L R2,TEMPR2 RESTORE GPR2 01374000
BR R3 RETURN TO CALLER 01375000
SPACE 3 01376000
ORG *-193 01377000
CLTABLE EQU * 01378000
ORG 01379000
DC C'ABCDEFGHI' 01380000
DC XL7'00' 01381000
DC C'JKLMNOPQR' 01382000
DC XL8'00' 01383000
DC C'STUVWXYZ' 01384000
DC XL6'00' 01385000
DC C'0123456789' 01386000
DC XL6'00' 01387000
DS 0H 01388000
SPACE 01389000
EJECT 01390000
*. 01391000
* 01392000
* OPERATION OF GETFILE - 01393000
* 01394000
* 1. UPON ENTRY, GPR6 = ADDRESS OF A POINTER TO THE NEXT SFBLOK 01395000
* TO TEST 01396000
* 2. LOAD GPR7 WITH POINTER TO NEXT BLOK; IF ZERO, EXIT 01397000
* 3. IF SAVEWRK2,3 EQUALS ZERO OR SFBUSER, GO TO STEP 4; 01398000
* OTHERWISE GO TO STEP 6 01399000
* 4. IF SAVEWRK1(1) EQUALS ZERO OR SFBCLAS,GO TO STEP 5; 01400000
* OTHERWISE GO TO STEP 6 01401000
* 5. IF SAVEWRK1+2(2) EQUALS ZERO OR SFBFILID, EXIT 01402000
* 6. IF NO MATCH, GO TO STEP 2 01403000
*. 01404000
SPACE 01405000
GETFILE EQU * HERE TO LOCATE THE REQUESTED FILE 01406000
SPACE 01407000
GF01 EQU * GPR7 = POINTER TO NEXT SFBLOK 01408000
GF02 LR R6,R7 SFBLOK PRESENT ?? 01409000
L R7,0(R7) 01410000
LTR R7,R7 01411000
BCR 8,R4 NO -RETURN TO CALLER WITH GPR7 ZERO 01412000
SPACE 01413000
GF03 TM SFBFLAG,SFBINUSE FILE IN USE ?? 01414000
BO GF02 GET NEXT FILE 01415000
CLI SAVEWRK2,X'40' USERID PRESENT ?? 01416000
BNH GF04 NO -- USE ALL FILES 01417000
CLC SAVEWRK2(8),SFBUSER USERID EQUALS ?? 01418000
BNE GF02 NO 01419000
SPACE 01420000
GF04 CLI SAVEWRK1,X'00' SEARCH BY CLASS ?? 01421000
BE GF05 NO 01422000
CLI SAVEWRK1,C'*' ALL CLASS DEVICE ?? @VM01016 01423000
BE GF05 YES, @VM01016 01424000
CLC SAVEWRK1(1),SFBCLAS CLASS EQUALS ?? 01425000
BNE GF02 NO - 01426000
SPACE 01427000
GF05 CLC SAVEWRK1+2(2),ZEROES SEARCH BY SPOOLID 01428000
BE GF06 YES 01429000
CLC SAVEWRK1+2(2),SFBFILID SPOOLID EQUAL ?? 01430000
BNE GF02 NO - 01431000
SPACE 01432000
GF06 EQU * 01433000
BR R4 RETURN TO CALLER 01434000
EJECT 01435000
*. 01436000
* OPERATION OF GETCOPY - 01437000
* 01438000
* 1. CALL DMKSCNFD TO LOCATE NUMBER OF COPIES 01439000
* IF MISSING OR INVALID, EXIT GIVING MSG030E. 01440000
* 2. CONVERT DECIMAL NUMBER TO BINARY, AND VERIFY THAT 01441000
* IT IS LESS THAN 100 01442000
* 3. STORE NUMBER OF COPIES IN SAVEWRK1+1(1) 01443000
*. 01444000
SPACE 3 01445000
GETCOPY EQU * HERE TO LOCATE NUMBER OF COPIES AND CONVERT TO BINARY 01446000
CALL DMKSCNFD LOCATE NUMBER OF COPIES 01447000
BNZ MSG030E NUMBER OF COPIES MISSING 01448000
CLI 0(R1),C'*' SPECIAL COPY FOR 3800 ? @V60B9BA 01448200
BNE GETCOPY2 XFER IF NOT @V60B9BA 01448400
OI SAVEWRK8+3,X'01' SET THE FLAG @V60B9BA 01448600
BCTR R0,0 DECREMENT THE COUNT @V60B9BA 01448800
LTR R0,R0 IS IT ZERO ? @V60B9BA 01449000
BZ MSG030E ERROR IF SO @V60B9BA 01449200
LA R1,1(R1) POINT PAST THE ASTERISK @V60B9BA 01449400
GETCOPY2 C R0,F2 LENGTH GREATER THAN 2 ? @V60B9BA 01449600
BH MSG030E YES - INVALID 01450000
CALL DMKCVTDB CONVERT TO BINARY 01451000
BNZ MSG030E INVALID NUMBER OF COP8&IES 01452000
SPACE 01453000
CH R1,=H'99' LARGER THAN 99 ?? 01454000
BH MSG030E YES - 01455000
LTR R1,R1 COPY EQUAL ZERO 01456000
BNP MSG030E 01457000
STC R1,SAVEWRK1+1 SAVE NUMBER OF COPIES 01458000
BR R4 RETURN TO CALLER 01459000
EJECT 01460000
*. OPERATION OF GETCHARS - 01460010
* 01460020
* 1. CALL DMKSCNFD TO LOCATE CHARS SPECIFIED 01460030
* 2. IF MISSING OR GREATER THAN 4 CHARACTERS, EXIT 01460040
* GIVING MSG245E. 01460050
* 3. STORE VALUE IN SAVEWRK4. 01460060
*. 01460070
SPACE 3 01460080
GETCHARS CALL DMKSCNFD LOCATE CHARS VALUE @V60B9BA 01460090
BNZ MSG245E CHARS PARAMETER MISSING @V60B9BA 01460100
C R0,F4 LENGTH GREATER THAN 4 ? @V60B9BA 01460110
BH MSG245E YES - INVLALID @V60B9BA 01460120
MVC SAVEWRK4(4),BLANKS INITIALIZE @V60B9BA 01460130
LR R2,R0 EXECUTE FROM R2 @V60B9BA 01460140
BCTR R2,0 LESS ONE FOR EXECUTE INST @V60B9BA 01460150
EX R2,MVCCHARS SAVE THE CHARS VALUE @V60B9BA 01460160
BR R4 RETURN TO CALLER @V60B9BA 01460170
EJECT 01460180
*. 01460190
* OPERATION OF GETFLASH - 01460200
* 01460210
* 1. CALL DMKSCNFD TO GET FLASH OVERLAY NAME. 01460220
* 2. IF MISSING OR GREATER THAN 4 CHARS EXIT 01460230
* GIVING MSG243E. 01460240
* 3. SAVE FLASH OVERLAY NAME IN SAVEWRK5. 01460250
* 4. CALL DMKSCNFD TO GET FLASH COUNT. 01460260
* 5. IF MISSING OF NOT BETWEEN 0 AND 99, EXIT 01460270
* GIVING MSG243E. 01460280
* 6. SAVE FLASH COUNT IN SAVEWRK9. 01460290
*. 01460300
SPACE 3 01460310
GETFLASH CALL DMKSCNFD LOCATE FLASH OVERLAY NAME @V60B9BA 01460320
BNZ MSG243E FLASH NAME MISSING @V60B9BA 01460330
C R0,F4 GREATER THAN 4 CHARS ? @V60B9BA 01460340
BH MSG243E INVALID IF SO @V60B9BA 01460350
MVC SAVEWRK5(4),BLANKS INITIALIZE @V60B9BA 01460360
LR R2,R0 WHERE TO EX FROM @V60B9BA 01460370
BCTR R2,0 DECREMENT FOR EXECUTE @V60B9BA 01460380
EX R2,MVCFLASH SAVE THE FLASH NAME @V60B9BA 01460390
CALL DMKSCNFD LOCATE FLASH COUNT @V60B9BA 01460400
BNZ MSG243E FLASH COUNT MISSING @V60B9BA 01460410
C R0,F2 LENGTH GREATER THAN 2 @V60B9BA 01460420
BH MSG243E INVALID IF SO @V60B9BA 01460430
CALL DMKCVTDB CONVERT TO BINARY @V60B9BA 01460440
BNZ MSG243E INVALID FLASH COUNT @V60B9BA 01460450
CH R1,=H'99' LARGER THAN 99 ? @V60B9BA 01460460
BH MSG243E XFER IF SO @V60B9BA 01460470
STC R1,SAVEWRK9 SAVE THE COUNT @V60B9BA 01460480
BR R4 RETURN TO CALLER @V60B9BA 01460490
EJECT 01460500
*. 01460510
* OPERATION OF GETCMOD - 01460520
* 01460530
* 1. CALL DMKSCNFD TO LOCATE MODIFY VALUE. 01460540
* 2. IF MISSING OR GREATER THAN 4 CHARACTERS, 01460550
* EXIT GIVING MSG253E. 01460560
* 3. SAVE THE MODIFY VALUE IN SAVEWRK6. 01460570
*. 01460580
SPACE 3 01460590
GETCMOD CALL DMKSCNFD LOCATE MODIFY VALUE @V60B9BA 01460600
BNZ MSG253E ERROR IF MISSING @V60B9BA 01460610
C R0,F4 MORE THAN 4 CHARACTERS ? @V60B9BA 01460620
BH MSG253E INVALID IF SO @V60B9BA 01460630
MVC SAVEWRK6(4),BLANKS INITIALIZE @V60B9BA 01460640
LR R2,R0 COUNT FOR EXECUTE @V60B9BA 01460650
BCTR R2,0 DECREMENT FOR EXECUTE @V60B9BA 01460660
EX R2,MVCCMOD SAVE THE MODIFY VALUE @V60B9BA 01460670
BR R4 RETURN TO CALLER @V60B9BA 01460680
EJECT 01460690
*. 01460700
* OPERATION OF GETFCB - 01460710
* 01460720
* 1. CALL DMKSCNFD TO LOCATE FCB VALUE. 01460730
* 2. IF MISSING OR GREATER THAN 4 CHARACTERS, 01460740
* EXIT GIVING MSG246E. 01460750
* 3. SAVE THE FCB VALUE IN SAVEWRK7. 01460760
*. 01460770
SPACE 3 01460780
GETFCB CALL DMKSCNFD LOCATE FCB VALUE @V60B9BA 01460790
BNZ MSG246E ERROR IF MISSING @V60B9BA 01460800
C R0,F4 GREATER THAN 4 CHARS ? @V60B9BA 01460810
BH MSG246E XFER IF SO @V60B9BA 01460820
MVC SAVEWRK7(4),BLANKS INITIALIZE @V60B9BA 01460830
LR R2,R0 GET THE COUNT IN R2 @V60B9BA 01460840
BCTR R2,0 DECREMENT FOR EXECUTE @V60B9BA 01460850
EX R2,MVCFCB SAVE THE FCB VALUE @V60B9BA 01460860
BR R4 RETURN TO CALLER @V60B9BA 01460870
EJECT 01460880
*. 01461000
* OPERATION OF GETDEVIC - 01462000
* 01463000
* 1. UPON ENTRY, THE FOLLOWING REGISTERS MUST BE LOADED - 01464000
* GPR5 = THE DEVICE TYPE TO SEARCH FOR 01465000
* GPR8 = ADDRESS OF VDEVBLOK AT WHICH TO START SEARCH 01466000
* GPR10 = NUMBER OF VDEVBLOKS TO SEARCH 01467000
* 2. ADD VDEVSIZE TO GPR8 AND DECREMENT GPR10; IF GPR10 = 0,EXIT 01468000
* 3. TEST FOR DEVICE CLASS OF UNIT RECORD; IF NOT U/R, GO TO 2 01469000
* 4. EXECUTE TM USING MASK IN GPR5 AGAINST VDEVTYPE; BRANCH 01470000
* ON ONES BACK TO CALLER; OTHERWISE, GO TO STEP 2 01471000
* 5. NOTE THAT GETDEVIC IS A 2ND LEVEL ROUTINE; LINKAGE IS VIA 01472000
* GPR3 01473000
*. 01474000
SPACE 3 01475000
GETDEVIC EQU * HERE TO LOCATE NEXT DEVICE FOR THIS TYPE 01476000
SPACE 01477000
* GPR5 = DEVICE TYPE TO SEARCH FOR 01478000
* GPR8 = ADDRESS OF VDEVBLOK TO START SEARCH 01479000
* GPR10 = NUMBER OF VDEVBLOKS TO SEARCH 01480000
SPACE 01481000
GD02 A R8,=A(VDEVSIZE*8) POINT TO NEXT DEVBLOK 01482000
BCT R10,GD03 DECREMENT COUNT 01483000
BR R3 COUNT IS ZERO, RETURN TO CALLER 01484000
SPACE 01485000
GD03 CLC VDEVADD,FFS ACTIVE DEVICE 01486000
BE GD02 NO -- 01487000
TM VDEVSTAT,VDEVDED DEDICATED TO REAL DEVICE ?? 01488000
BO GD02 YES -- TRY NEXT 01489000
TM VDEVTYPC,CLASURI INPUT UNIT RECORD ?? 01490000
BZ GD04 NO - CHECK OUTPUT 01491000
TM VDEVTYPE,TYPRDR IS IT A READER? @VA03722 01492000
BZ GD02 NO, TRY NEXT BLOCK @VA03722 01493000
EX R5,TMRDR VALID READER ?? 01494000
BCR 7,R3 YES - 01495000
B GD02 NO - TRY NEXT BLOK 01496000
SPACE 01497000
GD04 EQU * 01498000
CLI VDEVTYPC,CLASURO OUTPUT CLASS ?? 01499000
BNE GD05 NO -- 01500000
TM VDEVTYPE,TYPPUN+TYPPRT TYPE PUNCH OR PRINTER 01501000
BZ GD02 NO - 01502000
EX R5,TMTYPE MATCH SEARCH DEVICE PUNCH OR PRINTER 01503000
BZ GD02 NO 01504000
BR R3 YES - 01505000
SPACE 01506000
GD05 CLI VDEVTYPC,CLASTERM CONSOLE CLASS ? 01507000
BNE GD02 NO -- GET NEXT DEVICE 01508000
CLI VDEVTYPE,TYP3210 CONSOLE TYPE ? 01509000
BNE GD02 NO -- GET NEXT DEVICE 01510000
EX R5,TMCON CONSOLE TYPE REQUESTED ? 01511000
BZ GD02 NO -- GET NEXT DEVICE 01512000
BR R3 RETURN TO CALLER 01513000
SPACE 01514000
EJECT 01515000
*. 01564000
* OPERATION OF GETCHAIN - 01565000
* 01566000
* 1. IF GPR5 = 0, SET GPR6 = 0 AND EXIT; 01567000
* 2. IF GPR6 = FFS, GO TO STEP 6; 01568000
* 3. IF GPR5 HAS CSPRDR BIT ON,REMOVE BIT, GO TO STEP 7; 01569000
* 4. IF GPR5 HAS TYPPRT BIT ON,REMOVE BIT, GO TO STEP 8; 01570000
* 5. REMOVE TYPPUN BIT IN GPR5, SET GPR6 TO ZERO, EXIT 01571000
* 6. IF GPR5 HAS CSPRDR BIT ON, LOAD GPR6 WITH ARSPRD, EXIT; 01572000
* 7. IF GPR5 HAS TYPPRT BIT ON, LOAD GPR6 WITH ARSPPR, EXIT; 01573000
* 8. IF GPR5 HAS TYPPUN BIT ON, LOAD GPR6 WITH ARSPPU,EXIT; 01574000
* 9. SET GPR6 = 0, EXIT 01575000
*. 01576000
SPACE 3 01577000
GETCHAIN EQU * HERE TO GET NEXT FILE CHAIN ANCHOR POINTER 01578000
SPACE 01579000
GC01 LTR R5,R5 FILE TYPE ZERO ?? 01580000
BNZ GC02 NO-- 01581000
SR R6,R6 YES - ZERO GPR6 01582000
BR R3 RETURN TO CALLER 01583000
SPACE 01584000
GC02 C R6,FFS 1ST TIME SWITCH ON ?? 01585000
LR R6,R5 SAVE DEVICE TYPE FOR CHANGE COMPARE 01586000
BE GC06 YES - DO NOT RESET ANY BITS, JUST 01587000
* LOAD GPR6 01588000
SPACE 01589000
GC03 N R5,=A(255-CSPRDR) REMOVE READER BIT 01590000
CR R6,R5 WAS IT ON ?? 01591000
BNE GC07 NO 01592000
SPACE 01593000
GC04 N R5,=A(255-TYPPRT) REMOVE PRINTER BIT 01594000
CR R6,R5 WAS IT ON ?? 01595000
BNE GC08 NO 01596000
SPACE 01597000
GC05 SR R5,R5 REMOVE PUNCH BIT 01598000
SR R6,R6 SET GPR6 TO ZERO 01599000
BR R3 RETURN TO CALLER - END OF CHAIN 01600000
SPACE 01601000
GC06 L R7,ARSPRD LOAD READER FILE CHAIN POINTER 01602000
* ANCHOR 01603000
EX R5,TMRDR READER BIT ON ?? 01604000
BCR 7,R3 YES - RETURN TO CALLER 01605000
SPACE 01606000
GC07 L R7,ARSPPR LOAD PRINTER FILE CHAIN POINTER 01607000
* ANCHOR 01608000
EX R5,TMPRT PRINTER BIT ON ?? 01609000
BCR 7,R3 YES - RETURN TO CALLER 01610000
SPACE 01611000
GC08 L R7,ARSPPU LOAD PUNCH FILE CHAIN POINTER ANCHOR 01612000
EX R5,TMPUN PUNCH BIT ON ?? 01613000
BCR 7,R3 YES - RETURN TO CALLER 01614000
SPACE 01615000
GC09 SR R6,R6 SET GPR6 = ZERO - ALL DONE 01616000
SR R7,R7 01617000
BR R3 RETURN TO CALLER 01618000
EJECT 01619000
**************************************** 01620000
* 01621000
* ERROR EXITS FROM DMKCSP 01622000
* 01623000
**************************************** 01624000
SPACE 2 01625000
MSG003E EQU * HERE IF INVALID OPTION FOR THIS COMMAND 01626000
LA R2,003 ERROR MSG DMKCSP003E 01627000
B EXIT8 EXIT TO ERROR MODULE 01628000
SPACE 2 01629000
MSG006E EQU * HERE IF DEVICE TYPE IS INVALID 01630000
LA R2,006 ERROR MSG DMKCSP006E 01631000
LM R0,R1,SAVEWRK6 COUNT AND ADDRESS OF INVALID TYPE 01632000
B EXIT8 EXIT TO ERROR MODULE 01633000
SPACE 2 01634000
MSG007E EQU * HERE IF USERID IS INVALID 01635000
LA R2,007 ERROR MSG DMKCSP007E 01636000
B EXIT8 01637000
SPACE 2 01638000
MSG013E EQU * HERE IF CONFLICTING OPTIONS 01639000
LA R2,013 ERROR MSG DMKCSP013E 01640000
B EXIT8 01641000
SPACE 2 01642000
MSG020E EQU * HERE IF USERID IS MISSING OR INVALID 01643000
LA R2,020 ERROR MSG DMKCSP020E 01644000
B EXIT8R1 EXIT TO ERROR MODULE 01645000
SPACE 2 01646000
MSG022E EQU * HERE IF VIRTUAL ADDRESS MISSING OR 01647000
* INVALID 01648000
LA R2,022 ERROR MSG DMKCSP022E 01649000
B EXIT8R1 .. 01650000
SPACE 01651000
MSG026E EQU * HERE IF OPERAND MISSING OR INVALID 01652000
LA R2,026 ERROR MSG DMKCSP026E 01653000
B EXIT8R1 EXIT TO ERROR MODULE 01654000
SPACE 2 01655000
MSG028E EQU * HERE IF CLASS IS MISSING OR INVALID 01656000
LA R2,028 ERROR MSG DMKCSP028E 01657000
B EXIT8R1 01658000
SPACE 01659000
MSG029E EQU * HERE IF FNAME FTYPE MISSING OR INVALID 01660000
LA R2,029 ERROR MSG DMKCSP029E 01661000
B EXIT8R1 EXIT TO ERROR MODULE 01662000
SPACE 2 01663000
MSG030E EQU * HERE IF COPIES IS MISSING OR INVALID 01664000
LA R2,030 ERROR MSG DMKCSP030E 01665000
B EXIT8R1 EXIT TO ERROR MODULE 01666000
SPACE 2 01667000
MSG032E EQU * HERE IF DISTCODE IS MISSING OR INVALID 01668000
LA R2,032 ERROR MSG DMKCSP032E 01669000
B EXIT8R1 EXIT TO ERROR MODULE 01670000
SPACE 2 01671000
MSG040E EQU * HERE IF DEVICE DOES NOT EXIST 01672000
LA R2,040 ERROR MSG DMKCSP040E 01673000
LM R0,R1,SAVEWRK6 COUNT AND ADDRESS OF OPTION 01674000
B EXIT8 01675000
SPACE 2 01676000
MSG053E EQU * HERE IF USERID NOT IN CP DIRECTORY 01677000
LA R2,053 ERROR MSG DMKCSP053E 01678000
B EXIT8 01679000
SPACE 2 01679050
MSG243E EQU * HERE IF FLASH MISSING OR INVALID @V60B9BA 01679100
LA R2,243 ERROR MSG DMKCSP243E @V60B9BA 01679150
B EXIT8R1 EXIT TO ERROR MODULE @V60B9BA 01679200
SPACE 2 01679250
MSG245E EQU * HERE IF CHARS MISSING OR INVALID @V60B9BA 01679300
LA R2,245 ERROR MSG DMKCSP245E @V60B9BA 01679350
B EXIT8R1 EXIT TO ERROR MODULE @V60B9BA 01679400
SPACE 2 01679450
MSG246E EQU * HERE IS FCB MISSING OR INVALID @V60B9BA 01679500
LA R2,246 ERROR MSG DMKCSP246E @V60B9BA 01679550
B EXIT8R1 EXIT TO ERROR MODULE @V60B9BA 01679600
SPACE 2 01679650
MSG253E EQU * HERE IS MODIFY MISSING OR INVALID @V60B9BA 01679700
LA R2,253 ERROR MSG DMKCSP253E @V60B9BA 01679750
B EXIT8R1 EXIT TO ERROR MODULE @V60B9BA 01679800
EJECT 01680000
**************************************** 01681000
* 01682000
* FINAL EXIT BACK TO DMKCFM 01683000
* 01684000
**************************************** 01685000
SPACE 3 01686000
CSPEXIT EQU * HERE FOR NORMAL EXIT FROM DMKCSP 01687000
SR R2,R2 CLEAR ERROR REGISTER 01688000
B EXIT1 NOW EXIT 01689000
SPACE 2 01690000
EXIT8R1 SR R1,R1 01691000
SR R0,R0 01692000
EXIT8 ICM R0,14,ID+3 MOVE IN MODULE ID 01693000
EXIT1 LTR R2,R2 ERROR CODE PRESENT ?? 01694000
BNZ ERREXIT YES -- 01702000
EXIT3 EXIT EXIT NO ERROR @V60B9BA 01703000
SPACE 01704000
ERREXIT CALL DMKERMSG EXIT TO MESSAGE MODULE 01705000
SPACE 01706000
* MODULE DMKERMSG WILL GIVE SVC16 AND RETURN CONTROL TO DMKCFM 01707000
EJECT 01708000
**************************************** 01709000
* 01710000
* MESSAGES AND CONSTANTS 01711000
* 01712000
**************************************** 01713000
SPACE 2 01714000
LTORG 01715000
EJECT 01716000
CSPRDR EQU X'20' 01717000
CSPCON EQU X'10' 01718000
SPACE 01719000
PSA , @V306638 01720000
COPY CONBUF @V306638 01721000
COPY DEVTYPES @V306638 01722000
COPY EQU @V306638 01723000
COPY IOBLOKS @V306638 01724000
COPY RBLOKS @V306638 01725000
COPY SAVE @V306638 01726000
COPY SPOOL @V306638 01727000
COPY UDIRECT @V306638 01728000
COPY VBLOKS @V306638 01729000
COPY VMBLOK @V306638 01730000
END 01731000