SEA TITLE 'DMMSEA (IPCS) VM/370 - RELEASE 6' 00001000 *************************************************************** 00002000 * 00003000 * MODULE NAME: DMMSEA 00004000 * 00005000 * 00006000 * FUNCTION: LOCATE ANY PROBLEM(S) WHICH ARE DUPLICATES OF A 00007000 * NEWLY ENTERED PROBLEM. 00008000 * 00009000 * 00010000 * ATTRIBUTES: NON-REENTRANT 00011000 * NON-REUSABLE 00012000 * 00013000 * 00014000 * ENTRY POINTS: DMMSEA 00015000 * 00016000 * 00017000 * ENTRY CONDITIONS: 00018000 * R1 POINTS TO A PARM LIST AS FOLLOWS: 00019000 * WD1 POINTER TO INTERNAL DATA AREA 00020000 * WD2 POINTER TO KEYWORD STRING (WITH LENGTH FIELDS) 00021000 * WD3 POINTER TO TEXT AREA FOR THIS PROBLEM 00022000 * 00023000 * EXIT CONDITIONS: 00024000 * EXIT CONDITIONS PASSED IN R15 00025000 * 0 NO DUPS FOUND 00026000 * 4 DUPS FOUND 00027000 * 8 UNRECOVERABLE ERROR ENCOUNTERED 00028000 * 00029000 * CALLS TO OTHER ROUTINES: DMMSUM (TO POST DUPLICATE STATUS 00030000 * TO SUMMARY CONTROL RECORD OF PROBLEM) 00031000 * 00032000 * 00033000 * EXTERNAL REFERENCES: NONE 00034000 * 00035000 * 00036000 * TABLES/WORKAREAS: NONE 00037000 * 00038000 * 00039000 * REGISTER USAGE: 00040000 * R13 SAVEAREA 00041000 * R12 BASE REGISTER 00042000 * R11 INTSECT (INTERNAL DATA AREA) 00043000 * R10 NOT USED 00044000 * R9 SYMSECT (SYMPTOM SUMMARY PROBLEM CONTROL RECORD) 00045000 * R8 POINTER TO NEW PROBLEM KEY AREA 00046000 * R7 POINTER TO NEW PROBLEM CURRENT KEY 00047000 * R6 NEW PROBLEM CURRENT KEY LENGTH 00048000 * R5 WORK 00049000 * R4 OLD PROBLEM CURRENT KEY POINTER (+ WORK) 00050000 * R3 OLD PROBLEM CURRENT KEY LENGTH (+ WORK) 00051000 * R2 WORK 00052000 * 00053000 * 00054000 * NOTES: NONE 00055000 * 00056000 * 00057000 * OPERATION: 00058000 * 00059000 * THE KEYWORDED DATA FOR THE NEW PROBLEM IS COMPARED AGAINST 00060000 * THAT OF EACH PROBLEM ALREADY KNOWN TO THE SYSTEM AND ANY 00061000 * EXACT MATCHES ARE CONSIDERED DUPLICATE PROBLEMS. 00062000 * THE USER IS INFORMED OF THE PROBLEM NUMBER, STATUS, AND PTF 00063000 * OF EACH DUPLICATE PROBLEM UP TO A MAXIMUM OF 10. 00064000 * 00065000 * DETERMINING AN EXACT DUPLICATE. 00066000 * EACH KYWD PLUS DATA IN THE NEW PROBLEM IS COMPARED AGAINST 00067000 * ALL KYWDS PLUS DATA FOR EACH OLD PROBLEM. THE OLD PROBLEM 00068000 * KEYWORDS ARE OBTAINED FROM THE SYMPTOM SUMMARY FILE. IF A 00069000 * MATCH IS NOT FOUND FOR A GIVEN KEYWORD THAT OLD PROBLEM IS 00070000 * CONSIDERED NOT TO BE A MATCH AND THE PROCESSING CONTINUES 00071000 * WITH THE NEXT PROBLEM FOUND IN THE SYMPTOM SUMMARY FILE. 00072000 * WHEN THE PROBLEM NO. OF THE NEXT OLD PROBLEM IS THE SAME AS 00073000 * THAT OF THE NEW PROBLEM THE SEARCH IS CONSIDERED TO BE DONE 00074000 * (THE NEW PROB HAS ALREADY BEEN ADDED TO THE SYMPTOM SUMMARY 00075000 * FILE). 00076000 * 00077000 * ERROR MESSAGES: 00078000 * 00079000 * DMMSEA100S ERROR 'NNN' READING FILE 'SYMPTOM SUMMARY A1' 00080000 * 00081000 *************************************************************** 00082000 EJECT 00083000 DMMSEA CSECT @VA04250 00084000 USING DMMSEA,R15 TEMPORARY ADDRESSABILITY @VA04250 00085000 B START BRANCH AROUND EYECATCHER @VA04250 00086000 DS 0D @VA04250 00087000 MODNAME DC C'DMMSEA ' MODULE NAME @VA04250 00088000 RELLEV DC C'REL4LEV0' RELEASE AND LEVEL @V4075A1 00089000 START STM R14,R12,12(R13) SAVE CALLER'S REGISTERS @VA04250 00090000 LR R12,R15 ESTABLISH OUR BASE REGISTER @VA04250 00091000 DROP R15 @VA04250 00092000 USING DMMSEA,R12 OUR BASE @VA04250 00093000 ST R13,SAVEAREA+8 SAVE CALLERS SAVEAREA IN OURS @VA04250 00094000 LA R13,SAVEAREA POINT TO OUR SAVEAREA @VA04250 00095000 LM R6,R9,0(R1) GET INT,KEY, AND TEXT AREAS @VA04250 00096000 USING INTSECT,R11 ADDRESSABILITY FOR INTERNAL DATA @VA04250 00097000 USING SYMSECT,R9 ADDRESSABILITY FOR SUMMARY CTL @VA04250 00098000 LR R8,R7 GET KEY AREA PTR FOR NEW PROBLEM @VA04250 00099000 LH R2,0(R8) LENGTH OF KEY AREA IN NEW PROBLEM@VA04250 00100000 LA R3,0(R2,R8) CALCULATE END @VA04250 00101000 ST R3,NEWEND SAVE @VA04250 00102000 LR R11,R6 GET VMI HDR RECORD POINTER @VA04250 00103000 MVC PROBNO,INTPNUM MOVE PROBLEM NUMBER @VA04250 00104000 LA R9,HEADIN SYMPTOM SUMMARY HDR INPUT @VA04250 00105000 *************************************************************** 00106000 * READ A SUMMARY CONTROL RCD AND SEE IF WE HAVE REACHED THE END 00107000 *************************************************************** 00108000 RDHEAD LA R5,ONE READ 1 RECORD @VA04250 00109000 LA R3,CARDLEN BSIZE @VA04250 00110000 LA R6,HEADIN BUFFER POINTER @VA04250 00111000 BAL R10,FSREAD DO READ @VA04250 00112000 CLC PROBNO,SYMPNUM LAST ENTRY IS THIS PROBLEM @VA04250 00113000 BE ENDRTN YES, WE KNOW WE ARE AT THE END @VA04250 00114000 IC R5,SYMCCNT NUMBER OF KEY RCDS IN THIS ENTRY @VA04250 00115000 MR R2,R5 CALC BUFFER SIZE @VA04250 00116000 LA R6,INPUT POINT TO INPUT BUFFER @VA04250 00117000 BAL R10,FSREAD GO GET KEY RCDS FOR THIS PROBLEM @VA04250 00118000 LA R7,KYFLDLN(R8) POINTER TO NEW @VA04250 00119000 LH R6,0(R7) GET KEY LENGTH @VA04250 00120000 *************************************************************** 00121000 * BEGIN AT START OF THIS PROBLEM'S KYWDS AND SEE IF IT IS A DUP 00122000 *************************************************************** 00123000 OLDREST LA R4,INPUT POINT PAST TOTAL LENGTH FIELD @VA04250 00124000 LH R3,0(R4) GET FIRST KEY+DAT+LNTH LENGTH @VA04250 00125000 LA R2,0(R4,R3) CALCULATE END OF DATA @VA04250 00126000 ST R2,OLDEND SAVE IT @VA04250 00127000 LA R4,KYFLDLN(R4) FIRST KEYLN+KEY+DATA @VA04250 00128000 * LOOP THROUGH THIS UNTIL MATCH NOT FOUND OR END 00129000 OLDLOOP LH R3,0(R4) GET OLD KEY+DATA LENGTH @VA04250 00130000 LR R1,R3 SAVE LENGTH TEMPORARILY @VA04250 00131000 BCTR R3,0 FOR EXECUTE @VA04250 00132000 CR R1,R6 SAME LENGTH ENTRY? @VA04250 00133000 BNE NOTSAME NO @VA04250 00134000 EX R3,KYCMPR SAME? @VA04250 00135000 BNE NOTSAME NO @VA04250 00136000 LA R7,0(R6,R7) NEW KEY @VA04250 00137000 C R7,NEWEND END OF NEW? @VA04250 00138000 BNL PUTOUT GO TELL ABOUT DUPS @VA04250 00139000 LH R6,0(R7) LENGTH OF NEW KEY @VA04250 00140000 LA R4,INPUT+KYFLDLN START SEARCHING OLD FROM TOP @VA04250 00141000 B OLDLOOP GO TO IT @VA04250 00142000 *************************************************************** 00143000 * CYCLE THROUGH ALL OF THIS PROBLEM LOOKING FOR THIS KEYWORD 00144000 * IF END OF KYWDS IS FOUND HERE WE KNOW WE DON'T HAVE A DUP 00145000 *************************************************************** 00146000 NOTSAME LA R4,ONE(R4,R3) NEXT OLD ENTRY @VA04250 00147000 C R4,OLDEND END? @VA04250 00148000 BNL RDHEAD YES, NOT A DUP OF THIS PROB @VA04250 00149000 B OLDLOOP EXAMINE ALL THIS PROB'S ENTRIES @VA04250 00150000 *************************************************************** 00151000 * PUT IN OUTPUT AND INCR COUNT AND SEE IF GT 10 00152000 *************************************************************** 00153000 PUTOUT CLI FRSTSW,FRSTON WE BEEN HERE BEFORE? @VA04250 00154000 BE NODUPMSG YES, ONLY PUT OUT HEADER ONCE @VA04250 00155000 MVI FRSTSW,FRSTON INDICATE WE'VE BEEN HERE @VA04250 00156000 MVC DUPSAVE,SYMPNUM LATER WE'LL PUT FIRST DUP FOUND @VA04250 00157000 * IN CONTROL RECORD FOR THIS PROBLEM. 00158000 LA R2,MSGDUP 'THE FOLLOWING PROBLEMS ARE DUPS'@VA04250 00159000 LA R3,L'MSGDUP LENGTH OF MESSAGE FOR WRTERM @VA04250 00160000 BAL R10,WRTERM ISSUE DUP MESSAGE HEADER @VA04250 00161000 NODUPMSG MVC OUTPUT(48),BLANKS CLEAR OUTPUT @VA04250 00162000 MVC OPNUM,SYMPNUM PROBLEM NUMBER THIS IS A DUP OF @VA04250 00163000 MVC ODATE,SYMCREAT WHEN THAT PROBLEM WAS CREATED @VA04250 00164000 MVC OSTAT,SYMSTAT WHAT ITS CURRENT STATUS IS @VA04250 00165000 CLC SYMPTF,BLANKS ANY PTF? @VA04250 00166000 BE NOPTF NO @VA04250 00167000 CLC SYMDUP1,=C'DUP OF ' COULD BE IN PTF AREA ALSO @VA04250 00168000 BE NOPTF REDUNDANT SO SKIP IT @VA04250 00169000 CLI SYMPTFDV,BLANK BLANK IN RIGHT PLACE FOR PTF? @VA04250 00170000 BNE NOPTF NO, NOT A PTF FILENAME FILE TYPE @VA04250 00171000 CLI SYMPTFFT,BLANK ANY FILE TYPE? @VA04250 00172000 BE NOPTF NO, NOT A PTF @VA04250 00173000 MVC OPTF1,=C'PTF=' TELL USER OF PTF AVAILABLITIY @VA04250 00174000 MVC OPTF2,SYMPTF PTF FILENAME FILETYPE @VA04250 00175000 NOPTF LA R2,OUTPUT POINT TO OUTPUT DATA @VA04250 00176000 LA R3,LOUT LENGTH OF OUTPUT WRTERM @VA04250 00177000 BAL R10,WRTERM PUT INFORMATION ON TERMINAL @VA04250 00178000 IC R2,OUTCOUNT GET NUMBER OF MSGS WE'VE PUT OUT @VA04250 00179000 CLI OUTCOUNT,TEN 10 DUPS FOUND? @VA04250 00180000 BE ENDRTN YES @VA04250 00181000 LA R2,ONE(R2) INCREMENT DUP COUNT @VA04250 00182000 STC R2,OUTCOUNT AND STORE IT @VA04250 00183000 B RDHEAD RESTART AT BEGIN OF OLD @VA04250 00184000 KYCMPR CLC 0(0,R4),0(R7) EXECUTED INSTR. KEYS COMPARE? @VA04250 00185000 ENDRTN FSCLOSE 'SYMPTOM SUMMARY A1' @VA04250 00186000 CLI OUTCOUNT,OUTZERO NO DUPS FOUND? @VA04250 00187000 BE NORMEXIT YES, RETURN CODE 0 @VA04250 00188000 LA R1,UPDUP-PSIZE UPDATE THE SUMMARY CONTROL RECORD@VA04250 00189000 MVC UPPRBNO,PROBNO TO INDICATE THAT THIS PROBLEM @VA04250 00190000 MVC UPPRB,=C'PRB' IS A DUPLICATE OF ANOTHER. @VA04250 00191000 L R15,VSUMMARY SUMMARY WILL DO THE UPDATE @VA04250 00192000 BALR R14,R15 GO TO SUMMARY @VA04250 00193000 B FNDRTRN WE'RE ALL DONE @VA04250 00194000 *************************************************************** 00195000 * SYMPTOM SUMMARY FILE READ ROUTINE 00196000 *************************************************************** 00197000 FSREAD FSREAD 'SYMPTOM SUMMARY A1',BUFFER=(R6),NOREC=(R5),BSIZE=(R3) 00198000 LTR R15,R15 GOOD RETURN? @VA04250 00199000 BNZ RDERR NO @VA04250 00200000 BR R10 RETURN TO CALLER @VA04250 00201000 *************************************************************** 00202000 * TERMINAL SUPPORT ROUTINES 00203000 *************************************************************** 00204000 WRTERM WRTERM (R2),(R3) @VA04250 00205000 BR R10 RETURN TO CALLER @VA04250 00206000 *************************************************************** 00207000 * READ ERROR ENCOUNTERED USE RETURN CODE 8 00208000 *************************************************************** 00209000 RDERR LR R2,R15 SAVE FSREAD RETURN CODE @VA04250 00210000 FSCLOSE 'SYMPTOM SUMMARY A1' @VA04250 00211000 CVD R2,WKDWD CONVERT RETURN CODE TO DECIMAL @VA04250 00212000 UNPK RDCODE,WKDWD+SIX(TWO) UNPACK INTO MESSAGE @VA04250 00213000 OI RDCODE+TWO,NUMERIC MAKE IT PRINTABLE @VA04250 00214000 LA R2,MSGERR POINT TO ERROR MESSAGE @VA04250 00215000 LA R3,MSGLNTH GET MESSAGE LENGTH @VA04250 00216000 BAL R10,WRTERM GO DISPLAY ON TERMINAL @VA04250 00217000 L R13,8(R13) RESTORE CALLER'S SAVEAREA POINTER@VA04250 00218000 LM R14,R12,12(R13) RESTORE CALLER'S REGISTERS @VA04250 00219000 LA R15,8 I/O ERROR RETURN CODE @VA04250 00220000 BR R14 RETURN TO CALLER @VA04250 00221000 *************************************************************** 00222000 * EXIT ROUTINES 00223000 *************************************************************** 00224000 FNDRTRN L R13,8(R13) GET CALLERS SAVEAREA POINTER @VA04250 00225000 LM R14,R12,12(R13) RESTORE CALLER'S REGISTERS @VA04250 00226000 LA R15,4 DUP FOUND RETURN CODE @VA04250 00227000 BR R14 RETURN TO CALLER @VA04250 00228000 NORMEXIT L R13,8(R13) GET CALLER'S SAVEAREA POINTER @VA04250 00229000 LM R14,R12,12(R13) RESTORE CALLER'S REGISTERS @VA04250 00230000 SR R15,R15 NO DUPS FOUND RETURN CODE @VA04250 00231000 BR R14 RETURN TO CALLER @VA04250 00232000 EJECT 00233000 *************************************************************** 00234000 * SAVE AREAS, CONSTANTS, AND EQUATES 00235000 *************************************************************** 00236000 SAVEAREA DS 18F OUR SAVEAREA @VA04250 00237000 WKDWD DS D WORK DOUBLE WORD @VA04250 00238000 NEWEND DS F END OF NEW PROBLEM KEYWORD AREA @VA04250 00239000 OLDEND DS F END OF OLD PROBLEM KEYWORD AREA @VA04250 00240000 NEWCURR DS F WHERE WE ARE IN NEW KEY AREA @VA04250 00241000 OLDCURR DS F WHERE WE ARE IN OLD KEY AREA @VA04250 00242000 OUTCOUNT DC X'00' NUMBER OF DUPS FOUND SO FAR @VA04250 00243000 OUTZERO EQU X'00' NOTHING OUTPUTTED YES @VA04250 00244000 *************************************************************** 00245000 * PARMS PASSED TO SUMMARY TO UPDATE SYMPTOM SUMMARY CTL RECORD 00246000 *************************************************************** 00247000 UPDUP DS 0CL8 PROBLEM NUMBER @VA04250 00248000 UPPRB DC C'PRB' INDICATOR OF PRB FOR SUMMARY @VA04250 00249000 UPPRBNO DS CL5 PROBLEM NUMBER PROPER @VA04250 00250000 DC C'UPDUP ' MAKE SUMMARY POST PROBLEM AS DUP @VA04250 00251000 DUPSAVE DS CL5 PROBLEM NUMBER OF DUPLICATE PROB @VA04250 00252000 VSUMMARY DC V(DMMSUM) SUMMARY PROGRAM @VA04250 00253000 SPACE 1 00254000 *************************************************************** 00255000 FRSTSW DC X'00' FIRST TIME SWITCH FOR DUP HEADER @VA04250 00256000 FRSTON EQU X'01' 1ST TIME SW ON (NOT FIRST TIME @VA04250 00257000 *************************************************************** 00258000 SPACE 1 00259000 MSGDUP DC C'THE FOLLOWING PROBLEM(S) ARE POSSIBLE DUPLICATES' 00260000 PROBNO DS CL5 NEW PROBLEM PROBLEM NUMBER @VA04250 00261000 SPACE 1 00262000 MSGERR DC C'DMMSEA100S ERROR ''' @VA04250 00263000 RDCODE DS CL3 RETURN CODE FROM FSREAD @VA04250 00264000 DC C''' READING FILE ''SYMPTOM SUMMARY A1''' @VA04250 00265000 MSGLNTH EQU *-MSGERR LENGTH OF ERROR MESSAGE @VA04250 00266000 SPACE 1 00267000 *************************************************************** 00268000 * OUTPUT AREA FOR DUPLICATE PROBLEM INFO TO TERMINAL 00269000 *************************************************************** 00270000 OUTPUT DS 0CL40 OUTPUT AREA POINTER @VA04250 00271000 OPNUM DS CL5 PROBLEM NUMBER @VA04250 00272000 DC C' ' SEPARATOR @VA04250 00273000 OSTAT DS CL8 OLD PROBLEM STATUS @VA04250 00274000 DS CL1 SEPARATOR @VA04250 00275000 ODATE DS CL8 OLD PROBLEM REPORTED DATE @VA04250 00276000 DS CL1 SEPARATOR @VA04250 00277000 OPTF1 DS CL4 PTF= INDICATOR @VA04250 00278000 OPTF2 DS CL17 FN FT OF PTF FILE @VA04250 00279000 LOUT EQU *-OUTPUT @VA04250 00280000 *************************************************************** 00281000 BLANKS DC 60C' ' BLANKS FOR CLEARING AREAS @VA04250 00282000 BLANK EQU X'40' BLANK @VA04250 00283000 NUMERIC EQU X'F0' MASK FOR MAKING UNPACKED PRINT @VA04250 00284000 ONE EQU 1 FOR LA DISPLACEMENTS ETC. @VA04250 00285000 TWO EQU 2 FOR LA DISPLACEMENTS ETC. @VA04250 00286000 KYFLDLN EQU 4 SIZE OF KEY FIELD LENGTH FIELD @VA04250 00287000 SIX EQU 6 DISPLACEMENT INTO WORK FOR RETCOD@VA04250 00288000 PSIZE EQU 8 PARM ENTRY SIZE FOR DMMSUM @VA04250 00289000 CARDLEN EQU 80 LENGTH OF DATA HUNKS @VA04250 00290000 LTORG @VA04250 00291000 HEADIN DS CL80 INPUT FOR SUMMARY CONTROL RECORD @VA04250 00292000 INPUT DS 10CL80 INPUT FOR KYWD DATA FOR OLD PROB @VA04250 00293000 TEN EQU 10 MAX NUMBER OF DUPS WE WILL DSPLY @VA04250 00294000 PATCH DC 50F'0' PATCH AREA @VA04250 00295000 COPY SYMSECT @VA04250 00296000 COPY INTSECT @VA04250 00297000 REGEQU @VA04250 00298000 END 00299000