<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Accounting systems &#187; Impact Award</title>
	<atom:link href="http://accountingsystems.ie/?feed=rss2&#038;tag=impact-award" rel="self" type="application/rss+xml" />
	<link>http://accountingsystems.ie</link>
	<description>Our free tips and tricks blog for Intact accounts, Sage, Syspro, Quickbook and bits of SAP and Oracle</description>
	<lastBuildDate>Tue, 06 Jul 2010 19:48:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Exporting Signed Numerics EBCDIC</title>
		<link>http://accountingsystems.ie/?p=24</link>
		<comments>http://accountingsystems.ie/?p=24#comments</comments>
		<pubDate>Sun, 06 Jun 2010 19:41:51 +0000</pubDate>
		<dc:creator>Patrick Jones</dc:creator>
				<category><![CDATA[Syspro]]></category>
		<category><![CDATA[Impact Award]]></category>
		<category><![CDATA[Legacy Systems]]></category>

		<guid isPermaLink="false">http://accountingsystems.ie/?p=24</guid>
		<description><![CDATA[I needed a function to create an EBCDIC overpunch to numeric values in an access database when exporting the data as text files for loading into OneSource.
This function might help if you need something similar

Function EbcDic(ByVal tmpNumber As Double, ByVal tmpDec As Integer, ByVal tmpPlaces As Integer)
'--------------------------------------------------------------------------------------
'OneSource Requirement for Signed Numeric Fields
'Below is the conversion [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a function to create an EBCDIC overpunch to numeric values in an access database when exporting the data as text files for loading into OneSource.</p>
<p>This function might help if you need something similar</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Function</span> EbcDic(<span style="color: #000080;">ByVal</span> tmpNumber <span style="color: #000080;">As</span> <span style="color: #000080;">Double</span>, <span style="color: #000080;">ByVal</span> tmpDec <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>, <span style="color: #000080;">ByVal</span> tmpPlaces <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>)
<span style="color: #008000;">'--------------------------------------------------------------------------------------
</span><span style="color: #008000;">'OneSource Requirement for Signed Numeric Fields
</span><span style="color: #008000;">'Below is the conversion table of signed numeric values (right most over-punch character) to EBCIDIC:
</span><span style="color: #008000;">'(you do not need to worry about positive numbers, it is only negative numbers that need the translation)
</span>
<span style="color: #008000;">'Positive   'Negative
</span><span style="color: #008000;">'0 = {      '0 = }
</span><span style="color: #008000;">'1 = A      '1 = J
</span><span style="color: #008000;">'2 = B      '2 = K
</span><span style="color: #008000;">'3 = C      '3 = L
</span><span style="color: #008000;">'4 = D      '4 = M
</span><span style="color: #008000;">'5 = E      '5 = N
</span><span style="color: #008000;">'6 = F      '6 = O
</span><span style="color: #008000;">'7 = G      '7 = P
</span><span style="color: #008000;">'8 = H      '8 = Q
</span><span style="color: #008000;">'9 = I      '9 = R
</span><span style="color: #008000;">'
</span><span style="color: #008000;">'  (for example a -592.52 ... will be passed as 00000005925K)
</span><span style="color: #008000;">'--------------------------------------------------------------------------------------
</span>
<span style="color: #000080;">Dim</span> tmpStr, tmpTrans, tmpPos, tmpFactor
<span style="color: #000080;">Dim</span> tmpFilled
tmpFilled = <span style="color: #800000;">&quot;00000000000000&quot;</span>
&nbsp;
<span style="color: #000080;">If</span> Len(tmpNumber &amp; <span style="color: #800000;">&quot;&quot;</span>) = 0 <span style="color: #000080;">Then</span>
    EbcDic = right(tmpFilled, tmpPlaces)
    <span style="color: #000080;">Exit</span> <span style="color: #000080;">Function</span>
<span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
&nbsp;
<span style="color: #000080;">Select</span> <span style="color: #000080;">Case</span> tmpDec
<span style="color: #000080;">Case</span> 0
    tmpFactor = 1
<span style="color: #000080;">Case</span> 1
    tmpFactor = 10
<span style="color: #000080;">Case</span> 2
    tmpFactor = 100
<span style="color: #000080;">Case</span> 3
    tmpFactor = 1000
<span style="color: #000080;">Case</span> 4
    tmpFactor = 10000
<span style="color: #000080;">End</span> <span style="color: #000080;">Select</span>
&nbsp;
<span style="color: #000080;">If</span> tmpNumber &gt;= 0 <span style="color: #000080;">Then</span>
    EbcDic = right(tmpFilled &amp; Int(tmpNumber * tmpFactor), tmpPlaces)
    <span style="color: #000080;">Exit</span> <span style="color: #000080;">Function</span>
<span style="color: #000080;">Else</span>
    tmpTrans = Int((tmpNumber * tmpFactor) * -1)
    tmpPos = InStr(1, <span style="color: #800000;">&quot;0123456789&quot;</span>, right(tmpTrans, 1), 1)
&nbsp;
    tmpStr = Left(tmpTrans, (Len(tmpTrans) - 1)) &amp; right(Left(<span style="color: #800000;">&quot;}JKLMNOPQR&quot;</span>, tmpPos), 1)
   EbcDic = right(tmpFilled &amp; tmpStr, tmpPlaces)
<span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
&nbsp;
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://accountingsystems.ie/?feed=rss2&amp;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
