 




<?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: External data structure retrieve field data types</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/</link>
	<description></description>
	<lastBuildDate>Thu, 23 May 2013 20:28:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101342</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 06 Jan 2012 22:35:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-101342</guid>
		<description><![CDATA[&lt;i&gt;- put bytes into a wrkfld of the correct format
- may need formats for each field type and size&lt;/i&gt;

For those parts, consider using various APIs. Bruce Vining has provided some useful examples at &lt;a href=&quot;http://www.mcpressonline.com/programming/apis/the-api-corner-dynamically-editing-a-numeric-value.html&quot;&gt;The API Corner: Dynamically Editing a Numeric Value &lt;/a&gt; and &lt;a href=&quot;http://www.mcpressonline.com/programming/cl/the-cl-corner-more-on-ile-cee-time-apis.html&quot;&gt;The CL Corner: More on ILE CEE Time APIs&lt;/a&gt;.

Those provide an introduction to a couple useful APIs for this kind of work. The &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Fapis%2Fedit1.htm&quot;&gt;Edit Function APIs&lt;/a&gt; can also provide some help.

If you use DSPFFD, you&#039;ll have probably everything needed to know how to handle individual fields, including start-/end-positions in the input buffer and data type. (You might use the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Fapis%2Fquslfld.htm&quot;&gt;List Fields (QUSLFLD) API&lt;/a&gt; instead.)

Overall, you will have a &quot;generic&quot; process. But it will have a bunch of little parts, each of which will be a potential learning experience.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>- put bytes into a wrkfld of the correct format<br />
- may need formats for each field type and size</i></p>
<p>For those parts, consider using various APIs. Bruce Vining has provided some useful examples at <a href="http://www.mcpressonline.com/programming/apis/the-api-corner-dynamically-editing-a-numeric-value.html">The API Corner: Dynamically Editing a Numeric Value </a> and <a href="http://www.mcpressonline.com/programming/cl/the-cl-corner-more-on-ile-cee-time-apis.html">The CL Corner: More on ILE CEE Time APIs</a>.</p>
<p>Those provide an introduction to a couple useful APIs for this kind of work. The <a href="http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Fapis%2Fedit1.htm">Edit Function APIs</a> can also provide some help.</p>
<p>If you use DSPFFD, you&#8217;ll have probably everything needed to know how to handle individual fields, including start-/end-positions in the input buffer and data type. (You might use the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Fapis%2Fquslfld.htm">List Fields (QUSLFLD) API</a> instead.)</p>
<p>Overall, you will have a &#8220;generic&#8221; process. But it will have a bunch of little parts, each of which will be a potential learning experience.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mvandenbrink</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101340</link>
		<dc:creator>mvandenbrink</dc:creator>
		<pubDate>Fri, 06 Jan 2012 21:19:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-101340</guid>
		<description><![CDATA[and of course i meant neat little chunks not need little chunks ;-)]]></description>
		<content:encoded><![CDATA[<p>and of course i meant neat little chunks not need little chunks <img src='http://itknowledgeexchange.techtarget.com/itanswers/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mvandenbrink</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101339</link>
		<dc:creator>mvandenbrink</dc:creator>
		<pubDate>Fri, 06 Jan 2012 21:17:51 +0000</pubDate>
		<guid isPermaLink="false">#comment-101339</guid>
		<description><![CDATA[Phil,

That was the logic I was leaning towards .....

At the moment there&#039;s no pressure, so I can figure out a &quot;fancy&quot; solution, maybe even throw in a few api&#039;s to get the field data and retrieve it from the user space..... and of course devide them into need little chunks of coding..... 
(don&#039;t know how long this moment of relative peace lasts though, so in the end I might still go with  the cpytoimpf).]]></description>
		<content:encoded><![CDATA[<p>Phil,</p>
<p>That was the logic I was leaning towards &#8230;..</p>
<p>At the moment there&#8217;s no pressure, so I can figure out a &#8220;fancy&#8221; solution, maybe even throw in a few api&#8217;s to get the field data and retrieve it from the user space&#8230;.. and of course devide them into need little chunks of coding&#8230;..<br />
(don&#8217;t know how long this moment of relative peace lasts though, so in the end I might still go with  the cpytoimpf).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101338</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Fri, 06 Jan 2012 21:03:57 +0000</pubDate>
		<guid isPermaLink="false">#comment-101338</guid>
		<description><![CDATA[Here&#039;s my quick and dirty logic
Input field - file name
Input field - data to be decoded received as a flat record of xxxx bytes
Output field - flat field of xxxx bytes
CL runs DSPFFD to outfile
RPG reads each record from dspffd outfile -- each record is a field
- takes appropriate bytes from the input string 
- put bytes into a wrkfld of the correct format
- may need formats for each field type and size
-- extracts data as sting - pastes onto end of return sting
I&#039;m sure this can be simplified.

Personally, I would still the CPYTOIMPF to do the heavy lifting
Phil]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s my quick and dirty logic<br />
Input field &#8211; file name<br />
Input field &#8211; data to be decoded received as a flat record of xxxx bytes<br />
Output field &#8211; flat field of xxxx bytes<br />
CL runs DSPFFD to outfile<br />
RPG reads each record from dspffd outfile &#8212; each record is a field<br />
- takes appropriate bytes from the input string<br />
- put bytes into a wrkfld of the correct format<br />
- may need formats for each field type and size<br />
&#8211; extracts data as sting &#8211; pastes onto end of return sting<br />
I&#8217;m sure this can be simplified.</p>
<p>Personally, I would still the CPYTOIMPF to do the heavy lifting<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mvandenbrink</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101336</link>
		<dc:creator>mvandenbrink</dc:creator>
		<pubDate>Fri, 06 Jan 2012 19:56:28 +0000</pubDate>
		<guid isPermaLink="false">#comment-101336</guid>
		<description><![CDATA[I don&#039;t have any objections to using query sql or imp files or a combination of those.

I just thought this should also be possible by using RPG, and preferably using just a few simple statement I did not know existed.

My objective is to have a program into which I input any record (format based on any file), this program should then find (possibly with some help of pointers or a stored DSPFFD) and convert any fields with a numeric data type, and in the end return the record to my calling program as a character string.]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t have any objections to using query sql or imp files or a combination of those.</p>
<p>I just thought this should also be possible by using RPG, and preferably using just a few simple statement I did not know existed.</p>
<p>My objective is to have a program into which I input any record (format based on any file), this program should then find (possibly with some help of pointers or a stored DSPFFD) and convert any fields with a numeric data type, and in the end return the record to my calling program as a character string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101334</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Fri, 06 Jan 2012 19:02:30 +0000</pubDate>
		<guid isPermaLink="false">#comment-101334</guid>
		<description><![CDATA[Yes, I don&#039;t unserstand your objection.  
But I also don&#039;t understand your objective.
You might populate the temp file with a cpyf or an sql insert.  Since it matches the original file it&#039;s pretty simple to create it an populate it.  
Phil]]></description>
		<content:encoded><![CDATA[<p>Yes, I don&#8217;t unserstand your objection.<br />
But I also don&#8217;t understand your objective.<br />
You might populate the temp file with a cpyf or an sql insert.  Since it matches the original file it&#8217;s pretty simple to create it an populate it.<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yorkshireman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101331</link>
		<dc:creator>yorkshireman</dc:creator>
		<pubDate>Fri, 06 Jan 2012 15:12:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-101331</guid>
		<description><![CDATA[You could use one of the query tools.

build a query which selects the records you want, and define an output field as being concatenated fields from the input.  you can define a result field and convert the packed data to character within query/400 for example.]]></description>
		<content:encoded><![CDATA[<p>You could use one of the query tools.</p>
<p>build a query which selects the records you want, and define an output field as being concatenated fields from the input.  you can define a result field and convert the packed data to character within query/400 for example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mvandenbrink</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101314</link>
		<dc:creator>mvandenbrink</dc:creator>
		<pubDate>Fri, 06 Jan 2012 10:00:54 +0000</pubDate>
		<guid isPermaLink="false">#comment-101314</guid>
		<description><![CDATA[Phil, Tom,

Thanks, however working with CPYTOIMPF, requires me to make a selection of the record I want to use first, push it to a single record temp file and then copy this temp file.

Or do you know of a way to combine a copy to import file with a selection on the &quot;source&quot; file?

Martijn]]></description>
		<content:encoded><![CDATA[<p>Phil, Tom,</p>
<p>Thanks, however working with CPYTOIMPF, requires me to make a selection of the record I want to use first, push it to a single record temp file and then copy this temp file.</p>
<p>Or do you know of a way to combine a copy to import file with a selection on the &#8220;source&#8221; file?</p>
<p>Martijn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101298</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 05 Jan 2012 21:02:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-101298</guid>
		<description><![CDATA[&lt;i&gt;...a simple or generic solution...&lt;/i&gt;

Unfortunately, a simple solution is very unlikely to be generic. Nor will any generic solution be simple.

You could create a reasonably &quot;simple&quot; solution for each specific file. You might even combine all of those into a single large program that would have a reasonably simple structure.

Or you could create a &quot;generic&quot; process that handled any (externally-described) file, but I sure wouldn&#039;t call it &quot;simple&quot;.

Overall, Phil probably has the best suggestion. Just use tools that already exist. CPYTOIMPF is a very good possibility.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>&#8230;a simple or generic solution&#8230;</i></p>
<p>Unfortunately, a simple solution is very unlikely to be generic. Nor will any generic solution be simple.</p>
<p>You could create a reasonably &#8220;simple&#8221; solution for each specific file. You might even combine all of those into a single large program that would have a reasonably simple structure.</p>
<p>Or you could create a &#8220;generic&#8221; process that handled any (externally-described) file, but I sure wouldn&#8217;t call it &#8220;simple&#8221;.</p>
<p>Overall, Phil probably has the best suggestion. Just use tools that already exist. CPYTOIMPF is a very good possibility.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/external-data-structure-retrieve-field-data-types/#comment-101289</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Thu, 05 Jan 2012 17:35:53 +0000</pubDate>
		<guid isPermaLink="false">#comment-101289</guid>
		<description><![CDATA[Why RPG??? CPYTOIMPF might do it all for you.
Phil]]></description>
		<content:encoded><![CDATA[<p>Why RPG??? CPYTOIMPF might do it all for you.<br />
Phil</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.033 seconds using memcached
Object Caching 397/403 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-23 20:42:39 -->