GRC TITLE 'DMMGRC (IPCS) VM/370 - RELEASE 6' 00001000
* 00002000
* MODULE NAME: DMMGRC 00003000
* 00004000
* 00005000
* FUNCTION: GIVEN AN ADDRESS READS THE DUMP RECORD CONTAINING 00006000
* THE DATA AT THAT ADDRESS AND PASSES THE DATA BACK TO THE 00007000
* CALLER. 00008000
* 00009000
* ATTRIBUTES: REUSABLE 00010000
* NON-REENTRANT 00011000
* 00012000
* 00013000
* ENTRY POINTS: DMMGRC 00014000
* 00015000
* 00016000
* ENTRY CONDITIONS: SHARED CONSTANT AREA CONTAINS AN ADDRESS AT 00017000
* GRCPARM WHICH IS THE REQUESTED DATA ADDRESS 00018000
* 00019000
* 00020000
* EXIT CONDITIONS: NORMAL -- R1 POINTS TO DATA READ FROM DUMP 00021000
* ERROR RETURN -- TO DMMPRM TO PROMPT USER FOR 00022000
* INFORMATION BEFORE QUITTING. 00023000
* 00024000
* 00025000
* CALLS TO OTHER ROUTINES: DMMPRM IF ERROR ENCOUNTERED 00026000
* (DMMPRM WILL NOT RETURN TO DMMGRC). 00027000
* 00028000
* 00029000
* EXTERNAL REFERENCES: WRKBUF (COMMON 4K WORK BUFFER) 00030000
* EXINREC (COMMON 4K INPUT AREA) 00031000
* EXCONST (COMMON CONSTANT AREA) 00032000
* 00033000
* 00034000
* TABLES/WORKAREAS: 00035000
* 00036000
* 00037000
* REGISTER USAGE: R14 RETURN REGISTER 00038000
* R13 SAVEAREA POINTER 00039000
* R12 BASE REGISTER 00040000
* R10 INPUT RECORD POINTER 00041000
* R8 WRKBUF POINTER (COMMON WORK BUFFER) 00042000
* R7 COMMON SHARED CONSTANT AREA POINTER 00043000
* R2-R6 WORK 00044000
* 00045000
* 00046000
* NOTES: A 200 BYTE PATCH AREA EXISTS AT LABEL 'PATCH' 00047000
* 00048000
* 00049000
* OPERATION: 00050000
* 00051000
* I. TAKE ADDRESS SUPPLIED BY THE CALLER AND LOCATE WHICH 00052000
* DUMP RECORD CONTAINS THE DATA AT THE GIVEN ADDRESS. 00053000
* II. READ IN THE RECORD WHICH CONTAINS THE DATA. 00054000
* III. CALCULATE WHERE IN THE REC. THE DATA REQUESTED BY THE 00055000
* CALLER RESIDES. 00056000
* IV. RETURN TO CALLER WITH R1 POINTING TO THE DATA. 00057000
* ERROR MESSAGES: 00058000
* DMMGRC100S ERROR 'NNN' READING FILE 'PRBNNNNN DUMP A1' 00059000
* DMMGRC809S REQUESTED ADDRESS NOT IN DUMP 00060000
* 00061000
* 00062000
EJECT 00063000
DMMGRC CSECT @VA04250 00064000
USING DMMGRC,R15 TEMPORARY ADDRESSABILITY @VA04250 00065000
B START BRANCH AROUND EYECATCHER @VA04250 00066000
DS 0D @VA04250 00067000
MODNAME DC C'DMMGRC ' MODULE NAME @VA04250 00068000
RELLEV DC C'REL4LEV0' RELEASE AND LEVEL @V4075A1 00069000
START STM R14,R12,12(R13) SAVE CALLER'S REGISTERS @VA04250 00070000
DROP R15 @VA04250 00071000
LR R12,R15 ESTABLISH OUR BASE @VA04250 00072000
USING DMMGRC,R12 @VA04250 00073000
ST R13,SAVEAREA+8 CALLER'S SAVEAREA POINTER @VA04250 00074000
LA R13,SAVEAREA POINT TO OUR SAVEAREA @VA04250 00075000
EXTRN WRKBUF SYSTEM WORK BUFFER (4K) @VA04250 00076000
L R9,VWRKBUF POINT TO COM WRK BUFFER @VA04250 00077000
USING WRKBUF,R9 @VA04250 00078000
L R7,VEXCON POINT TO COMMON AREA @VA04250 00079000
USING SHARECON,R7 @VA04250 00080000
L R10,VINREC POINT TO INPUT AREA @VA04250 00081000
USING DMPINREC,R10 @VA04250 00082000
*************************************************************** 00083000
* START BY FINDING WHERE IN THE DUMP THE DATA ASSOCIATED 00084000
* WITH THE ADDRESS SUPPLIED BY THE CALLER IS LOCATED (WHICH 00085000
* RECORD NUMBER). 00086000
*************************************************************** 00087000
L R2,GRCPARM GET ADDR SUPPLIED BY CALLER @VA04250 00088000
LA R2,0(R2) HIGH ORDER BYTE OFF @VA04250 00089000
LA R3,PAGEMAP POINT TO PAGE MAP @VA04250 00090000
LR R4,R2 WORK REG WITH USER ADDRESS @VA04250 00091000
SRL R4,12 GET PAGE NUMBER @VA04250 00092000
LA R5,RECORD5 START REC NUMBER AT 5 @VA04250 00093000
* (PREVIOUS RECORDS ARE CONTROLS AND TABLES) 00094000
LA R6,MAXCOUNT TO INSURE WE DON'T LOOP @VA04250 00095000
GETENTRY CH R4,0(R3) FOUND THE REQUESTED PAGE? @VA04250 00096000
BE GOTPAGE YES - GOT IT @VA04250 00097000
LA R3,ISIZE(R3) BUMP ITEM TBL PTR @VA04250 00098000
LA R5,NEXTREC(R5) BUMP RECORD NUMBER @VA04250 00099000
CLC FOXES,0(R3) END OF ITEM TABLE? @VA04250 00100000
BE MSGITEND YES - GO WRITE ABOUT IT @VA04250 00101000
BCT R6,GETENTRY TRY AGAIN IF NOT TOO FAR @VA04250 00102000
B MSGITEND DIDN'T FIND END OF ITEM TBL @VA04250 00103000
*************************************************************** 00104000
* WE NOW KNOW THE REC NUMBER IN THE DUMP WHERE THE DATA 00105000
* EXISTS. NOW READ IT IN, CALCULATE WHERE THE DATA THE USER 00106000
* REQUESTED IS IN THE BUFFER, AND RETURN TO HIM. 00107000
*************************************************************** 00108000
GOTPAGE L R3,DMPFSCB POINT OT FSCB OF DUMP FILE @VA04250 00109000
FSREAD FSCB=(R3),BUFFER=WRKBUF,RECNO=(R5) @VA04250 00110000
LR R6,R15 RETURN CODE FROM FSWRITE @VA04250 00111000
FSCLOSE FSCB=(R3) @VA04250 00112000
LTR R6,R6 GOOD RETURN FROM FSREAD? @VA04250 00113000
BNZ RDERROR NO, GO PROCESS ERROR @VA04250 00114000
LR R4,R2 LOAD WORK REG @VA04250 00115000
SRL R4,12 ROUNDS R4 DOWN TO @VA04250 00116000
SLL R4,12 START OF THIS PAGE @VA04250 00117000
SR R2,R4 NOW R2 HAS OFFSET INTO BUFF @VA04250 00118000
*************************************************************** 00119000
* ALL PROCESSING HAS BEEN SUCCESSFUL. RETURN TO CALLER WITH 00120000
* ADDRESS OF DATA REQUESTED IN R1. 00121000
*************************************************************** 00122000
LA R1,WRKBUF START OF BUFFER TO R1 @VA04250 00123000
AR R1,R2 R1 POINTS TO THE REQ DATA @VA04250 00124000
GRCRET L R13,SAVEAREA+8 RESTORE CALLER'S SAVEAREA @VA04250 00125000
LM R14,R0,12(R13) RESTORE REGISTERS @VA04250 00126000
LM R2,R12,28(R13) PRESERVING R1 @VA04250 00127000
SR R15,R15 RETURN CODE ZERO @VA04250 00128000
BR R14 GO BACK TO CALLER @VA04250 00129000
*************************************************************** 00130000
* ISSUE MESSAGE AND THEN GO TO PROMPTING ROUTINE 00131000
* DMMGRC809S REQUESTED ADDRESS NOT IN DUMP 00132000
*************************************************************** 00133000
MSGITEND LA R2,MSGEND POINT TO MESSAGE TEXT @VA04250 00134000
LA R3,MSGENDL LENGTH OF MESSAGE @VA04250 00135000
MVC TEXT5(L'MSGEND),MSGEND MOVE MESSAGE TO TEXT @VA04250 00136000
B NOPAGE GO WRITE MESSAGE @VA04250 00137000
*************************************************************** 00138000
* ISSUE MESSAGE: 00139000
* DMMGRC100S ERROR 'NNN' READING 'PRBNNNNN DUMP A1' 00140000
* WE WILL THEN GO DIRECTLY TO PROMPT WHO WILL RETURN TO DMMEDM 00141000
*************************************************************** 00142000
RDERROR CVD R6,WKDWD CONVERT RET CODE TO DECIMAL @VA04250 00143000
UNPK RDCODE,PACKED(TWO) UNPACK INTO MESSAGE @VA04250 00144000
OI RDCODE2,NUMERIC MAKE IT READABLE @VA04250 00145000
MVC FNAME,DUMPNUM MOVE 'PRBNNNNN' TO MSG @VA04250 00146000
LA R2,MSGREAD POINT TO MESSAGE @VA04250 00147000
LA R3,MSGREADL LENGTH OF MESSAGE @VA04250 00148000
MVC TEXT5(MSGREADL),MSGREAD MOVE MESSAGE TO TEXT @VA04250 00149000
NOPAGE WRTERM (R2),(R3) @VA04250 00150000
*************************************************************** 00151000
* CALL DMMPRM (HE WILL NOT RETURN HERE BUT RETURN TO DMMEDM) 00152000
*************************************************************** 00153000
GRCQUIT2 OI TYPESW,PROCERR SET PROCESS ERROR SWITCH @VA04250 00154000
CALL DMMPRM CALL PROMPTING ROUTINE @VA04250 00155000
EJECT 00156000
*************************************************************** 00157000
* CONSTANTS SAVEAREAS AND EQUATES 00158000
*************************************************************** 00159000
SAVEAREA DS 18F OUR SAVEAREA @VA04250 00160000
WKDWD DS D DOUBLE WORD WORK AREA @VA04250 00161000
VEXCON DC V(SHARECON) POINTER TO COMMON CONSTANTS @VA04250 00162000
VINREC DC V(EXTINREC) DUMP RECORD INPUT AREA @VA04250 00163000
VWRKBUF DC V(WRKBUF) POINTER TO WORKBUFFER @VA04250 00164000
FOXES DC X'FFFF' @VA04250 00165000
MSGEND DC C'DMMGRC809S REQUESTED ADDRESS NOT IN DUMP' @VA04250 00166000
MSGENDL EQU *-MSGEND LENGTH OF MESSAGE @VA04250 00167000
*************************************************************** 00168000
* DMMGRC100S ERROR 'NNN' READING 'FILENAME FILETYPE FM' 00169000
*************************************************************** 00170000
MSGREAD DC C'DMMGRC100S ERROR ''' @VA04250 00171000
RDCODE DS CL3 FSREAD RETURN CODE @VA04250 00172000
DC C''' READING FILE ''' @VA04250 00173000
FNAME DS CL8 DUMP FILE NAME @VA04250 00174000
DC C' DUMP A1''' @VA04250 00175000
MSGREADL EQU *-MSGREAD LENGTH OF MESSAGE @VA04250 00176000
PATCH DC 50F'0' PATCH AREA @VA04250 00177000
NUMERIC EQU X'F0' MASK TO INSURE NUMERICS @VA04250 00178000
ISIZE EQU 2 LENGTH ITEM TABLE ENTRY @VA04250 00179000
RECORD5 EQU 5 FIRST VALID DUMP DATA RECD @VA04250 00180000
RDCODE2 EQU RDCODE+2 LOW ORDER BYTE OF RET CODE @VA04250 00181000
MAXCOUNT EQU 1792 MAX DUMP RECORDS POSSIBLE @VA04250 00182000
NEXTREC EQU 1 INCREMENT VALUE FOR MAP @VA04250 00183000
TWO EQU 2 VALUE FOR MOVE COUNT ETC. @VA04250 00184000
PACKED EQU WKDWD+6 RETURN CODE AFTER CVD @VA04250 00185000
LTORG @VA04250 00186000
COPY DMPBLOKS @VA04250 00187000
PAGEMAP EQU DMPPGMAP+56 PAGE MAP LOC IN DMPINREC @V4075A1 00188000
COPY EXCONST @VA04250 00189000
REGEQU @VA04250 00190000
END 00191000