|
I am helping a client setup some automated downloads using runrmtcmd and CA/400.
We've got the auto part down pretty good, but we are having a data translation
problem.
The source file has a couple dates stored as numbers not as dates and we want to
get yesterday's transactions so... using the
Define Results in query we do the following
Define Result Fields
Field Expression COMMENT
SHIPDATE digits(04251999) # Number to CHAR
SHIPDATEMM substr(shipdate, 1, 2) # Get Month
SHIPDATEDD substr(shipdate, 3, 2) # Get Year
SHIPDATEYY substr(shipdate, 5, 4) # Get Year
SHIPDATECH shipdatemm || '/' || shipdatedd # Build Char field that is a
date
|| '/' || shipdateyy
Plus some more stuff
Now if we use CA/400 to download SHIPDATECH or a couple other fields built using
the method for SHIPDATECH CA wants to call them "HEX" and when downloaded the
date of
04251999 downloads as F0F4F2F5F1F9F9F9.
If the client uses ETU400 to download the data it comes down in char format
04251999.
displaying the data file on the 400 shows the fields as char and query displays
the correct format.
What are we doing wrong??
--
Kirk Goins
Blue Heron Consulting,Inc
2418 SE Burnside Rd #321
Gresham, OR 97080
503-618-1493
EMAIL kgoins@ix.netcom.com
kirkgoins@aol.com
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.