EXEC CICS READQ TS QUEUE('YYYYYYYY') INTO(TSREC) C
LENGTH(TSLENG) ITEM(1) RESP(AAARESP)
Below is my code,
TITLE 'MAP PAGING'
PRINT GEN
*
DFHREGS
COPY DFHAID
COPY DFHBMSCA
EJECT
DFHEISTG
CVDARESP DS F EIBRESP CVDA
MAPAREA DS 0X
*
TSREC DS 0H TEMPORARY STORAGE QUEUE
COPY BMSMAP1
TSLENG EQU *-TSREC TSQ LENGTH
*
MAPAREAE DS 0X
*
COMMAREA DS 0H COMMAREA
CURRPAGE DS H CURRENT PAGE
NUMPAGES DS H TOTAL NUMBER OF PAGES
CMLEN EQU *-COMMAREA COMMAREA LENGTH
*
PAGENO DS H
TRANSID DS CL4
LEN1 DS H
ACCESS DS D
COMM_ARR DS CL80
WTO_PRNT DS CL80
PROGRAMN DS CL8
DOUBLE DS D
VALUE DS D
AAARESP DS F
AAARESP2 DS F
TERM_ID DS CL4
ACCESS_M DS F
M_PROG DS CL8
M_LENG DS CL2
M_VALU DS CL60
DS F
EJECT
*******************************************************************
* START OF PROGRAM *
*******************************************************************
XXXXXXXX DFHEIENT CODEREG=3,DATAREG=13,EIBREG=11
XXXXXXXX AMODE 31
XXXXXXXX RMODE ANY
CLI EIBAID,DFHPF3 CHECK IF PF3 KEY
BE CLEARS PF3 ENTER GO CLEARS
CLI EIBAID,DFHPF15
BE CLEARS
CLI EIBAID,DFHCLEAR CHECK IF CLEAR KEY
BE END IF YES GO END
*
* CHECK IF PROGRAM EXISTS
CHKPROG EQU *
* SPACING OUT COMM_ARR AND WTO_PRINT
MVI COMM_ARR,C' '
MVC COMM_ARR+1(L'COMM_ARR-1),COMM_ARR
* ENDS SPACING
EXEC CICS INQUIRE C
PROGRAM(PROGRAMN) C
RESP(AAARESP) C
RESP2(AAARESP2)
CLC AAARESP,DFHRESP(NORMAL)
BNE NOFOUND BRANCH IF PROGRAM NOT FOUND
EXEC CICS LINK PROGRAM(PROGRAMN) C
COMMAREA(COMM_ARR) C
LENGTH(70)
XR R10,R10
MVC LEN1(2),COMM_ARR+8
* FORMATTING LENGTH (LEN) FROM HEX TO EBCDIC
LH R10,COMM_ARR+8
CVD R10,DOUBLE
OI DOUBLE+L'DOUBLE-1,X'0F'
UNPK VALUE,DOUBLE
MVC LEN1(2),VALUE+6
* END FORMATTING
MVC 3(8,R8),COMM_ARR MAP PROGRAM NAME
MVC 14(2,R8),LEN1 MAP DATA LEGNTH
MVC 19(60,R8),COMM_ARR+10 MAP DATA VALUE
BR R7
NOFOUND EQU *
MVC 3(8,R8),PROGRAMN MAP PROGRAM NAME
MVC 14(2,R8),=X'4040' MAP LEN SPACED OUT
MVC 19(11,R8),=C'***PGMIDERR' MAP DATA VALUE
BR R7
***********************************************************
***********************************************************
SEND_MAP EQU *
EXEC CICS DELETEQ QUEUE('YYYYYYYY')
LA R4,PRGTBL
LA R5,PRGTBLE LOOP TIMES
LA R6,1 PAGE COUNTER SET
STH R6,PAGENO
MAP_CNT EQU *
LA R9,0 PAGING LOOP
LA R8,PRG_N01L ENTRY ADDRESS OF MAP DATA TABLE
EXEC CICS INQUIRE SYSTEM C
JOBNAME(REGIONNO)
MVC TRANIDO,EIBTRNID
LOOP_MAP EQU *
LA R9,1(R9) INCREMENTING LOOP
MVC PROGRAMN,0(R4) GET PROGRAM NAME
BAL R7,CHKPROG
LA R4,PRGTBLL(,R4) NEXT PROGRAM ADDRESS
LA R8,79(R8) NEXT MAP ADDRESS
C R9,=F'14'
BNE CONTINUE
WRITETS EQU *
EXEC CICS WRITEQ TS QUEUE('YYYYYYYY') FROM(TSREC) C
LENGTH(TSLENG) ITEM(PAGENO)
LA R6,1(R6)
STH R6,PAGENO
BCT R5,MAP_CNT
CONTINUE EQU *
BCT R5,LOOP_MAP
LA R5,PRGTBLE
M R4,=F'1'
D R4,PAGEITM
C R4,ZERO
BE SET_PAGE
EXEC CICS WRITEQ TS QUEUE('YYYYYYYY') FROM(TSREC) C
LENGTH(TSLENG) ITEM(PAGENO)
SET_PAGE EQU *
STH R6,NUMPAGES
LA R6,1
STH R6,PAGENO
STH R6,CURRPAGE
B LOAD_MAP
LOAD_MAP EQU *
EXEC CICS READQ TS QUEUE('YYYYYYYY') INTO(TSREC) C
LENGTH(TSLENG) ITEM(1) RESP(AAARESP)
CLC AAARESP,DFHRESP(NORMAL)
BNE END
EXEC CICS SEND C
MAP('BMSMAP1') C
MAPSET('BMSMAP1') C
FREEKB C
ERASE C
FROM(TSREC) C
LENGTH(TSLENG) C
RESP(AAARESP) C
NOHANDLE
RETURNC EXEC CICS RETURN C
COMMAREA(COMMAREA) C
LENGTH(CMLEN) C
TRANSID(EIBTRNID)
CLEARS EQU *
EXEC CICS SEND CONTROL ERASE
EXEC CICS SEND TEXT FROM (SESSENDS) LENGTH(17)
END EQU *
EXEC CICS RETURN
EJECT
***********************************************************************
*** CONSTANTS ***
***********************************************************************
PRGTBL DS 0F
DC C'AAAAAAAA'
PRGTBLL EQU *-PRGTBL
DC C'BBBBBBBB'
DC C'CCCCCCCC'
DC C'DDDDDDDD'
DC C'EEEEEEEE'
DC C'FFFFFFFF'
DC C'GGGGGGGG'
DC C'HHHHHHHH'
DC C'IIIIIIII'
DC C'JJJJJJJJ'
DC C'KKKKKKKK'
DC C'LLLLLLLL'
DC C'MMMMMMMM'
DC C'NNNNNNNN'
DC C'OOOOOOOO'
DC C'PPPPPPPP'
DC C'QQQQQQQQ'
DC C'RRRRRRRR'
DC C'SSSSSSSS'
DC C'TTTTTTTT'
DC C'UUUUUUUU'
DC C'VVVVVVVV'
DC C'WWWWWWWW'
PRGTBLE EQU (*-PRGTBL)/PRGTBLL
SESSENDS DC CL17'SESSION ENDS'
LEN2 DC F'9'
PAGEITM DC F'14'
ZERO DC F'0'
END
PRINT GEN
*
DFHREGS
COPY DFHAID
COPY DFHBMSCA
EJECT
DFHEISTG
CVDARESP DS F EIBRESP CVDA
MAPAREA DS 0X
*
TSREC DS 0H TEMPORARY STORAGE QUEUE
COPY BMSMAP1
TSLENG EQU *-TSREC TSQ LENGTH
*
MAPAREAE DS 0X
*
COMMAREA DS 0H COMMAREA
CURRPAGE DS H CURRENT PAGE
NUMPAGES DS H TOTAL NUMBER OF PAGES
CMLEN EQU *-COMMAREA COMMAREA LENGTH
*
PAGENO DS H
TRANSID DS CL4
LEN1 DS H
ACCESS DS D
COMM_ARR DS CL80
WTO_PRNT DS CL80
PROGRAMN DS CL8
DOUBLE DS D
VALUE DS D
AAARESP DS F
AAARESP2 DS F
TERM_ID DS CL4
ACCESS_M DS F
M_PROG DS CL8
M_LENG DS CL2
M_VALU DS CL60
DS F
EJECT
*******************************************************************
* START OF PROGRAM *
*******************************************************************
XXXXXXXX DFHEIENT CODEREG=3,DATAREG=13,EIBREG=11
XXXXXXXX AMODE 31
XXXXXXXX RMODE ANY
CLI EIBAID,DFHPF3 CHECK IF PF3 KEY
BE CLEARS PF3 ENTER GO CLEARS
CLI EIBAID,DFHPF15
BE CLEARS
CLI EIBAID,DFHCLEAR CHECK IF CLEAR KEY
BE END IF YES GO END
*
* CHECK IF PROGRAM EXISTS
CHKPROG EQU *
* SPACING OUT COMM_ARR AND WTO_PRINT
MVI COMM_ARR,C' '
MVC COMM_ARR+1(L'COMM_ARR-1),COMM_ARR
* ENDS SPACING
EXEC CICS INQUIRE C
PROGRAM(PROGRAMN) C
RESP(AAARESP) C
RESP2(AAARESP2)
CLC AAARESP,DFHRESP(NORMAL)
BNE NOFOUND BRANCH IF PROGRAM NOT FOUND
EXEC CICS LINK PROGRAM(PROGRAMN) C
COMMAREA(COMM_ARR) C
LENGTH(70)
XR R10,R10
MVC LEN1(2),COMM_ARR+8
* FORMATTING LENGTH (LEN) FROM HEX TO EBCDIC
LH R10,COMM_ARR+8
CVD R10,DOUBLE
OI DOUBLE+L'DOUBLE-1,X'0F'
UNPK VALUE,DOUBLE
MVC LEN1(2),VALUE+6
* END FORMATTING
MVC 3(8,R8),COMM_ARR MAP PROGRAM NAME
MVC 14(2,R8),LEN1 MAP DATA LEGNTH
MVC 19(60,R8),COMM_ARR+10 MAP DATA VALUE
BR R7
NOFOUND EQU *
MVC 3(8,R8),PROGRAMN MAP PROGRAM NAME
MVC 14(2,R8),=X'4040' MAP LEN SPACED OUT
MVC 19(11,R8),=C'***PGMIDERR' MAP DATA VALUE
BR R7
***********************************************************
***********************************************************
SEND_MAP EQU *
EXEC CICS DELETEQ QUEUE('YYYYYYYY')
LA R4,PRGTBL
LA R5,PRGTBLE LOOP TIMES
LA R6,1 PAGE COUNTER SET
STH R6,PAGENO
MAP_CNT EQU *
LA R9,0 PAGING LOOP
LA R8,PRG_N01L ENTRY ADDRESS OF MAP DATA TABLE
EXEC CICS INQUIRE SYSTEM C
JOBNAME(REGIONNO)
MVC TRANIDO,EIBTRNID
LOOP_MAP EQU *
LA R9,1(R9) INCREMENTING LOOP
MVC PROGRAMN,0(R4) GET PROGRAM NAME
BAL R7,CHKPROG
LA R4,PRGTBLL(,R4) NEXT PROGRAM ADDRESS
LA R8,79(R8) NEXT MAP ADDRESS
C R9,=F'14'
BNE CONTINUE
WRITETS EQU *
EXEC CICS WRITEQ TS QUEUE('YYYYYYYY') FROM(TSREC) C
LENGTH(TSLENG) ITEM(PAGENO)
LA R6,1(R6)
STH R6,PAGENO
BCT R5,MAP_CNT
CONTINUE EQU *
BCT R5,LOOP_MAP
LA R5,PRGTBLE
M R4,=F'1'
D R4,PAGEITM
C R4,ZERO
BE SET_PAGE
EXEC CICS WRITEQ TS QUEUE('YYYYYYYY') FROM(TSREC) C
LENGTH(TSLENG) ITEM(PAGENO)
SET_PAGE EQU *
STH R6,NUMPAGES
LA R6,1
STH R6,PAGENO
STH R6,CURRPAGE
B LOAD_MAP
LOAD_MAP EQU *
EXEC CICS READQ TS QUEUE('YYYYYYYY') INTO(TSREC) C
LENGTH(TSLENG) ITEM(1) RESP(AAARESP)
CLC AAARESP,DFHRESP(NORMAL)
BNE END
EXEC CICS SEND C
MAP('BMSMAP1') C
MAPSET('BMSMAP1') C
FREEKB C
ERASE C
FROM(TSREC) C
LENGTH(TSLENG) C
RESP(AAARESP) C
NOHANDLE
RETURNC EXEC CICS RETURN C
COMMAREA(COMMAREA) C
LENGTH(CMLEN) C
TRANSID(EIBTRNID)
CLEARS EQU *
EXEC CICS SEND CONTROL ERASE
EXEC CICS SEND TEXT FROM (SESSENDS) LENGTH(17)
END EQU *
EXEC CICS RETURN
EJECT
***********************************************************************
*** CONSTANTS ***
***********************************************************************
PRGTBL DS 0F
DC C'AAAAAAAA'
PRGTBLL EQU *-PRGTBL
DC C'BBBBBBBB'
DC C'CCCCCCCC'
DC C'DDDDDDDD'
DC C'EEEEEEEE'
DC C'FFFFFFFF'
DC C'GGGGGGGG'
DC C'HHHHHHHH'
DC C'IIIIIIII'
DC C'JJJJJJJJ'
DC C'KKKKKKKK'
DC C'LLLLLLLL'
DC C'MMMMMMMM'
DC C'NNNNNNNN'
DC C'OOOOOOOO'
DC C'PPPPPPPP'
DC C'QQQQQQQQ'
DC C'RRRRRRRR'
DC C'SSSSSSSS'
DC C'TTTTTTTT'
DC C'UUUUUUUU'
DC C'VVVVVVVV'
DC C'WWWWWWWW'
PRGTBLE EQU (*-PRGTBL)/PRGTBLL
SESSENDS DC CL17'SESSION ENDS'
LEN2 DC F'9'
PAGEITM DC F'14'
ZERO DC F'0'
END
Any help or direction would be much appreciated.