Multiple message subfiles – one in a window

0 pts.
Tags:
RPG
My error message is not displaying in the window's message subfile. Both the main screen and the window have a message subfile defined. The RPG program defines the pgmq = '*'. Here's the dds R MSGSFL1 SFL SFLMSGRCD(24) @KEY1 SFLMSGKEY @PGMQ1 SFLPGMQ R MSGCTL1 SFLCTL(MSGSFL1) SFLDSP SFLDSPCTL SFLINZ SFLEND SFLSIZ(0010) SFLPAG(0001) @PGMQ1 SFLPGMQ R MSGSFLW SFL SFLMSGRCD(15) @KEYW SFLMSGKEY @PGMQW SFLPGMQ(276) R MSGCTLW SFLCTL(MSGSFLW) OVERLAY SFLDSP SFLDSPCTL SFLINZ SFLEND SFLSIZ(0010) SFLPAG(0001) WINDOW(STATICW) @PGMQW SFLPGMQ(276) Here's the RPG code that processes the window's subfile. This is the one that does not display when run even though I see the message in the joblog and it displays in the main window if I don't clear the program message queue. TestStat begsr write staticw dou $fkey = Cancel or Error = *off write msgctlw exfmt staticw eval @pgmq = @pgmqw eval @key = @keyw exsr ClrMsg Validate employee numbers eval Error = *off idriver chain pr503af 40 if ihelper1 <> 0 ihelper1 chain pr503af 41 endif if ihelper2 <> 0 ihelper2 chain pr503af 42 endif If error, then setup msgsfl if *in40=*on or *in41=*on or *in42=*on eval @msgid = 'WFA0001' call 'QMHSNDPM' P$sndm eval Error = *on else eval driver = idriver eval helper1 = ihelper1 eval helper2 = ihelper2 endif enddo Clear message queue before returning to main program flow exsr ClrMsg endsr Any ideas?
ASKED: March 14, 2005  5:43 PM
UPDATED: October 20, 2009  5:28 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I believe you’re missing the line to display the message on. SFLMSGRCD(?) is the line no. within the window to display the message. Give it a try.

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Scubablue
    Sorry...didn't see it there before..I'm blind to non-green! OK..just reminded myself of how I achieve it. Do you have a skeleton or based on window..if so: I write the skeleton window first, followed by function keys format, followed by the message subfile, followed by an EXFMT to the window data as follows; Write Scr02w (skeleton window format) Write Keys04 (function keys) Write Messages2 (message subfile in window) Exfmt ConfrmA (window static data..) Exsr SR_Clr_Msgqw This works fine for me.
    0 pointsBadges:
    report
  • TabbyCat
    My window STATICW contain the static data and the function keys. It's also the window that the msgsfl is "based on". These are the steps I take to display - Write staticw Write msgctlw exftm staticw Am I missing something?
    0 pointsBadges:
    report
  • TheQuigs
    I don't see it in your post, but do you have an 'OVERLAY' keyword on the STATICW record? If not, the message subfile will be erased from the screen with your EXFMT STATICW.
    0 pointsBadges:
    report
  • TabbyCat
    Yes it's there. I may have missed it when copying things. The window's keywords are WINDOW(3 20 17 35) CF03 CF12 OVERLAY RMVWDW
    0 pointsBadges:
    report
  • AskDave
    Does your ClrMsg routine by any chance do a write the message control record on the main screen? After the EXFMT for the window, you must be careful to only refer to formats that are within the window. I have a separate clear routine that I use for each different window that contains a message subfile.
    0 pointsBadges:
    report
  • TabbyCat
    Here's the logic for my ClrMsg subrtn. I pass it the pgmq and key for the window msgsfl and it always occurs AFTER the write of the screen: ClrMsg begsr call 'QMHRMVPM' P$clrm endsr
    0 pointsBadges:
    report
  • TomLiotta
    Without seeing what this does:
    call 'QMHSNDPM' P$sndm
    
    ...it's going to be guesswork. First guess is that messages aren't sent correctly. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following