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

I don't pretend to know EDI because I am new to the technology, but I've
been in I/T for quite some time. I used this code in M/S Access. I hope it
will help you.
Option Compare Database
Public Function Convert(fld As Variant) As Currency
Dim strChar As String
Dim bytNum As Byte
Dim bytLen As Byte
If IsNull(fld) Then ' If the field is null then return 0
Convert = 0
Exit Function
End If
strChar = Right(fld, 1)
bytLen = Len(fld)
If Not IsNumeric(strChar) Then ' Evaluate the last character. If
it's not a number then
Select Case strChar ' find out what it's converted value
is and assign it to bytNum.
Case "}"
bytNum = 0
Case "J"
bytNum = 1
Case "K"
bytNum = 2
Case "L"
bytNum = 3
Case "M"
bytNum = 4
Case "N"
bytNum = 5
Case "O"
bytNum = 6
Case "P"
bytNum = 7
Case "Q"
bytNum = 8
Case "R"
bytNum = 9
End Select
Convert = (-(Left(fld, bytLen - 1) & bytNum)) / 100 ' Concantenate the
numeric characters with the
' bytNum variable
and divide by 100.
Else
Convert = fld / 100 ' If the last character is a number,
then divide the value by 100.
End If
End Function
Sincerely,
__________________________________________________
"Its not how much you know, but rather how fast
you learn, and how open you are to new ideas."
- Michael Dell 'Direct From Dell' page 145.
__________________________________________________
MATTHEW P. KILEY ยง
DELL COMPUTER CORPORATION
Revenue Services: http://inside.us.dell.com/finance/fg/revenue_services/
<http://inside.us.dell.com/finance/fg/revenue_services/>
Finance: CIW Team
Work: (512) 723 - 5261
-----Original Message-----
From: Art Douglas (San Dimas) [mailto:
Sent: Tuesday, January 28, 2003 2:18 PM
To:
Subject: RE: [EDI-L] <TECH> Mercator Help
Actually, the field is a signed overpunch. That means that the
representation is the hollerith card equivalent to the numeral with the
addition of a 12-row punch for positive, or an 11-row punch for negative.
If you don't know what an 11-row or 12-row is, please refer to your ancient
DP history text. If you don't know what DP is ...
So, you will need to set up a table of equivalents. A = +1, B = +2, ... I =
+9, J = -1, K = -2 etc. I can't remember if { is positive or negative zero,
but } is the opposite. Remember that the sign applies to the entire number,
but it is stored in the last character.
Maybe the better idea would be to have the MVS guys produce you a file with
the COBOL "USAGE DISPLAY" and a separate sign and explicit decimal.
Good luck.
Art Douglas
Manager, eCommerce Systems
PaperPak
San Dimas, CA
909-971-5025
"There are no victories at bargain prices."
-- Dwight D Eisenhower
-----Original Message-----
From: Rachel Foerster [mailto:
Sent: Tuesday, January 28, 2003 11:51 AM
To:
Subject: RE: [EDI-L] <TECH> Mercator Help
It's been a long time, but the numeric field could be a packed decimal.
Don't know the solution anymore - but 15 years ago we had to write small
routines to unpack the data.
Rachel Foerster
Principal
Rachel Foerster & Associates, Ltd.
Professionals in Health Care EDI
39432 North Avenue
Beach Park, IL 60099
Voice: 847-872-8070
Fax: 847-872-6860
eMail:
http://www.rfa-edi.com <http://www.rfa-edi.com>
-----Original Message-----
From: John Nadvornik [mailto:
Sent: Tuesday, January 28, 2003 12:57 PM
To:
Subject: [EDI-L] <TECH> Mercator Help
All,
I was wondering if someone could answer what I hope is a simple Mercator
Question.
I have a flat file being sent to me from a MVS environment the file
definition is in a COBOL Copy book, so I imported it into a type tree. I'm
able to map everything correctly, except for the signed fields. The record
looks like this in notepad
300 001 00000000AEA0000000000000{QT T 40707
The data between the AE and the QT should be a quantity, but I can not seem
to get it to map correctly. Does anyone have any suggestions? Please let
me know if you need more information.
Thanks,
John
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
<http://groups.yahoo.com/group/EDI-L>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
<http://docs.yahoo.com/info/terms/>
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
<http://groups.yahoo.com/group/EDI-L>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
<http://docs.yahoo.com/info/terms/>
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=244396.2846622.4218523.2848452/D=egroupweb/S=17050055
82:HM/A=1414307/R=0/*https://www.clearcredit.com/registration/default.asp?n=
b&cpID=c01888p1379&ckID=gen14628>
<http://us.adserver.yahoo.com/l?M=244396.2846622.4218523.2848452/D=egroupmai
l/S=:HM/A=1414307/rand=789664859>
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
<http://groups.yahoo.com/group/EDI-L>
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
|
 |
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|