× 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.



Yes, you are correct, Chuck. I mis-typed the example.

Yes, %msgid() would be just exactly what I am looking for.

Looking at the other suggestions, it occurs to me that perhaps I need to first write & read a format with the MSGIDs I want to retrieve, as hidden fields. Or something. Heh heh... more play time. Man I love this platform.


On 1/18/2014 4:13 AM, CRPence wrote:
On 17-Jan-2014 23:02 -0800, Booth Martin wrote:
<<SNIP>> populate a field in an RPG program with a specific message
from a specific message file.

Something like:
wText = MSGID(*LIBL/FILENAME UTL12004)

where UTL12004 is the level 1 text in a specific MSGF.

Any ideas?
Presumably the UTL12004 reference intends to suggest a message
identifier which is seven bytes; i.e. a MsgID of a *MSGF is defined as
having a three byte prefix followed by four hex digits. So either the
MsgID is incorrectly written as eight bytes instead of seven bytes [so
perhaps something like UTL1204 were intended], or the intent was a
decimal specification for an apparent msg UTL2EE4; i.e. whereby 0d12004
= 0x2EE4.

If there was a run-time feature, possibly it would look more like one of:
wText = %MSGID('*LIBL/FILENAME' : 'UTL2EE4') ; // a builtin
MSGID Utl12004 FileName wText ; // e.g. like a READE

I am aware of no such feature. Almost surely requires a procedure to
be coded to define the effect, probably using the Retrieve Message
(QMHRTVM) API [or perhaps a CLLE module using Retrieve Message (RTVMSG)
command]; e.g. perhaps something like one of:
wText = RtvMsg('FILENAME':'UTL2EE4') ;
wText = RtvMsg(FileName:Utl2EE4:'replacementdata':%size(wText)) ;

If one were so inclined, the interface to a Message File could be
coded as a SPECIAL file to allow READ requests, although each of the
OPEN and CLOSE for an I=input-only declaration on the F-spec probably
would be no-ops because the file name might [best] be dynamically
resolved each time to allow the language to change [as implied by the
*LIBL]; and FEOD would have no apparent equivalent function for use with
a *MSGF having its access implemented with a special file.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.