Data conversion problems
Ron Tilby
Rtilby@montek.com
Fri, 24 Apr 1998 17:30:24 -0600
Colin,
In order for ADDCENTURY to work, the input argument MUST be a valid date (STORED in YYMMDD sequence) or Zero.
If TRANS-DTE and DTE-MONTHLY are not valid YYMMDD DATES, then ADDCENTURY will give you problems.
Someone else replied that the comparison to 500000 is the problem. In my experience (7.09, HP3000) when dates are involved in a comparison, they are treated as just numbers, so you CAN compare a date to some number like 500000, but you can't do ADDCENTURY(500000), because 500000 isn't a valid date.
Try this, to see if you've got bad data (as far as PowerHouse is concerned) in your TRANS-DTE field:
QUIZ
>ACCESS R-ADJ-DTLS
>SET REPORT LIMIT 99999
>DEFINE X CHAR*8 = ASCII(TRANS-DTE)
>SORT ON X
>FOOTING AT X TRANS-DTE FORMAT DDMMMYY X COUNT
>GO
You should get output looking like this: 24 APR 98 980424 32
If that's not what you get, then you need to clean-up the data before you can do Y2K conversion on it.
Hope this helps,
Ron Tilby
Raytheon Aircraft Montek Co.
Salt Lake City, UT, USA
>>> COLIN GLASS <cglass@mlcc.mb.ca> 04/24 2:51 PM >>>
Using QTP 7.09 on the HP3000 using a TurboImage database, I am having
trouble with data conversion errors. I have found that the data conversion
errors occur in my select statement, but don't understand why and don't
know how to resolve it. Here is the portion of the program I'm having
trouble with:
TEMP T-TRANS-DTE ZONED SIZE 8
ITEM T-TRANS-DTE = TRANS-DTE OF R-ADJ-DTLS &
IF 8 = SIZE(ASCII(TRANS-DTE OF R-ADJ-DTLS)) &
ELSE ADDCENTURY(TRANS-DTE OF R-ADJ-DTLS,20) &
IF TRANS-DTE OF R-ADJ-DTLS < 500000 &
ELSE ADDCENTURY(TRANS-DTE OF R-ADJ-DTLS,19)
TEMP T-DTE-MONTH ZONED SIZE 8
ITEM T-DTE-MONTH = DTE-MONTHLY OF S-DATE-CTRL &
IF 8 = SIZE(ASCII(DTE-MONTHLY OF S-DATE-CTRL)) &
ELSE ADDCENTURY(DTE-MONTHLY OF S-DATE-CTRL,20) &
IF DTE-MONTHLY OF S-DATE-CTRL < 500000 &
ELSE ADDCENTURY(DTE-MONTHLY OF S-DATE-CTRL,19)
SELECT IF T-TRANS-DTE GE T-DTE-MONTH
TRANS-DTE is defined in the dictionary as a date with century excluded and
DTE-MONTHLY is defined as a numeric 6.
Can anyone give me some help please?
Thanks
Colin Glass
Manitoba Liquor Control Commission
Winnipeg, Manitoba, Canada
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.