Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message Subfile wont display

Status
Not open for further replies.

TracyV

Programmer
Nov 24, 2003
35
US
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



 
Looks to me like you haven't loaded the SDS_PROC field. What I do is put the program name in that field, and I use the program name when I do the call to QMHSNDPM instead of "*".

The SDS_PROC field on the message subfile tells which program message queue to display. It has to match where you are sending the messages.

 
Artiztik-
'*' automatically loads the program name for you. I did figure out the problem.....well sort of. I removed the command keys on the bottom of the screen and ran the program...error messages displayed fine. Put the command keys back on the screen....message subfile did not display again. I was trying to use line 21 for the subfile. What I ended up doing was moving all the command keys up one line and using line 24 for the message subfile and now it works fine....go figure!!!!!!
 
True "*" puts in the current call stack entry, and if you aren't using subprocedures and modules you'll be ok. But if you go down that road, you'll have to use the program name... it's bitten me before. So heads up.

Glad you found the problem though.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top