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



it should work.  Check the length of each fields define in PR match the length 
of the parm fields of the program.

AFAIK, if caller pass the correct length, const keyword has no effect.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of RPower@xxxxxxxxxx
Sent: Tuesday, January 18, 2005 7:42 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Error code on extpgm?


I removed the const on the E_Errcde field.  But I still don't get back a 
value though.

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
Tel: 709-576-8132
Email: rpower@xxxxxxxxxx
Website: http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. - 
Sir Winston Churchill




RPower@xxxxxxxxxx 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
18/01/2005 09:34 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Error code on extpgm?






Since I'm still a little new at this procedures stuff.  What is the 
correct way to get say an error code value to be returned?  Here's my 
current definition:

I was using this api this way:
     c*                  Call      'SENDEMAIL'      Jan 11, 2005 R.Power
     c*                  Parm      UserId        Email_Code      Jan 11, 
2005 R.Power
     c*                  Parm      *Blanks       From      Jan 11, 2005 
R.Power
     c*                  Parm                    Filename      Jan 11, 
2005 R.Power
     c*                  Parm                    Subject      Jan 11, 2005 

R.Power
     c*                  Parm                    Errcde      Jan 11, 2005 
R.Power 

hence, I'd check errcde for a value.  Now that I've decided to make it a 
procedure, here's what I have:

     D*--------------------------------------------------
     D* Procedure name: Send_Email
     D* Purpose:        Send email to user
     D* Returns:
     D* Parameter:      Email_Code
     D* Parameter:      MsgLen
     D* Parameter:      MsgType
     D* Parameter:      MsgWrkStn
     D* Parameter:      MsgWrk#
     D* Parameter:      MsgMsgQ
     D* Parameter:      MsgError
     D*--------------------------------------------------
     D Send_Email      PR                  EXTPGM('SENDEMAIL')      Jan 
18, 2005 R.Power
     D  E_Code                       10A   Const      Jan 18, 2005 R.Power
     D  E_From                       50A   Const      Jan 18, 2005 R.Power
     D  E_Filename                  100A   Const      Jan 18, 2005 R.Power
     D  E_Subject                    50A   Const      Jan 18, 2005 R.Power
     D  E_Errcde                      3A   Const      Jan 18, 2005 R.Power 



     ?* Use api to send email with attachment to user profile running 
software
     c                   CallP 
Send_Email(UserId:*Blanks:Filename:Subject:  Jan 18, 2005 R.Power
     c                             Errcde)      Jan 18, 2005 R.Power

Can I still check Errcde for the value returned or do I have to setup 
something different because of the way it's passed back and forth?

Thanks,

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
Tel: 709-576-8132
Email: rpower@xxxxxxxxxx
Website: http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. - 
Sir Winston Churchill
-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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-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.