× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



For MANY years I have used the same messaging logic in 5250 programs which
involves using a copybook and now that I have made a slight change to it, I
can't figure out how to fix what I broke.



I have always used the variable sdsPgmNam which is part of the SDS. Rather
than including the copybook that has my SndMsg function in every program, I
decided to create a module (and will probably change to use a service
program at some point) with this and several other functions and bind it in
at compile time. The problem that I have run into is that when I call the
function now, sdsPgmNam is the name of the module, not the name of the
program. I've tried using some other values such as *PGMBDY but I've
apparently got something wrong because I can't get the message into my
subfile. Can anyone point me in the right direction on this?



Here is the SDS.

d sds

d sdsPgmNam *proc



Here is the subfile.

A R SUBMSG SFL

A SFLMSGRCD(27)

A MSGKEY SFLMSGKEY

A SDSPGMNAM SFLPGMQ(10)



Here is the SndMsg Function

p SndMsg b export

d SndMsg pi

d SndMsgData 256 const



d SndMsgDLen s 9b 0 inz(256)

d MsgQNB s 9b 0 inz(0)

d MsgKey s 4a



SndMsgDLen = %len(%trim(SndMsgData));

APIError.ErrPrv = %size(APIError);

callp QMHSNDPM(*blanks

:'QCPFMSG QSYS'

:SndMsgData

:SndMsgDLen

:'*INFO'

:sdsPgmNam

:MsgQnb

:MsgKey

:APIError);

endif;

p e


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.