× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



James Rich wrote:

We're trying to use data transfer in iSeries Access to transfer a file from the i to the PC. The file includes date fields. Some of the dates are *LOVAL and when transferring we get error SQL0181 "Value in date, time, or timestamp field not valid". Any solution to getting the file transferred?

One option might be to cast the date field into a character one. It might be necessary to tell the transfer program that you want to process native SQL. If so, in the transfer program screen, click on File, then the SQL tab. Select "Process Select as Native SQL".

Select fielda, fieldb, Char(fieldc, USA) From File1

You can specify whatever format you need. If you need sortability on the field, then ISO would be appropriate.

You could also modify the statement with a Case statement to handle the *Loval.

Select fielda, fieldb,
Case Char(fieldc, ISO) When '0001-01-01' Then ' '
Else Char(fieldc, ISO) End
From File1


Bill

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.