 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Emailing spool files from as/400</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/emailing-spool-files-from-as400/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/emailing-spool-files-from-as400/</link>
	<description></description>
	<lastBuildDate>Thu, 23 May 2013 10:04:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: kaisersosa</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/emailing-spool-files-from-as400/#comment-89173</link>
		<dc:creator>kaisersosa</dc:creator>
		<pubDate>Wed, 09 Mar 2011 20:22:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-89173</guid>
		<description><![CDATA[We used SNDEMAIL where i used to work.  It worked great.
To find it search for an article by David Leland from &quot;iSeriesNetwork&quot; circa September? 1998?  I&#039;m reaching way back into my 256k ram. &lt;g&gt;
I had the command wrapped by a service program function for easy use from an rpg program.

We have ESEND at my current job so that&#039;s the preferred method here.
(Wrapped also :--)

John B]]></description>
		<content:encoded><![CDATA[<p>We used SNDEMAIL where i used to work.  It worked great.<br />
To find it search for an article by David Leland from &#8220;iSeriesNetwork&#8221; circa September? 1998?  I&#8217;m reaching way back into my 256k ram. &lt;g&gt;<br />
I had the command wrapped by a service program function for easy use from an rpg program.</p>
<p>We have ESEND at my current job so that&#8217;s the preferred method here.<br />
(Wrapped also :&#8211;)</p>
<p>John B</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/emailing-spool-files-from-as400/#comment-89140</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Wed, 09 Mar 2011 04:11:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-89140</guid>
		<description><![CDATA[&lt;i&gt;isn’t it a way to do it in rpg4 instead of clp?&lt;/i&gt;

Since all of the code is available with the article, you can simply run the same instructions in RPG as shown for CL.

But there are some technical elements that might need to be clear if deeper understanding is required.

First, spooled files can&#039;t be e-mailed at all. Not in CL and not in RPG, nor any other language. What can be e-mailed is a copy of the text data that you can read from spooled files. Spooled files have internal structures that are intended for print writers.

You can use the CPYSPLF command to copy data from a spooled file into a physical file. Once in a physical file, you can handle the data any way you wish in RPG.

If you prefer not using a CL command at all, you can use &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/print1b.htm&quot;&gt;Spooled File APIs&lt;/a&gt; in RPG to read the text data from the spooled file. Once you have formatted the e-mail the way you want it and appropriate for SMTP requirements, you can call the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzair%2Frzairsendmime.htm&quot;&gt;QtmmSendMail API&lt;/a&gt; to send it.

Or you could use the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzahz%2Fcatsplf.htm&quot;&gt;catsplf - Concatenate and print spool files&lt;/a&gt; QShell utility to copy the text into a streamfile. You&#039;ll probably want to run the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzahz%2Ftouch.htm&quot;&gt;touch - Change file access and modification times&lt;/a&gt; QShell utility first to set an appropriate ASCII CCSID first. Then you can call the QtmmSendMail API.

Part of the overall problem is that spooled files are essentially never sent from a Windows, Linux or other similar system. Pretty much no one would consider doing that, mostly because accessing them is too difficult and spooled files are not compatible with SMTP e-mail. Instead, they&#039;d send the original document, or they&#039;d create a new document in .PDF or other format and send that. Trying to send a Windows spooled file is far more complex than what you&#039;re asking for. Yet, even the few steps mentioned here, or shown in the above article, can seem to be too much.

Nevertheless, QShell is &quot;free&quot; and the QtmmSendMail API is &quot;free&quot; if you have the system. Both can be accessed from RPG if that&#039;s how you need to do it.

Others have done it and have made code or utilities available. For example, you might review &lt;a href=&quot;http://www.easy400.net/mmail/start&quot;&gt;iSeries MIME &amp; Mail&lt;/a&gt; from Giovanni B. Perotti or &lt;a href=&quot;http://mowyourlawn.com/RPGMail.html&quot;&gt;RPGMail&lt;/a&gt; from Aaron Bartell. There are others as well. In each case, you download, install and configure, and then learn how to cal and use the procedures. I&#039;m not sure any of them are seriously less difficult than using the system&#039;s built-in functions, but a lot of people find them easy enough. 

Tom]]></description>
		<content:encoded><![CDATA[<p><i>isn’t it a way to do it in rpg4 instead of clp?</i></p>
<p>Since all of the code is available with the article, you can simply run the same instructions in RPG as shown for CL.</p>
<p>But there are some technical elements that might need to be clear if deeper understanding is required.</p>
<p>First, spooled files can&#8217;t be e-mailed at all. Not in CL and not in RPG, nor any other language. What can be e-mailed is a copy of the text data that you can read from spooled files. Spooled files have internal structures that are intended for print writers.</p>
<p>You can use the CPYSPLF command to copy data from a spooled file into a physical file. Once in a physical file, you can handle the data any way you wish in RPG.</p>
<p>If you prefer not using a CL command at all, you can use <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/print1b.htm">Spooled File APIs</a> in RPG to read the text data from the spooled file. Once you have formatted the e-mail the way you want it and appropriate for SMTP requirements, you can call the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzair%2Frzairsendmime.htm">QtmmSendMail API</a> to send it.</p>
<p>Or you could use the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzahz%2Fcatsplf.htm">catsplf &#8211; Concatenate and print spool files</a> QShell utility to copy the text into a streamfile. You&#8217;ll probably want to run the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzahz%2Ftouch.htm">touch &#8211; Change file access and modification times</a> QShell utility first to set an appropriate ASCII CCSID first. Then you can call the QtmmSendMail API.</p>
<p>Part of the overall problem is that spooled files are essentially never sent from a Windows, Linux or other similar system. Pretty much no one would consider doing that, mostly because accessing them is too difficult and spooled files are not compatible with SMTP e-mail. Instead, they&#8217;d send the original document, or they&#8217;d create a new document in .PDF or other format and send that. Trying to send a Windows spooled file is far more complex than what you&#8217;re asking for. Yet, even the few steps mentioned here, or shown in the above article, can seem to be too much.</p>
<p>Nevertheless, QShell is &#8220;free&#8221; and the QtmmSendMail API is &#8220;free&#8221; if you have the system. Both can be accessed from RPG if that&#8217;s how you need to do it.</p>
<p>Others have done it and have made code or utilities available. For example, you might review <a href="http://www.easy400.net/mmail/start">iSeries MIME &amp; Mail</a> from Giovanni B. Perotti or <a href="http://mowyourlawn.com/RPGMail.html">RPGMail</a> from Aaron Bartell. There are others as well. In each case, you download, install and configure, and then learn how to cal and use the procedures. I&#8217;m not sure any of them are seriously less difficult than using the system&#8217;s built-in functions, but a lot of people find them easy enough. </p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keo</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/emailing-spool-files-from-as400/#comment-89096</link>
		<dc:creator>keo</dc:creator>
		<pubDate>Tue, 08 Mar 2011 09:38:53 +0000</pubDate>
		<guid isPermaLink="false">#comment-89096</guid>
		<description><![CDATA[and i mean in a free form]]></description>
		<content:encoded><![CDATA[<p>and i mean in a free form</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keo</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/emailing-spool-files-from-as400/#comment-89095</link>
		<dc:creator>keo</dc:creator>
		<pubDate>Tue, 08 Mar 2011 09:37:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-89095</guid>
		<description><![CDATA[isn&#039;t it a way to do it in rpg4 instead of clp?]]></description>
		<content:encoded><![CDATA[<p>isn&#8217;t it a way to do it in rpg4 instead of clp?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.035 seconds using memcached
Object Caching 309/315 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-23 10:04:50 -->