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



Thanks Richard,

I'll go and play around with your example.

Thanks again, Arco Simonse 

> -----Oorspronkelijk bericht-----
> Van: rpg400-l-bounces@xxxxxxxxxxxx 
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Namens Richard ECUYER
> Verzonden: maandag 20 juni 2005 10:38
> Aan: RPG programming on the AS400 / iSeries
> Onderwerp: Re: formatting message content
> 
> here it is :
> One CL to change msgQ
> One procedure to receive message
> One main PGM to make decision for recevied messages.
> These pgm are old, so do not tke care about the style.
> I think that it will give you the basic idea.
> 
> Hope this help.
> For the pdf, lines preceded by a comma are in /copy.
> 
> 
> PGM
> MONMSG     MSGID(CPF0000)
> CHGMSGQ    MSGQ(*USRPRF) DLVRY(*BREAK) PGM(*LIBL/£_RCVMSG)
> CHGMSGQ    MSGQ(*WRKSTN) DLVRY(*BREAK) PGM(*LIBL/£_RCVMSG)
> ENDPGM
> 
> £_RcvMSG is the pgm that will receive user messages.
> here is the procedure for RCVMSG :
> global :
> d DftAct          s             10    inz('*REMOVE   ')
> d DftFmt          s              8    inz('RCVM0100')
> d DftTyp          s             10    inz('*ANY      ')
> d DftKey          s              4    inz('    ')
> d DftWait         s             10u 0 inz(0)
> d DftLib          s             10    inz('*LIBL     ')
>  *
> d WAct            s             10
> d WKey            s              4
> d WLib            s             10
>  *
> D ApiError        ds                  Export
> D   Bytesavail                  10u 0 inz(%size(ApiError))
> D   Bytesused                   10u 0
> D   ExcptId                      7
> D   ExcptId2                     1
> D   ExcptDta                   256
> 
> P RcvMsg          B                   Export
> D                 PI          1024    Varying
> d  QName                        10    Value
> d  MsgKey                        4    Value Options(*nopass)
> d  MsgAct                       10    Value Options(*nopass)
> d  QLib                         10    Value Options(*nopass)
>  *
> c                   If        %parms<2
> <---1---------+
> c                   Eval      WKey = DftKey
> |
> c
>                        -X
> c                   Eval      WKey = MsgKey
> |
> c                   Endif
> <---1---------+
>  *
> c                   If        %parms<3
> <---1---------+
> c                             or MsgAct=' '
> |
> c                   Eval      WAct = DftAct
> |
> c
>                        -X
> c                   Eval      Wact = MsgAct
> |
> c                   Endif
> <---1---------+
>  *
> c                   If        %parms<4
> <---1---------+
> c                   Eval      WLib = DfTLib
> |
> c
>                        -X
> c                   Eval      Wlib = QLib
> c                   Endif
> <---1--------
>  *
> c                   Eval      QualName = QName + Wlib
>  *
> c                   Callp     QMHRCVM(
> c                                RcvTxt :
> c                                RcvLen :
> c                                DftFmt :
> c                                QualName :
> c                                DftTyp :
> c                                WKey   :
> c                                DftWait :
> c                                Wact   :
> c                                ApiError)
>  *
> c                   Return     RcvTxt
>  *
> P                 E
> 
> 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.