Sv: Data Conversion Errors
Ole Hansen, ScanConsult
oh@scanconsult.dk
Fri, 7 Jul 2000 09:19:15 +0200
Stuart,
I noticed that your program selected 12 records, but only 6 of those gave rise to data conversion errors. Try changing FINAL FOOTING to REPORT, and inspect the 12 records. I am pretty sure, that you will see illegal values in 6 of your 'HDR_PO_DATE', 'PO_DATE' and 'CHR_PO_DATE'.
/Ole
====================================================================
E-mail: oh@scanconsult.dk Cell Phone: +45 22 17 36 50
====================================================================
ScanConsult IT-Partners Voice : +45 87 34 55 07
Udviklingsparken Aarhus Fax : +45 87 34 15 07
Soenderhoej 46 Support : support@scanconsult.dk
DK-8260 Viby J. Sales : sales@scanconsult.dk
Denmark Web : http://www.scanconsult.dk
=== M A C H : Menu-based Air Cargo Handling system ===
=== ScanConsult is Authorized by Hewlett-Packard as: ===
=== * HP 3000 Select Independent Software Vendor * ===
=== ** HP9000 Power Partner ** ===
-----Oprindelig meddelelse-----
Fra: Stuart J. Rosenboom <stuartr@ihot.com>
Til: powerh-l@sphere.swau.edu <powerh-l@sphere.swau.edu>
Cc: JimKnapp@parker.com <JimKnapp@parker.com>
Dato: 7. juli 2000 09:07
Emne: Data Conversion Errors
>Hello All,
>
>Background: I have been working on a project using PowerHouse version
>8.19.C3 in MPE/ix Version C.55.06 environment. In my programs a take a
>6 digit date (YYMMDD) from a Zoned Numeric field, Convert it to a
>character string, add the century then convert the resulting 8 character
>date to numeric and store it in a DATE type variable. This works fine
>for record selection purposes when compares to other DATE Type variables
>containing parameters received from user prompts.
>
>I am now trying to use the same calculated date for record selections
>based on the System date using the SYSDATE function. When I do this I
>get Data Conversion errors on the calculated dates. The program
>functions correctly (i.e.: the calculated date is correct) but, because
>of the Data Conversion Errors, the program aborts my batch jobs when I
>run it in a Batch job (I check for JCW <> 0 in my stream jobs for error
>trapping purposes).
>
>Here is a brief excerpt of the code I am having problems with:
>
>ACCESS *H850SUB0 LINK PO TO EOU-REFERNO OF *EDI85HDI OPTIONAL &
> LINK EOU-REFERNO TO EOU-REFERNO OF *EDI85DTI OPTIONAL
>;
>DEFINE PO_DATE CHAR*6 = ASCII(HDR_PO_DATE OF EDI85HDI,6)
>DEFINE CHR_PO_DATE CHAR*8 = PACK("20" + & ; Y3K Bug, Job
>security!
> ASCII(HDR_PO_DATE OF EDI85HDI,6))
>DEFINE TRANS_DATE DATE = NCONVERT(CHR_PO_DATE)
>DEFINE CHR_PO_LINE CHAR*3 = ASCII(INTENTNO,3)
>;
>SELECT EDI85HDI IF TRANS_DATE = SYSDATE
>SELECT EDI85DTI IF CHR_PO_LINE = EOU-DETAILSEQB
>;
>SELECT IF NOT(RECORD EDI85DTI EXISTS)
>;
>SORTED ON VNCODE ON PO ON POLINE
>
>Here are the actual values being processed in the code segment above:
>
>> FINAL FOOTING SKIP 03 HDR_PO_DATE PO_DATE CHR_PO_DATE TRANS_DATE
>SYSDATE
>> GO
>
>?
>
> 706 000706 20000706 07/06/2000 07/06/2000
>
>
>
>?
>
>Records selected: 12
>Lines printed: 16
>Pages printed: 2
>
>** Data conversion errors: 6
>
>>
>
>Has anyone seen this type of problem before? Is there a possible Y2K
>bug in PowerHouse?
>
>Thanks in advance,
>Stuart J. Rosenboom
>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.