Try adding the VALUE keyword to the parameter definition.

        D  ErrorMsg                    510A   VALUE

Rick


 -----Original Message-----
From:   Justin Houchin [mailto:justin@reliatek.com] 
Sent:   Wednesday, January 15, 2003 7:14 AM
To:     rpg400-l@midrange.com
Subject:        Error message procedure program

HI everyone,

            I am having a problem passing an error message in to a
procedure. Here is the code:

 

PC0901CLMS is a CL program that excepts a 510A error message and sends it to
the user that is 

currently signed on.

 

D #Error          PR                  ExtPgm('PC0901CLMS')

D  ErrorMsg                    510A

 

 

The call..

#Error('Test'); 

 

If I do it this way I get an error message on compile that "Parameter 1 is
not valid as a 

parameter passed by reference".

 

I want to do it the way above so that I can insert whatever text I want to
without having to create a definition like

 

D ErrorMsg1            S              510   Inz('This is a test message')

 

Is this possible?

 

Justin Houchin

Programmer and Web Developer

www.reliatek.com

justin@reliatek.com

 

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

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.