|
On 03/25/99 01:30:20 PM Rob Berendt wrote: >I've tried using QCMDEXC to execute a command. Do it all the time - no >problem. >However, SNDPGMMSG is unacceptable. I do a DSPCMD and see no logical reason. >I >supposed if I stretch I would determine that using QCMDEXC doesn't count as >*IPGM >or *BPGM but instead counts as *INTERACT or *BATCH. So I guess I'll have to >write >a CL program to execute SNDPGMMSG, or use an alternative to SNDPGMMSG. I think that SNDPGMMSG is not allowed because it allows a return variable (KEYVAR) I used to use either SNDMSG or SNDBRKMSG. I have started using the QMHSNDPM API with RPG IV. Here's a snippet from a program that re-sends the job log messages to the caller: D* Error return code D ErrStruc DS INZ D ErrSSize 1 4B 0 INZ(%len(ErrStruc)) D ErrSUse 5 8B 0 D ErrSMsgID 9 15 D ErrSResrv 16 16 D ErrSData 17 272 D SMsgLen S 8B 0 D SCallStk# S 8B 0 C* Send the message to the caller C Movel(P) JoblMsgID SMsgID C Movel JoblMsgFil SMsgFile C Move JoblMsgLib SMsgFile C Eval SMsgLen=%len(%trim(MessageTxt)) C Movel(P) '*DIAG' SMsgType C Movel(P) PPgmName SCallStkE C Z-Add 0 SCallStk# C Call 'QMHSNDPM' C Parm SMsgID 7 C Parm SMsgFile 20 C Parm MessageTxt 4096 C Parm SMsgLen C Parm SMsgType 10 C Parm SCallStkE 10 C Parm SCallStk# C Parm SMsgKey 4 C Parm ErrStruc Buck Calabro Billing Concepts Inc (formerly CommSoft), Albany, NY mailto:mcalabro@commsoft.net * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the RPG/400 Discussion Mailing List! To submit a new * * message, send your mail to "RPG400-L@midrange.com". To unsubscribe * * from this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe RPG400-L' in the body of your message. Questions should * * be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.