×
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.
Thank you all for your suggestions, tips etc.
I have a working version and have included it below for anyone needing this
utility.
Darryl Freinkel
A4G
Telephone: 770.321.8562 Mobile: 678.355.8562
F* Program Name: SYIMSGR Created: 4/22/2021 By DHF
F* Overview: This program is a utility program that retrieves a message
from a
F* message file and substitutes the MSGDTA values into the
message
F* returning the message to the calling program.
F* This utility is needed as there are program in the system
that are either
F* cloned from an interactive program or are part of an
interactive program
F* but the screen functions have been bypassed. However, the
programs still
F* have code to display the message in the command line. When
the screen
F* displays are bypassed, the messages are sent to the
message queue but are
F* never displayed.
F*
F* Use this utility to get a complete message and email the
message out,
F* or send the message to the joblog.
F*
F* When emailing, use the command SYREMLC.
F********************************************************************
F* Notes:
F*
F********************************************************************
F* Modifications: *
F********************************************************************
F*
F********************************************************************
H*
H optimize(*basic) option(*expdds:*nodebugio)
h/if defined(*CRTBNDRPG)
h dftactgrp(*no) actgrp(*New)
h/else
h* dftactgrp(*NO)
h/endif
H*
F***************************************************************************
* Retrieve Message data ( QMHRTVM ) API
**************************************************************************
D* #RtvMsg...
D* PI 32766a varying
D syimsgr pi extpgm('SYIMSGR')
D pMsgId 7 const
D pMsgFlib 20 const
D pMsgRplDta 2048a const options(*varsize)
D pRplSubVal 10 const
D pFmtCtlChar 10 const
D pRtn_Message 80a
*include downloads/qcopysrc,RTVM0200Ds
* Return format for QMHRTVM api
D RTVM0200Ds DS
D rBytRtn 10i 0
D rBytAvl 10i 0
D rMsgSev 10i 0
D rAlertIndx 10i 0
D rAlertOpt 9a
D rLogInd 1a
D 2a
D rLenRplyRet 10i 0
D rLenRplyAvl 10i 0
D rLenMsgRet 10i 0
D rLenMsgAvl 10i 0
D rLenMsgHlpRet 10i 0
D rLenMsgHlpAvl 10i 0
D rMessage 4096a
D rMessageHelp 4096a
*include downloads/qcopysrc,QMHRTVM
* Receive Message QMHRTVM API
D QMHRTVM PR extpgm('QMHRTVM')
D pMsgData 32767a const options(*varsize)
D pMsgDataLen 10i 0 const
D pFormat 8a const
D pMsgId 7a const
D pMsgFileLib 20a const
D pRplData 32767a const options(*varsize)
D pRplDataLen 10i 0 const
D pRplSubVar 10a const
D pRtnCtlChar 10a const
D pErr0200 like(Errc0200Ds)
* API Error Data Structure - ERRC0200 format
d ERRC0200ds Ds inz qualified
d MsgKey 10i 0 inz(-1)
d BytesProv 10i 0 inz(%size(ERRC0200Ds.MsgData))
d BytesAval 10i 0
d MsgID 7a
d filler 1a
d cCCSID 10i 0
d OffMsgData 10i 0
d LenMsgData 10i 0
d MsgData 32767a
D LenRplDta s 10i 0 inz
D LenMsgDta s 10i 0 inz
d FmtCtlChr s 10a
d RplSubVal s 10a
/free
clear Errc0200Ds;
clear RTVM0200Ds;
Errc0200Ds.BytesProv = %size(Errc0200Ds.MsgData);
LenMsgDta = %size(RTVM0200ds);
LenRplDta = 0;
LenRplDta = %len(pMsgRplDta);
if LenRplDta > 0;
RplSubVal = '*YES';
FmtCtlChr = '*NO';
else;
RplSubVal = '*NO';
FmtCtlChr = '*NO';
Endif;
// Get message data
QMHRTVM( RTVM0200Ds : LenMsgDta :
'RTVM0200' : pMsgID :
pMsgFlib :
pMsgRplDta : LenRplDta :
RplSubVal : FmtCtlChr :
Errc0200Ds ) ;
// return RTVM0200ds;
prtn_message = %trim(rMessage);
*inlr = *on;
/end-free
P* #RtvMsg...
P* E
_
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: I need a way to retrieve messages from a message file and merge the MSGDTA values into it. , (continued)
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.