|
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.
As an Amazon Associate we earn from qualifying purchases.
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.