I am trying to display messages from a message file to a message subfile in a program. The messages are never displayed in the subfile. When you view the job log you can see the correct messages, but they are never moved to the message subfile. I Any suggestions would be greatly appreciated!!!
A DSPSIZ(24 80 *DS3)
A PRINT
A R SCRN01
A CF01
A CF02
A CF03
A CF07
A CF09
A CF10
A CF11
A OVERLAY
A 1 70DATE
A EDTCDE(Y)
A R MSGSFL SFL
A SFLMSGRCD(22)
A MSGKEY SFLMSGKEY
A SDS_PROC SFLPGMQ
A R MSGCTL SFLCTL(MSGSFL)
A SFLSIZ(0002)
A SFLPAG(0001)
A SFLDSP
A SFLDSPCTL
A SFLINZ
A N03 SFLEND
A SDS_PROC SFLPGMQ
A
MSGID S 7A
MSGLOC S 20A INZ('QUSERMSG *LIBL ')
MSGRPLDTA S 1A INZ(' ')
MSGRPLDTALEN S 4B 0 INZ(0)
MSGTYPE S 10A INZ('*DIAG')
MSGQUEUE S 276A INZ('*')
MSGCALLSTACK S 4B 0 INZ(0)
MSGKEY S 4A INZ(' ')
MSGERR S 4B 0 INZ(0)
MSGRMV S 10A INZ('*ALL')
Dou (cfkey = exit)
Write Msgctl
Exfmt Scrn01
Eval MsgKey = *blanks
Exsr Rmvmsg
.
.
.
Add2Key Chain Cmadd2
If %Found
Movel(P) 'SS00501' MsgId
Exsr SNDMSG
Sndmsg Begsr
CALL 'QMHSNDPM'
Parm MSGID
Parm MSGLOC
Parm MSGRPLDTA
Parm MSGRPLDTALEN
Parm MSGTYPE
Parm MSGQUEUE
Parm MSGCALLSTACK
Parm MSGKEY
Parm MSGERR
Endsr
Rmvmsg Begsr
Call 'QMHRMVPM'
Parm MSGQUEUE
Parm MSGCALLSTACK
Parm MSGKEY
Parm MSGRMV
Parm MSGERR
Endsr
A DSPSIZ(24 80 *DS3)
A PRINT
A R SCRN01
A CF01
A CF02
A CF03
A CF07
A CF09
A CF10
A CF11
A OVERLAY
A 1 70DATE
A EDTCDE(Y)
A R MSGSFL SFL
A SFLMSGRCD(22)
A MSGKEY SFLMSGKEY
A SDS_PROC SFLPGMQ
A R MSGCTL SFLCTL(MSGSFL)
A SFLSIZ(0002)
A SFLPAG(0001)
A SFLDSP
A SFLDSPCTL
A SFLINZ
A N03 SFLEND
A SDS_PROC SFLPGMQ
A
MSGID S 7A
MSGLOC S 20A INZ('QUSERMSG *LIBL ')
MSGRPLDTA S 1A INZ(' ')
MSGRPLDTALEN S 4B 0 INZ(0)
MSGTYPE S 10A INZ('*DIAG')
MSGQUEUE S 276A INZ('*')
MSGCALLSTACK S 4B 0 INZ(0)
MSGKEY S 4A INZ(' ')
MSGERR S 4B 0 INZ(0)
MSGRMV S 10A INZ('*ALL')
Dou (cfkey = exit)
Write Msgctl
Exfmt Scrn01
Eval MsgKey = *blanks
Exsr Rmvmsg
.
.
.
Add2Key Chain Cmadd2
If %Found
Movel(P) 'SS00501' MsgId
Exsr SNDMSG
Sndmsg Begsr
CALL 'QMHSNDPM'
Parm MSGID
Parm MSGLOC
Parm MSGRPLDTA
Parm MSGRPLDTALEN
Parm MSGTYPE
Parm MSGQUEUE
Parm MSGCALLSTACK
Parm MSGKEY
Parm MSGERR
Endsr
Rmvmsg Begsr
Call 'QMHRMVPM'
Parm MSGQUEUE
Parm MSGCALLSTACK
Parm MSGKEY
Parm MSGRMV
Parm MSGERR
Endsr