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



Anupam,

You may not have considered that you already have Net.data which comes
with an email feature using a single built-in function named
DTW_SENDMAIL.
The only Net.data you need to know is how to enter a single one-line
statement into a source file.
The trick is that you need a little CLP that allows you to pass
parameters to and execute the source file.

Here's one I coded earlier -

/*'---------------------------------------------------------------------
- +
'
+
'This program accepts the parameters necessary to send an email
+
'using the Net.Data email function available on every iSeries.
+
'There are 2 pre-requisites.
+
'
+
'1.
+
'A pre-requisite is that the source file QGPL/INI exists with a member
+
'named DB2WWW. The member need contain only a single source line which
+
'Net.Data uses to identify the network address of the SMTP server that
+
'will be used. The source line should be coded as follows -
+
'
+
'DTW_SMTP_SERVER ex0001.corp.acme
+
'
+
'2.
+
'The source file QGPL/INI should contain another member named DTWEMAIL
+
'that contains a single source line which sends the email as follows -
+
'
+
'@dtw_sendmail(sender,recipient,message,subject,carboncopy,
+
'blindcopy,replyto,organization,attachlist,attachconvlist,mimetype)
+
'
+

'----------------------------------------------------------------------
*/

PGM PARM(&SENDER +
&RECIPIENT +
&MESSAGE +
&SUBJECT +
&CARBONCOPY +
&BLINDCOPY +
&REPLYTO +
&SENDERSORG +
&ATTACHMENT +
&CONVLIST +
&MIMETYPE)

DCL VAR(&SENDER) TYPE(*CHAR) LEN(50)
DCL VAR(&RECIPIENT) TYPE(*CHAR) LEN(3000)
DCL VAR(&MESSAGE) TYPE(*CHAR) LEN(3000)
DCL VAR(&SUBJECT) TYPE(*CHAR) LEN(50)
DCL VAR(&CARBONCOPY) TYPE(*CHAR) LEN(3000)
DCL VAR(&BLINDCOPY) TYPE(*CHAR) LEN(3000)
DCL VAR(&REPLYTO) TYPE(*CHAR) LEN(50)
DCL VAR(&SENDERSORG) TYPE(*CHAR) LEN(50)
DCL VAR(&ATTACHMENT) TYPE(*CHAR) LEN(3000)
DCL VAR(&CONVLIST) TYPE(*CHAR) LEN(100)
DCL VAR(&MIMETYPE) TYPE(*CHAR) LEN(5)
DCL VAR(&ENV) TYPE(*CHAR) LEN(16000)
DCL VAR(&CURDIR) TYPE(*CHAR) LEN(9999)
DCL VAR(&DIRLEN) TYPE(*DEC) LEN(7)
DCL VAR(&INIDIR) TYPE(*CHAR) LEN(30) +
VALUE('/QSYS.LIB/QGPL.LIB')

/*'Load parameters into QUERY_STRING */
CHGVAR &ENV ('sender=' *CAT &SENDER *TCAT +
'&recipient=' *CAT &RECIPIENT *TCAT +
'&message=' *CAT &MESSAGE *TCAT +
'&subject=' *CAT &SUBJECT *TCAT +
'&carboncopy=' *CAT &CARBONCOPY *TCAT +
'&blindcopy=' *CAT &BLINDCOPY *TCAT +
'&replyto=' *CAT &REPLYTO *TCAT +
'&organization=' *CAT &SENDERSORG *TCAT +
'&attachlist=' *CAT &ATTACHMENT *TCAT +
'&attachconvlist=' *CAT &CONVLIST *TCAT +
'&mimetype=' *CAT &MIMETYPE)
ADDENVVAR ENVVAR(QUERY_STRING) VALUE(&ENV) REPLACE(*YES)

/*'Load the path to the Net.Data email script */
CHGVAR &ENV VALUE(&INIDIR *TCAT '/INI.FILE/DTWEMAIL.MBR/MACRO')
ADDENVVAR ENVVAR(PATH_INFO) VALUE(&ENV) REPLACE(*YES)

/*'Retrieve the current directory */
RTVCURDIR RTNDIR(&CURDIR) DIRNAMLEN(&DIRLEN)

/*'Change to the directory where the INI file is located */
CHGCURDIR DIR(&INIDIR)

/*'Run Net.data */
CALL QHTTPSVR/DB2WWW

/*'Restore the current directory */
CHGCURDIR DIR(&CURDIR)

ENDPGM

Ce volia,
Peter


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
anupam.sinha@xxxxxxxxxxxxxxxxxxxxxxx
Sent: Wednesday, 4 March 2009 8:44 p.m.
To: rpg400-l@xxxxxxxxxxxx
Subject: Sending STMF through SNDDDST

Hi All,

Is there any way to send a stream file (STMF) through SNDDST command? I
need to send an email with this stream file as attachment.


Kind Regards

Anupam Sinha

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.