STT TITLE 'DMSSTT (CMS) VM/370 - RELEASE 6' 00001000
SPACE 2 00002000
*. 00003000
* 00004000
* 00005000
* 00006000
* 00007000
* MODULE NAME: 00008000
* 00009000
* DMSSTT 00010000
* 00011000
* FUNCTION: 00012000
* 00013000
* TO LOCATE THE FILE STATUS TABLE ENTRY FOR A GIVEN 00014000
* FILE, AND IF FOUND TO PROVIDE THE CALLER WITH A COPY 00015000
* THEREOF. 00016000
* 00017000
* ATTRIBUTES: 00018000
* 00019000
* NUCLEUS RESIDENT, REENTRANT 00020000
* 00021000
* ENTRY POINTS: 00022000
* 00023000
* DMSSTTE - (STATE) 00024000
* DMSSTTW - (STATEW) 00025000
* 00026000
* ENTRY CONDITIONS: 00027000
* 00028000
* LA R1, PLIST R1 MUST POINT TO P-LIST AS USUAL 00029000
* 00030000
* THEN EITHER 00031000
* 00032000
* SVC X'CA' CALL STATE VIA SVC 00033000
* DC AL4(NOT FOUND) ERROR-RETURN (IF NOT FOUND) 00034000
* 00035000
* OR 00036000
* 00037000
* L R15, ASTATE WHERE ASTATE=V(STATE) 00038000
* BALR R14,R15 CALL STATE VIA BALR 00039000
* BNZ NOTFOUND TRANSFER IF ERROR (NOT FOUND) 00040000
* 00041000
* 00042000
* R1 MUST POINT TO STATE PARAMETER LIST: 00043000
* 00044000
* DS 0F 00045000
* PLIST DC CL8'STATE' (NOTE-IMMATERIAL IF CALLED BY BALR) 00046000
* DC CL8' ' FILENAME 00047000
* DC CL8' ' FILETYPE 00048000
* DC CL2' ' FILEMODE 00049000
* DC CL2' ' NOT USED 00050000
* ADCON DC A(*-*) ADDRESS OF COPY OF FST ENTRY RETURNED 00051000
* HERE IF FILE WAS FOUND. IF THIS V0409 00052100
* CONTAINS **** AT ENTRY TO STATE V0409 00052200
* THEN * WILL BE INVALID CHAR. IN V0409 00052300
* FILENAME OR FILETYPE V0409 00052400
* 00053000
* EXIT CONDITIONS: 00054000
* 00055000
* FILE FOUND 00056000
* R15=0 (AND CONDITION-CODE=0) 00057000
* ALSO,ADCON IN P-LIST FILLED IN TO V(STATEFST) 00058000
* 00059000
* FILE NOT FOUND 00060000
* R15=20 ILLEGAL CHARACTER IN FILEID 00061000
* 24 INVALID FILE MODE 00062000
* INVALID PARAMETER (TERMINAL REQUESTS ONLY) 00063000
* INCOMPLETE FILEID (TERMINAL REQUESTS ONLY) 00064000
* 28 FILE NOT FOUND 00065000
* 36 DISK MODE NOT ACCESSED 00066000
* 80 I/O ERROR ACCESSING OS DATA SET 00066050
* 81 OS READ PASSWORD PROTECTED DATA SET 00066100
* 82 DATA SET ORGANIZATION IS NOT BSAM, 00066150
* QSAM OR BPAM 00066200
* 83 DATA SET HAS MORE THAN 16 EXTENTS 00066250
* 00067000
* CALLS TO OTHER ROUTINES: 00068000
* 00069000
* DMSLAF,DMSLFS,DMSLAD,DMSERR 00070000
* 00071000
* EXTERNAL REFERENCES 00072000
* 00073000
* ADTSECT,AFTSECT,FVSECT,DMSNUC,FSTSECT,OSFST 00074000
* 00075000
* TABLES/WORKAREAS 00076000
* 00077000
* NONE 00078000
* 00079000
* REGISTER USAGE 00080000
* 00081000
* R13 FVSECT 00082000
* R1,R3 FSTSECT 00083000
* R1,R3 FSTSECT 00084000
* R4 ADTSECT 00085000
* REST WORK 00086000
* 00086100
* NOTES: 00086150
* 00086200
* | "STATE/STATEW" IS TREATED AS A "COMMAND" OR A "FUNCTION" 00086250
* | ACCORDING TO THE HIGH-ORDER BYTE OF R1 AT INPUT, VIZ: 00086300
* | IF = X'0C', IT WAS ISSUED AS A COMMAND FROM DMSINT. 00086350
* | IF = X'0D', IT WAS ISSUED FROM AN EXEC FILE (DMSEXT), 00086400
* | WITH "&CONTROL" SET TO EITHER "CMS" OR "ALL". 00086450
* | IF = X'0E', IT WAS ISSUED FROM AN EXEC FILE (DMSEXT), 00086500
* | WITH "&CONTROL OFF" IN EFFECT. 00086550
* | IF < X'0C' OR > X'0E', IT IS ASSUMED TO BE A FUNCTION, 00086600
* | I.E. CALLED FROM ANOTHER PROGRAM. 00086650
* 00086700
* | FOR STATE/STATEW CALLED AS A COMMAND (EITHER FROM THE 00086750
* | TERMINAL OR FROM AN EXEC FILE), A CHECK IS MADE THAT 00086800
* | THE MODE (IF GIVEN) IS NO MORE THAN TWO CHARACTERS. 00086850
* 00086900
* | FOR STATE/STATEW CALLED AS A COMMAND FROM THE TERMINAL, 00086950
* | A CHECK IS ALSO MADE THAT NO ADDITIONAL (EXTRANEOUS) 00087000
* | PARAMETERS (FOLLOWING THE FILE MODE) ARE PRESENT. 00087050
* | (THIS CHECK IS PURPOSELY OMITTED IF STATE/STATEW IS 00087100
* | CALLED FROM AN EXEC FILE, SO THAT ADDITIONAL PARAMETERS 00087150
* | FROM A STANDARD CMS EXEC FILE CREATED BY LISTFILE WILL 00087200
* | NOT CAUSE STATE/STATEW TO FAIL.) 00087250
* 00087300
* | FOR STATE/STATEW CALLED AS A FUNCTION (OR FROM AN EXEC FILE 00087350
* | WITH "&CONTROL OFF" IN EFFECT), THE "FILE NOT FOUND" 00087400
* | AND THE "DISK NOT ACCESSED" ERROR MESSAGES 00087450
* ARE NOT ISSUED. ALL OTHER MESSAGES 00087470
* | ARE GIVEN IRRESPECTIVE OF WHETHER STATE/STATEW WAS CALLED 00087500
* | AS A COMMAND OR AS A FUNCTION. 00087550
* 00087600
* OPERATION: 00088000
* 00089000
* DMSSTT CHECKS THE FILE NAME AND FILE TYPE 00090000
* FOR ILLEGAL CHARACTERS AND RETURNS IF ONE IS 00091000
* FOUND. THEN CHECK FOR VALID MODE SPECIFICATION 00092000
* IF INVALID RETURN. IF A MODE LETTER WAS GIVEN 00093000
* CALL DMSLAD TO FIND ADT. RETURN IF DISK IS NOT 00094000
* ACCESSED. 00095000
* 00096000
* DMSSTTE CALLS DMSLAF TO SEE IF THE GIVEN FILE IS IN 00097000
* THE ACTIVE FILE TABLE. 00098000
* IF FOUND, THE ACTIVE 40-BYTE FST ENTRY IS MOVED FROM 00099000
* AFTFST IN THE AFT BLOCK TO THE COPY AT STATEFST TO BE 00100000
* PROVIDED TO THE CALLER, AND THE STATER0 AND STATER1 00101000
* WORDS FOLLOWING STATEFST ARE SET TO THE ADDRESSES OF 00102000
* THE ADT BLOCK AND THE FST ENTRY RESPECTIVELY; THEN 00103000
* V(STATEFST) IS STORED IN THE CALLER'S P-LIST (IF 00104000
* NECESSARY) AS DESCRIBED BELOW. 00105000
* 00106000
* IF THE FILE WAS NOT FOUND BY DMSLAF, DMSSTTE THEN 00107000
* CALLS DMSLFS TO FIND THE GIVEN FILE. IF NOT FOUND BY 00108000
* DMSLFS, THE ERROR CODE FROM DMSLFS (28 FOR FILE NOT 00109000
* FOUND) IS RETURNED TO THE CALLER AS SHOWN IN THE EXIT 00110000
* CONDITIONS. 00111000
* 00112000
* IF THE FILE WAS FOUND BY DMSLFS, THEN THE 40-BYTE 00113000
* ENTRY IS MOVED TO STATEFST, AND 00114000
* THE R0 AND R1 VALUES OBTAINED FROM DMSLFS ARE STORED 00115000
* AT THE STATER0 AND STATER1 00116000
* WORDS FOLLOWING STATEFST. (THESE WORDS ARE USED BY 00117000
* RDBUF TO AVOID AN EXTRA 00118000
* SEARCH OF THE FST TABLES UNDER THE CIRCUMSTANCES 00119000
* GIVEN IN THE DMSBRD DESCRIPTION). 00120000
* WHERE THE FILE WAS FOUND BY FSTLKP, THE MODE LETTER 00121000
* IS STORED IN THE STATEFST COPY 00122000
* USING THE SAME ALGORITHM AS DMSLAFFE, BEING CAREFULLY 00123000
* CHOSEN FROM THAT OF THE CALLER'S 00124000
* PARAMETER LIST, OR THE ADTM OR ADTMX MODE GIVEN BY 00125000
* THE ACTIVE DISK TABLE. 00126000
* 00127000
* THE RESULT OF THE CHOICE OF MODE-LETTER FACILITATES 00128000
* THE FEATURE OF A READ-ONLY EXTENSION OF A GIVEN DISK. 00129000
* FOR EXAMPLE, IF A B-DISK IS A READ-ONLY EXTENSION OF 00130000
* A A-DISK, IF THE CALLER'S PARAMETER LIST SPECIFIED 00131000
* THE B-MODE, THE MODE STORED IN STATEFST WILL BE B; 00132000
* BUT IF THE CALLER SPECIFIED A OR '*', THE MODE STORED 00133000
* IN STATEFST WILL BE A. 00134000
* 00135000
* AFTER SETTING UP STATEFST AND THE TWO WORDS THAT 00136000
* FOLLOW, AS DESCRIBED DMSSTT STORES THE ADDRESS OF 00137000
* STATEFST IN THE CALLER'S P-LIST (UNLESS IT IS ALREADY 00138000
* THERE), AND RETURNS TO THE CALLER AS SHOWN IN THE 00139000
* EXIT CONDITIONS. 00140000
* 00141000
* Also fill in various members in an extended STATEFST. HRC105DS 00141100
* This is done for compatibility with later software HRC105DS 00141200
* which targets VM/SP, however, it is not possible to HRC105DS 00141300
* use the greater capacity of some of these counters HRC105DS 00141400
* with 800 byte disk blocks which are limited to 40 HRC105DS 00141500
* byte FSTs and cannot accomodate the larger values. HRC105DS 00141600
*. 00142000
EJECT 00143000
DMSSTTE START 0 CHECK BOTH READ AND READ/WRITE DISKS 00144000
ENTRY DMSSTTW,STATEW,STATE 00145000
STATE EQU DMSSTTE 00146000
USING NUCON,R0 00147000
FSENTR REGSAV3 ENTER 'STATE', SAVE REGISTERS 00148000
L R10,=V(DMSLFS) A(FSTLKP) FOR 'STATE' 00149000
LA R12,BALR12 COMMON ADDRESSABILITY, 00150000
USING BALR12,R12 ... 00151000
B JOIN JOIN FORCES WITH 'STATEW'. 00152000
DROP R12,R13 00153000
SPACE 2 00154000
DMSSTTW DS 0H 00155000
STATEW EQU DMSSTTW 00156000
FSENTR REGSAV3 00157000
BALR12 EQU * (COMMON ADDRESSABILITY HERE) 00158000
L R10,=V(DMSLFSW) A(FSTLKW) FOR 'STATEW' 00159000
JOIN LA R3,0(0,R1) SAVE PLIST ADR 00160000
CLI REGSAV3+4,X'0C' COMMAND OR FUNCTION ? @VA01154 00161100
BL NOCHECK FUNCTION: OMIT FILE-MODE CHECKS @VA01154 00161200
CLI REGSAV3+4,X'0E' CHECK FURTHER (0C/0D/0E)... @VA01154 00161300
BH NOCHECK FUNCTION: OMIT FILE-MODE CHECKS @VA01154 00161400
* STATE/STATEW ISSUED AS A COMMAND FROM TERMINAL OR FROM AN EXEC FILE: 00161500
CLI 8(R3),X'FF' FNAME SPECIFIED 00163000
BE ERR054E NO, ERROR 00164000
CLI 16(R3),X'FF' FTYPE SPECIFIED 00165000
BE ERR054E NO, ERROR 00166000
CLI 24(R3),X'FF' MODE SPECIFIED 00167000
BE NOCHECK NO, PLIST OK 00168000
CLI 26(R3),C' ' IS MODE LONGER THAN TWO CHARS. 00169000
BNE ERR048E YES, ERROR 00170000
CLI 32(R3),X'FF' ANY EXTRA PARAMETERS 00171000
BE NOCHECK NOPE ("FENCE" IS THERE) - OK. @VA01154 00172100
CLI REGSAV3+4,X'0C' WAS IT FROM TERMINAL OR EXEC ? @VA01154 00172200
BE ERR070E FROM TERMINAL - IT'S AN "ERROR" @VA01154 00172300
NOCHECK LA R5,7(,R1) SET END OF SCAN 00173000
LA R2,8(,R1) SCAN FILENAME FOR INVALID CHARS 00174000
BALR R9,0 SET TO ITERATE TWICE 00175000
LA R5,8(,R5) ADJUST END OF SCAN PTR 00176000
CLC 28(4,R3),=4C'*' SHOULD * BE INVALID V0409 00176100
BE TEST YES V0409 00176200
CLC 0(8,R2),=CL8'*' STATE ALL FNAMES OR FTYPES 00177000
BNE TEST NO, CHECK FNAME (OR FTYPE) 00178000
LA R2,8(,R2) GET OVER FNAME (OR FTYPE) 00179000
B BALR99 LOOK AT FTYPE (OR FMODE) 00180000
TEST L R6,=V(INVTBL) TRANSLATE TABLE FOR INVALID CHARS. P3074 00181000
TRT 0(8,R2),0(R6) LOOK FOR INVALID CHARS 00182000
BZ BALR99 NO INVALID CHARS. 00183000
LR R2,R1 CHECK FOR IMBEDDED BLANKS 00184000
ENDSCAN CLI 0(R2),X'40' BLANK 00185000
BNE ERR062E NO, INVALID CHARACTER 00186000
LA R2,1(,R2) NEXT CHAR 00187000
CR R2,R5 END OF FNAME OR FTYPE 00188000
BC 12,ENDSCAN NO 00189000
BALR99 LA R2,1(R5) INSURE R2 POINTS TO NEXT @VA02470 00190300
BALR R9,R9 FIELD, WONT IF NO BLNK IN FN@VA02470 00190600
OK CLI 24(R3),C'A' COMPARE MODE LETTER WITH 'A' 00191000
BL SPCCHK LOWER THAN 'A' 00192000
CLI 24(R3),C'I' COMPARE MODE LETTER WITH 'I' HRC002DS 00193690
BNH OK1 MODE OK (A-I) HRC002DS 00194380
CLI 24(R3),C'J' COMPARE MODE LETTER WITH 'J' HRC002DS 00195070
BL ERR048E MODE BAD(< J) HRC002DS 00195760
CLI 24(R3),C'R' COMPARE MODE LETTER WITH 'R' HRC002DS 00196450
BNH OK1 MODE OK (J-R) HRC002DS 00197140
CLI 24(R3),C'S' COMPARE MODE LETTER WITH 'S' HRC002DS 00197830
BL ERR048E MODE BAD(< S) HRC002DS 00198520
CLI 24(R3),C'Z' COMPARE WITH 'Z' HRC002DS 00199210
BNH OK1 MODE OK IF BTWEEN A AND Z HRC002DS 00199900
CLI 24(R3),X'FF' NO FMODE SPEC 00201000
BE OK2 YES 00202000
B ERR048E ANYTHING ELSE IS AN ERROR HRC002DS 00202500
SPCCHK CLI 24(R3),X'00' MODE = BINARY ZERO 00203000
BE OK2 YES 00204000
CLC 24(2,R3),=CL2'*' ALL FMODES 00205000
BE OK2 YES 00206000
CLC 24(2,R3),=CL2' ' BLANK FMODE 00207000
BNE ERR048E IT MUST BE INVALID 00208000
B OK2 OMIT MODE NUMBER CHECK 00209000
OK1 CLI 25(R3),C' ' MODE NUMBER BLANK 00210000
BE OK1A YES 00211000
CLI 25(R3),C'0' COMPARE WITH ZERO 00212000
BL ERR048E 00213000
CLI 25(R3),C'5' 00214000
BH ERR048E INVALID MODE NUMBER 00215000
OK1A LR R1,R3 00216000
L R15,=V(DMSLAD) SEE IF DISK IS ACCESSED @V305665 00217100
BALR R14,R15 00218000
BNZ ERR069E NOT ACCESSED 00219000
USING ADTSECT,R1 00220000
TM ADTFLG2,ADTFROS OS DISK @V201105 00220100
BZ OK1B TRF IF NOT @VA14295 00220120
CLM R10,7,VCFSTLKW+1 WAS THIS A STATEW CALL? @VA14295 00220140
BNE OK2 TRF IF NOT @VA14295 00220160
TM ADTFLG3,ADTFRWOS READ/WRITE OS DISK? @VA14295 00220180
BO OK2 YES, OK @V201105 00220200
LR R5,R3 ERROR - SET UP R5 @VA14295 00221000
B ERR002E @VA14295 00221300
OK1B TM ADTFLG1,ADTFRO+ADTFRW IS DISK ACCESSED @VA14295 00221600
DROP R1 00222000
BZ ERR069E NO, ERROR 00223000
OK2 LR R1,R3 00224000
LR R2,R3 00225000
LA R3,STATEFST LET R3 POINT TO 'STATEFST' (NEED LATER) 00226000
SR R0,R0 INITIALIZE R0 AND 00227000
L R15,AACTLKP CALL 'ACTLKP' TO SEE IF IN 00228000
BALR R14,R15 ACTIVE-FILE-TABLE 00229000
BNZ LR1510 BNZ IF NOT. 00230000
USING AFTSECT,R1 IF FOUND, REFERENCE ACTIVE-FILE-TABLE, 00231000
L R0,AFTADT LET R0 POINT TO ACTIVE-DISK-TABLE, 00232000
LA R15,FSTFAW MAYBE AN ACTIVE WRITE ? 00233000
TM AFTFLG,AFTWRT ... 00234000
BO JS2 TRF IF YES (R15 ALL SET - NO PROBLEMS). 00235000
C R10,=V(DMSLFSW) WAS THIS A STATEW CALL? 00236000
BNE JS1 TRF IF NOT (NO PROBLEM) 00237000
LR R4,R0 IF STATEW CALL, CHECK 00238000
USING ADTSECT,R4 ACTIVE-DISK-TABLE 00239000
TM ADTFLG1,ADTFRW MAKE SURE THIS IS A READ-WRITE-DISK 00240000
BZ JS3 IF NOT, RESTORE R1 & CALL FSTLKW INSTEAD. 00241000
DROP R4 00242000
JS1 LA R15,FSTFAR PROBABLY AN ACTIVE READ ? 00243000
TM AFTFLG,AFTRD ... 00244000
BO JS2 TRF IF YES (ALL SET). 00245000
LA R15,FSTFAP IF NEITHER, MUST BE AN ACTIVE POINT. 00246000
JS2 LA R1,AFTFST POINT R1 TO FST-BLOCK IN ACTIVE-FILE-TABLE 00247000
B JS4 JOIN CODE BELOW. 00248000
DROP R1 00249000
* 00250000
JS3 LR R1,R2 RESTORE R1 FOR SPECIAL CASE, AND: 00251000
* 00252000
LR1510 LR R15,R10 A(FSTLKP) OR A(FSTLKW) INTO R15, AND 00253000
LR R5,R1 SAVE IN CASE ERROR 00254000
BALR R14,R15 CALL FSTLKP OR FSTLKW 00255000
ENTRY DMSSTTR @V201105 00256100
DMSSTTR LTR R15,R15 CHECK RETURN CODE @V201105 00256110
BZ JS4 FOUND SOMETHING @V201105 00256120
CH R15,=H'79' CHECK FOR UNSUPPORTED OS DATASET @V201105 00256130
BH ERR229 BRANCH IF SO @V201105 00256140
B ERR002E CMS FILE NOT FOUND @V201105 00256150
USING FSTSECT,R3 REFERENCE FST-BLOCK IN 'STATEFST', 00257000
JS4 LR R4,R0 REFERENCE ACTIVE-DISK-TABLE 00258000
USING ADTSECT,R4 ... 00259000
TM ADTFLG2,ADTFROS OS DISK @V201105 00259010
BNO CMSJS4 NO @V201105 00259020
USING OSFST,R1 @V201105 00259030
MVC FVSFSTN(16),8(R2) SET FNAME FTYPE IN FST COPY @V201105 00259040
XC FVSFSTDT(FVSFSTAD-FVSFSTDT),FVSFSTAD @V201105 00259050
* CLEAR OS FST COPY AREA @V201105 00259060
MVC FVSFSTM(OSFSTFLG-OSFSTFM),OSFSTFM MOVE OS PARTS @V201105 00259070
DROP R1 @V201105 00259080
B SETFSTFB CONTINUE BELOW @V201105 00259090
CMSJS4 EQU * @V201105 00259100
MVC STATEFST(40),0(R1) COPY 'FST ENTRY' INTO 'STATEFST' 00260000
XC FVSFSTAB+0(2),FVSFSTAB Clear top half of word HRC105DS 00260005
MVC FVSFSTAB+2(2),FVSFSTDB Store alt. block count HRC105DS 00260010
XC FVSFSTAI+0(2),FVSFSTAI Clear top half of word HRC105DS 00260015
MVC FVSFSTAI+2(2),FVSFSTIC Store alt. item count HRC105DS 00260020
PACK FVSFSTAT(2),FVSFSTYR(3) Put year into 1st byte HRC105DS 00260025
MVC FVSFSTAT+1(4),FVSFSTDT Rest of date and time HRC105DS 00260030
MVI FVSFSTAT+5,X'29' Pull seconds from thin air HRC105DS 00260035
* Somebody fix this properly before 2070. HRC105DS 00260040
CLI FVSFSTAT,X'69' Is year greater than 69? HRC105DS 00260045
BH LASTCENT Year is probably 1970-1999 then HRC105DS 00260050
O R15,=F'8' Set flag bit for 21st century HRC105DS 00260055
LASTCENT EQU * HRC105DS 00260060
SETFSTFB EQU * COMMON FST COPY SET @V201105 00260100
STC R15,FSTFB AND STORE 00, OR FLAG COMPUTED ABOVE. 00261000
STM R0,R1,STATER0 SAVE ADDRESSES OF ADT AND FST BLOCKS 00262000
IC R5,ADTM TENTATIVELY CHOOSE PRIMARY MODE LETTER 00263000
LA R6,FSTFRW AND READ-WRITE DISK FLAG-BIT 00264000
TM ADTFLG1,ADTFRW IS IT A READ/WRITE DISK ? 00265000
BO JS6 TRF IF YES, GO FINIS UP. 00266000
LA R6,FSTFRO TENTATIVELY CHOOSE READ-ONLY FLAG-BIT, 00267000
CLI ADTMX,C' ' CHECK EXTENSION-MODE-LETTER 00268000
BE JS6 TRF IF BLANK, GO FINISH UP. 00269000
CLC ADTM,PRMODE(R2) DID CALLER SPECIFY THIS VERY DISK ? 00270000
BE JS5 TRF IF YES - STAY WITH PRIMARY LETTER. 00271000
IC R5,ADTMX CHOOSE EXTENSION LETTER IF NONE OF ABOVE. 00272000
JS5 LA R6,FSTFRWX TENTATIVELY CHOOSE EXT. OF R/W DISK FLAG 00273000
LA R1,ADTMX-24 POINT TO DISK IT'S AN EXTENSION OF, 00274000
L R15,=V(DMSLADW) CALL 'ADTLKW' TO SEE IF A RW DISK 00275000
BALR R14,R15 ... 00276000
BZ JS6 TRF IF YES (WE'RE ALL SET). 00277000
LA R6,FSTFROX IF NOT, CALL IT R/O EXT. OF R/O DISK. 00278000
* 00279000
JS6 STC R5,FSTM STORE CAREFULLY-CHOSEN MODE-LETTER, 00280000
O R6,FSTFB-3 AND 'OR' IN THE FLAG-BITS 00281000
ST R6,FSTFB-3 INTO THE STATEFST FLAG-BYTE (FSTFB). 00282000
SR R15,R15 CLEAR R15 FOR NORMAL RETURN 00283000
CL R3,PRETN(,R2) NECESSARY TO STORE A(STATEFST) ? @VA01154 00283100
BE EXITLM NO - EXIT FORTHWITH (C.C. = 0) @VA01154 00283200
* (AVOIDING NEEDLESS SETTING OF CHANGE-BIT, 00283300
* AND POSSIBLE CP PROTECTION-KEY THRASHING) 00283400
ST R3,PRETN(,R2) BUT DO STORE A(STATEFST) IF WE MUST. 00284000
EXIT LTR R15,R15 SET COND. CODE FROM RETURN-CODE, @VA01154 00285100
EXITLM LM R0,R14,REGSAV3 RESTORE THE OTHER REGISTERS, @VA01154 00286100
BR R14 AND EXIT (WITH R15 ALREADY OK) 00289000
SPACE 3 00290000
* 00291000
* CONSTANTS 00292000
* 00293000
PRMODE EQU 24 DISPLACEMENT OF MODE (IF GIVEN) IN P-LIST 00294000
PRETN EQU 28 DISPLACEMENT IN P-LIST FOR A(STATEFST) AD-CON 00295000
* 00296000
ERR002E DS 0H CMS "FILE NOT FOUND": @VA01154 00297100
CLI REGSAV3+4,X'0C' COMMAND OR FUNCTION ? @VA01154 00297200
BL CODE28 FUNCTION: OMIT ERROR MESSAGE @VA01154 00297300
CLI REGSAV3+4,X'0D' CHECK FURTHER (0C/0D)... @VA01154 00297400
BH CODE28 FUNCTION: OMIT ERROR MESSAGE @VA01154 00297500
* OMIT THE ERROR MESSAGE IF THE STATE/STATEW WAS ISSUED AS A 00297600
* FUNCTION, OR FROM AN EXEC FILE WITH "&CONTROL OFF" IN EFFECT; 00297700
* BUT GIVE THE ERROR MESSAGE IF THE STATE/STATEW WAS ISSUED FROM 00297800
* THE TERMINAL (I.E. FROM DMSINT), OR IF IT WAS ISSUED FROM AN 00297900
* EXEC FILE (I.E. FROM DMSEXT) WITH &CONTROL CMS OR ALL IN EFFECT: 00298000
LA R2,8(R5) POINT TO FILE ID 00300000
CLI 16(R2),X'FF' NO FILEMODE SPECIFIED? @VA02247 00300300
BNE CONTINUE NO, CONTINUE PROCESSING @VA02247 00300600
MVC 16(2,R2),=CL2' ' SET FILEMODE TO BLANK @VA02247 00300900
CONTINUE DMSERR TEXT='FILE ''....................'' NOT FOUND', X00301500
NUM=2,LET=E,SUB=(CHAR8A,(R2)),TYPCALL=BALR 00302000
CODE28 LA R15,28 00303000
B EXIT 00304000
ERR048E LA R2,24(R3) POINT TO MODE 00305000
LA R4,2 SET TO TYPE 2-CHARACTER FILEMODE @VA01154 00305100
CLI REGSAV3+4,X'0C' COMMAND OR FUNCTION ? @VA01154 00305200
BL R4OK FUNCTION: USE 2 CHARS. IN MSG @VA01154 00305300
CLI REGSAV3+4,X'0E' CHECK FURTHER (0C/0D/0D)... @VA01154 00305400
BH R4OK FUNCTION: USE 2 CHARS. IN MSG @VA01154 00305500
LA R4,8 SET TO TYPE 8-CHARACTER FILEMODE @VA01154 00305600
R4OK EQU * NOW GIVE INVALID-MODE ERROR-MSG: @VA01154 00305700
DMSERR TEXT='INVALID MODE ''........''',NUM=48,LET=E, X00306000
SUB=(CHAR8A,((R2),(R4))),TYPCALL=BALR @VA01154 00307100
CODE24 LA R15,24 00308000
B EXIT 00309000
ERR054E DMSERR TEXT='INCOMPLETE FILEID SPECIFIED',NUM=54,LET=E, X00310000
TYPCALL=BALR 00311000
B CODE24 GO SET RETURN-CODE = 24 @VA01154 00312100
ERR062E LA R3,8(,R3) POINT TO FILEID 00314000
DMSERR TEXT='INVALID CHARACTER ''..'' IN FILEID X00315100
''.................''',NUM=62,LET=E,MF=(E,'SYS'), X00316500
SUB=(CHARA,((R2),1),CHAR8A,(R3)),TYPCALL=BALR 00317000
CODE20 LA R15,20 00318000
B EXIT 00319000
ERR069E DS 0H CMS "DSIK NOT ACCESSED" @VA09015 00320000
CLI REGSAV3+4,X'0C' COMMAND OR FUNCTION ? @VA09015 00320020
BL CODE36 FUNCTION: OMIT ERROR MESSAGE @VA09015 00320040
CLI REGSAV3+4,X'0D' CHECK FURTHER (0C/0D)... @VA09015 00320060
BH CODE36 FUNCTION: OMIT ERROR MESSAGE @VA09015 00320080
ERR069 LA R3,24(R3) POINT TO MODE LETTER @VA03409 00320300
DMSERR TEXT='DISK ''..'' NOT ACCESSED',NUM=69, X00321000
LET=E,SUB=(CHARA,((R3),1)),TYPCALL=BALR 00322000
CODE36 LA R15,36 00323000
B EXIT 00324000
ERR070E LA R2,32(R1) 00325000
DMSERR TEXT='INVALID PARAMETER ''........''',NUM=70, X00326000
LET=E,SUB=(CHAR8A,(R2)),TYPCALL=BALR 00327000
B CODE24 GO SET RETURN-CODE = 24 @VA01154 00328100
ERR229 LR R2,R15 @V201105 00329010
DMSERR TEXT='UNSUPPORTED OS DATASET, ERROR ''..''', X00329020
NUM=229,LET=E,SUB=(DEC,(R15)) @V201105 00329030
LTR R15,R2 RESTORE R15 & SET COND. CODE, @VA01154 00329100
B EXITLM AND GO RESTORE R0-R14 AND EXIT. @VA01154 00329200
SPACE 00329300
LTORG @VA01154 00329400
EJECT 00329500
OSFST @VA01154 00329600
NUCON 00331000
REGEQU 00332000
AFT 00333000
FVS 00334000
ADT 00335000
FSTB 00336000
END 00337000