|
[EDI-L Mailing List Archive Home]
[Message List]
[Reply To This Message]
RE: <TECH> Mercator Help

Below is a VBA function that I wrote to provide proper visual representation
of this kind of data on a form without actually touching said data.
Just in case anyone has a use for it or it helps to explain the issue.
Function NoSign(Ctrl As String)
Dim Cha, Sign, ChaVal As String
Cha = Right(Ctrl, 1)
If Cha = "{" Then
Sign = "+"
ChaVal = 0
ElseIf Cha = "}" Then
Sign = "-"
ChaVal = 0
ElseIf Asc(Cha) >= 65 And Asc(Cha) <= 73 Then
Sign = "+"
ChaVal = Asc(Cha) - 64
ElseIf Asc(Cha) >= 74 And Asc(Cha) <= 82 Then
Sign = "-"
ChaVal = Asc(Cha) - 73
End If
NoSign = Val(Sign & Left(Ctrl, Len(Ctrl) - 2)) & "." & Mid(Ctrl,
Len(Ctrl) - 1, 1) & ChaVal
End Function
Martin A. Morrison ¿¯¯)
HIPAA Project Manager
Blue Shield of California
4203 Town Center Bl., Ste. D1
El Dorado Hills, Ca 95762
Ph: (916) 350-8808 Fx: (916) 350-8623
This message (including any attachments) contains business
proprietary/confidential information intended for a specific individual
and purpose, and is protected by law. If you are not the intended
recipient, you should delete this message. Any disclosure, copying, or
distribution of this message, or the taking of any action based on it,
without the express permission of the originator, is strictly
prohibited.
-----Original Message-----
From: Tom Brandt [mailto:
Sent: Tuesday, January 28, 2003 1:23 PM
To:
Subject: Re: [EDI-L] <TECH> Mercator Help
It's not necessarily from an IBM mainframe, since "zoned overpunch"
characters are still used by COBOL compilers on many systems to represent
signed numeric DISPLAY items.
You are correct that { = +0 and } = -0.
At 04:07 PM 1/28/2003 -0500, wrote:
>John,
>
>I'll give you 10 to 1 that the data is from an IBM mainframe. In EBCDIC
>I believe the correct terminology is "Zoned Decimal" rather than packed
>decimal.
>
>Art Douglas is correct in that it began in the old punched card days. By
>"overpunching" they turned the last character into a representation of
>the numeral plus a sign. That way you can carry the sign within the
>number itself without having to resort to a separate sign (- or +) taking
>up an extra character and having to worry about whether it was a leading
>or trailing sign. When you only had 4K of memory every character
>counted!
>
>If my memory serves me correctly (which happens less frequently as time
>marches on!) the left facing brace "{" represents a positive zero and the
>right facing brace "}" is a negative zero. For example:
>
>10{ = +100
>10} = -100
>10A = +101
>10J = -101
>10I = +109
>10R = -109
>
>
>Allan Bennett
>Cincinnati, OH
--------------------------------
Tom Brandt
Northtech Systems, Inc.
130 S. 1st Street, Suite 220
Ann Arbor, MI 48104-1343
http://www.northtech.com/
To unsubscribe from this group, send an email to:
Message Identifiers: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>,
<OFF-TOPIC>
Access the list online at: http://groups.yahoo.com/group/EDI-L
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|
 |
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|