 




<?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: How to convert RPG to a .txt file</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 18:27:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: littlepd</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/#comment-67726</link>
		<dc:creator>littlepd</dc:creator>
		<pubDate>Thu, 03 Sep 2009 15:00:57 +0000</pubDate>
		<guid isPermaLink="false">#comment-67726</guid>
		<description><![CDATA[Open WDSc. 
Add the source member to an iSeries Project.
Export the source member to your local hard drive.]]></description>
		<content:encoded><![CDATA[<p>Open WDSc.<br />
Add the source member to an iSeries Project.<br />
Export the source member to your local hard drive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: danthedane</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/#comment-67678</link>
		<dc:creator>danthedane</dc:creator>
		<pubDate>Wed, 02 Sep 2009 14:36:42 +0000</pubDate>
		<guid isPermaLink="false">#comment-67678</guid>
		<description><![CDATA[I think WilsonAlano&#039;s solution is fine (see above).  I use this cmd (option &#039;SF&#039; for StreamFile) in PDM (slightly different to Wilson&#039;s):
&lt;pre&gt;
CPYTOSTMF FROMMBR(&#039;/qsys.lib/&amp;l.lib/&amp;f.file/&amp;n.mbr&#039;)
          TOSTMF(&#039;/temp/&amp;n.&amp;s&#039;)                     
          CVTDTA(*NONE)                             
          STMFCCSID(*PCASCII)                       
          ENDLINFMT(*CR)                            
&lt;/pre&gt;

With this option &#039;ST&#039; in my PDM + cmd13 (dup option) I moved 500+ sourcemembers to the IFS in a split of a second.

Sample codestring that was executed from my &#039;SF&#039;-option:
&lt;pre&gt;
CPYTOSTMF FROMMBR(&#039;/qsys.lib/mylib.lib/QALLSRC.file/A_1.mbr&#039;)
          TOSTMF(&#039;/temp/A_1.txt&#039;)
          CVTDTA(*NONE)
          STMFCCSID(*PCASCII)
          ENDLINFMT(*CR)
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>I think WilsonAlano&#8217;s solution is fine (see above).  I use this cmd (option &#8216;SF&#8217; for StreamFile) in PDM (slightly different to Wilson&#8217;s):</p>
<pre>
CPYTOSTMF FROMMBR('/qsys.lib/&amp;l.lib/&amp;f.file/&amp;n.mbr')
          TOSTMF('/temp/&amp;n.&amp;s')                     
          CVTDTA(*NONE)                             
          STMFCCSID(*PCASCII)                       
          ENDLINFMT(*CR)                            
</pre>
<p>With this option &#8216;ST&#8217; in my PDM + cmd13 (dup option) I moved 500+ sourcemembers to the IFS in a split of a second.</p>
<p>Sample codestring that was executed from my &#8216;SF&#8217;-option:</p>
<pre>
CPYTOSTMF FROMMBR('/qsys.lib/mylib.lib/QALLSRC.file/A_1.mbr')
          TOSTMF('/temp/A_1.txt')
          CVTDTA(*NONE)
          STMFCCSID(*PCASCII)
          ENDLINFMT(*CR)
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdraebel</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/#comment-67670</link>
		<dc:creator>pdraebel</dc:creator>
		<pubDate>Wed, 02 Sep 2009 08:08:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-67670</guid>
		<description><![CDATA[I once stumbled upon a PC BAT file called GETALLSRC. It uses FTP from PC to get source files from your iSeries.

@ECHO OFF
IF %1.==. GOTO problem
IF %2.==. GOTO problem
IF %3.==. GOTO problem
IF %4.==. GOTO problem
IF %5.==. GOTO problem
cls
ping %3 -n 2 &#124; find /i &quot;reply&quot; &gt;nul &amp;&amp; goto getfils
echo System does not exist on the network! &amp; goto End
:getfils
cls
F:
cd 
cd sources
md %3
cd %3
md %4
cd %4
md %5
cd %5
rename *.txt *.MBR
ECHO open %3 &gt;FTPSRC.TXT
ECHO user %1 &gt;&gt;FTPSRC.TXT
ECHO %2 &gt;&gt;FTPSRC.TXT
ECHO ascii &gt;&gt;FTPSRC.TXT
ECHO PROMPT &gt;&gt;FTPSRC.TXT
ECHO QUOTE SITE NAMEFMT 1 &gt;&gt;FTPSRC.TXT
ECHO MGET /QSYS.LIB/%4.LIB/%5.FILE/*.MBR &gt;&gt;FTPSRC.TXT
ECHO quit &gt;&gt;FTPSRC.TXT
ftp -n -s:FTPSRC.TXT
DEL FTPSRC.TXT
rename *.MBR *.txt
GOTO END
:problem
cls
ECHO -----------------------------------------------------
ECHO Type in : GETALLSRC USER PASSWORD SYSTEM LIBRARY FILE
ECHO -----------------------------------------------------
ECHO USER = user profile to use for FTP
ECHO PASSWORD = password for user profile to use for FTP
ECHO SYSTEM = name of the system you wish to FTP from
ECHO LIBRARY = name of the library you wish to FTP from
ECHO FILE = name of the file you wish to FTP from
:END]]></description>
		<content:encoded><![CDATA[<p>I once stumbled upon a PC BAT file called GETALLSRC. It uses FTP from PC to get source files from your iSeries.</p>
<p>@ECHO OFF<br />
IF %1.==. GOTO problem<br />
IF %2.==. GOTO problem<br />
IF %3.==. GOTO problem<br />
IF %4.==. GOTO problem<br />
IF %5.==. GOTO problem<br />
cls<br />
ping %3 -n 2 | find /i &#8220;reply&#8221; &gt;nul &amp;&amp; goto getfils<br />
echo System does not exist on the network! &amp; goto End<br />
:getfils<br />
cls<br />
F:<br />
cd<br />
cd sources<br />
md %3<br />
cd %3<br />
md %4<br />
cd %4<br />
md %5<br />
cd %5<br />
rename *.txt *.MBR<br />
ECHO open %3 &gt;FTPSRC.TXT<br />
ECHO user %1 &gt;&gt;FTPSRC.TXT<br />
ECHO %2 &gt;&gt;FTPSRC.TXT<br />
ECHO ascii &gt;&gt;FTPSRC.TXT<br />
ECHO PROMPT &gt;&gt;FTPSRC.TXT<br />
ECHO QUOTE SITE NAMEFMT 1 &gt;&gt;FTPSRC.TXT<br />
ECHO MGET /QSYS.LIB/%4.LIB/%5.FILE/*.MBR &gt;&gt;FTPSRC.TXT<br />
ECHO quit &gt;&gt;FTPSRC.TXT<br />
ftp -n -s:FTPSRC.TXT<br />
DEL FTPSRC.TXT<br />
rename *.MBR *.txt<br />
GOTO END<br />
:problem<br />
cls<br />
ECHO &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
ECHO Type in : GETALLSRC USER PASSWORD SYSTEM LIBRARY FILE<br />
ECHO &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
ECHO USER = user profile to use for FTP<br />
ECHO PASSWORD = password for user profile to use for FTP<br />
ECHO SYSTEM = name of the system you wish to FTP from<br />
ECHO LIBRARY = name of the library you wish to FTP from<br />
ECHO FILE = name of the file you wish to FTP from<br />
:END</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wilsonalano</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/#comment-67658</link>
		<dc:creator>wilsonalano</dc:creator>
		<pubDate>Tue, 01 Sep 2009 18:31:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-67658</guid>
		<description><![CDATA[Hi,

We created an PDM option to that for us:

   Option  . . . . . . . . :   ST                                               
                                                                                
   Command . . . . . . . . :   CPYTOSTMF FROMMBR(&#039;/qsys.lib/&amp;l.lib/&amp;f.file/&amp;n.mb
r&#039;) TOSTMF(&#039;/tmp/&amp;n.&amp;t&#039;) STMFOPT(*REPLACE) STMFCODPAG(*PCASCII) ENDLINFMT(*CRLF)

And just use ST on each source to convert. 

Wilson]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>We created an PDM option to that for us:</p>
<p>   Option  . . . . . . . . :   ST                                               </p>
<p>   Command . . . . . . . . :   CPYTOSTMF FROMMBR(&#8216;/qsys.lib/&amp;l.lib/&amp;f.file/&amp;n.mb<br />
r&#8217;) TOSTMF(&#8216;/tmp/&amp;n.&amp;t&#8217;) STMFOPT(*REPLACE) STMFCODPAG(*PCASCII) ENDLINFMT(*CRLF)</p>
<p>And just use ST on each source to convert. </p>
<p>Wilson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hafwhit</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/#comment-67653</link>
		<dc:creator>hafwhit</dc:creator>
		<pubDate>Tue, 01 Sep 2009 17:35:21 +0000</pubDate>
		<guid isPermaLink="false">#comment-67653</guid>
		<description><![CDATA[You could ftp the source members from the system to the your PC.  You don&#039;t have to do any special program and you can name the source member with an extension of txt.]]></description>
		<content:encoded><![CDATA[<p>You could ftp the source members from the system to the your PC.  You don&#8217;t have to do any special program and you can name the source member with an extension of txt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sloopy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/#comment-67638</link>
		<dc:creator>sloopy</dc:creator>
		<pubDate>Tue, 01 Sep 2009 13:57:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-67638</guid>
		<description><![CDATA[You can create a CL program to read the member list for the source file. FOr each member name, use either the CPYTOPCD command - which will create a copy of the source member&#039;s DATA field as a PC TEXT document in a subfolder under QDLS, or the CPYTOSTMF command, which will create a very similar file in ANY folder in the IFS.

For example, the two commands below show how to create a TEXT file for a source member using both commands:

CPYTOPCD FROMFILE(TGSMSRCTRI/QRPGLESRC) TOFLR(BLECMD) FROMMBR(WIRCSVF)

- creates a file called WIRCSVF in ASCII TEXT format in folder QDLS/BLECMD

CPYTOSTMF FROMMBR(&#039;QSYS.LIB/TGSMSRCTRI.LIB/QRPGLESRC.FILE/WIRCSVF.MBR&#039;) TOSTMF(&#039;/blecmd/wircsvf.txt&#039;) STMFOPT(*REPLACE) STMFCODPAG(*STDASCII)

- creates a file called WIRCSVF.TXT in Standard ASCII TEXT format in IFS folder (root/) BLECMD.

Note that if you use some special characters in your source (such as dollar or pound-sterling signs), these might not translate the way you expect.

The resulting files will NOT contain the SRCDAT and SRCSEQ fields - only the SRCDTA field from the source member.

Regards,

Sloopy]]></description>
		<content:encoded><![CDATA[<p>You can create a CL program to read the member list for the source file. FOr each member name, use either the CPYTOPCD command &#8211; which will create a copy of the source member&#8217;s DATA field as a PC TEXT document in a subfolder under QDLS, or the CPYTOSTMF command, which will create a very similar file in ANY folder in the IFS.</p>
<p>For example, the two commands below show how to create a TEXT file for a source member using both commands:</p>
<p>CPYTOPCD FROMFILE(TGSMSRCTRI/QRPGLESRC) TOFLR(BLECMD) FROMMBR(WIRCSVF)</p>
<p>- creates a file called WIRCSVF in ASCII TEXT format in folder QDLS/BLECMD</p>
<p>CPYTOSTMF FROMMBR(&#8216;QSYS.LIB/TGSMSRCTRI.LIB/QRPGLESRC.FILE/WIRCSVF.MBR&#8217;) TOSTMF(&#8216;/blecmd/wircsvf.txt&#8217;) STMFOPT(*REPLACE) STMFCODPAG(*STDASCII)</p>
<p>- creates a file called WIRCSVF.TXT in Standard ASCII TEXT format in IFS folder (root/) BLECMD.</p>
<p>Note that if you use some special characters in your source (such as dollar or pound-sterling signs), these might not translate the way you expect.</p>
<p>The resulting files will NOT contain the SRCDAT and SRCSEQ fields &#8211; only the SRCDTA field from the source member.</p>
<p>Regards,</p>
<p>Sloopy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cwc</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/#comment-67635</link>
		<dc:creator>cwc</dc:creator>
		<pubDate>Tue, 01 Sep 2009 13:31:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-67635</guid>
		<description><![CDATA[You could download each source member to a text file via the iSeries Access file transfer function, or you could copy the source file member to an ASCII text file in the IFS via the CPYTOIMPF command.  If you use CPYTOIMPF, it would be easier to automate in a CL program.]]></description>
		<content:encoded><![CDATA[<p>You could download each source member to a text file via the iSeries Access file transfer function, or you could copy the source file member to an ASCII text file in the IFS via the CPYTOIMPF command.  If you use CPYTOIMPF, it would be easier to automate in a CL program.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe94553</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-convert-rpg-to-a-txt-file/#comment-67623</link>
		<dc:creator>joe94553</dc:creator>
		<pubDate>Tue, 01 Sep 2009 02:02:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-67623</guid>
		<description><![CDATA[I am familiar with your solution - but it’s not the one I was looking for – the .TXT should only contain source records – not records that contain page headers/footers 

I want to loop through a source file and for each member get a .TXT member created on my PC in a pre-defined path.  If there was some way I could use the API that Client Access uses to “Receive file from Host”

The solution I seek is only temporary – so any 3rd party utility with a free trial would work for me]]></description>
		<content:encoded><![CDATA[<p>I am familiar with your solution &#8211; but it’s not the one I was looking for – the .TXT should only contain source records – not records that contain page headers/footers </p>
<p>I want to loop through a source file and for each member get a .TXT member created on my PC in a pre-defined path.  If there was some way I could use the API that Client Access uses to “Receive file from Host”</p>
<p>The solution I seek is only temporary – so any 3rd party utility with a free trial would work for me</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/8 queries in 0.034 seconds using memcached
Object Caching 367/368 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 20:48:55 -->