Here is what I wrote Brian...

        Now I use Sterling's Gentran so if this doesn't work I apologize.
That said, this should definitely work.  I would use a ntoa function or
whatever Harbinger calls it to cast your final dollar amount into a string.
Then just begin a loop that examines the length of the field.  As long as it
is less than whatever length you desire set it equal to "0" + SAC05.  If you
need a better explanation please email or call.

Sean Hayes

(507)453-8030

Now, like I said I don't use Harbinger, are you guys telling me you can't
cast from one data type to another in Harbinger?  All this below seems like
a fantastic overkill.  I applaud the ingenuity but is it really necessary?
I'd be interested to know because in Gentran it is really easy.


-----Original Message-----
From: Mojica William-FWM008 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 7:56 AM
To: [EMAIL PROTECTED]
Subject: Re: Mapping Challenge


Brian:

        I will try this. take the AMT and Join it with 00000 when you move
it to the field it maybe too long, and it should drop the unnecessary 0s, to
get the decimal point, try playing with different combinations of data type
on your target layout, if that does not work you may want to:
1.- Multiply AMT *.01 (2512 * .01 = 25.12)
2.- then join it with the 0s
3.- then move it to your application.

that is the best I can think of, hope that works, it has worked for me when
I am going from app-2-X12, it should work the other way around as well.

WDM

-----Original Message-----
From: Test, Brian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 17, 2001 7:47 AM
To: [EMAIL PROTECTED]
Subject: Mapping Challenge


Hi All,

Once again I need to draw upon your expertise.  I need your help with
regards to taking an amount field in the SAC segment (856 document), and
having it be formatted in such a way that it satisfies our applications
format requirement.  My translator is a Harbinger 4.1/Unix version.

This is what should be sent to us on the SAC segment:

If freight charge is $25.12 the segment will look like:
SAC*C*D240***2512

If freight charge is $25.00 the segment will look like:
SAC*C*D240***2500

My application record should have the translated field look like 00025.12
(leading zeros are required)

My problem is that when I do a translation, I can not get the leading zeros,
since the translator justifies to the left.  Any suggestions?

Thanks again,
Brian Test
E-Commerce Analyst
ACCO North America
300 Tower Parkway
Lincolnshire, IL 60069-3640
(800) 222-6462 x3973
(847) 419-4146 FAX
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

"WorldSecure" made the following
 annotations on 04/17/01 06:43:21
----------------------------------------------------------------------------
--

[INFO] -- Virus Manager:
This message was scanned with Network Associates Viper,
and no viruses were detected.

============================================================================
==

=======================================================================
To contact the list owner:  mailto:[EMAIL PROTECTED]
Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/

=======================================================================
To contact the list owner:  mailto:[EMAIL PROTECTED]
Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/

=======================================================================
To contact the list owner:  mailto:[EMAIL PROTECTED]
Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/

Reply via email to