× 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.



Tom Deskevich wrote:
I don't know if this is the best way to accomplish this. But I
added 2 characters to each field, then put a " at the beginning
of the field and end, trimming blanks. That gave me "" for blank
fields instead of " ".

I also changed the CPYTOIMPF to STRDLM(*NONE).

They are now happy.

<<SNIP>>

Then just FWiW...

Since the empty string is the desired result, instead of the NULL value, then the VARCHAR of the column will return the delimited empty string for a zero-length string. Thus like in the prior posting, a CREATE VIEW to remap the CHAR field of blanks to [instead of the NULL value, to] the VARCHAR of an empty string would suffice.

As in http://archive.midrange.com/midrange-l/201003/msg00970.html, a sample CREATE VIEW to accomplish that using the same setup as in that message:

<code>

create view qtemp/ltcXfileVC (l, t, c, X) as
(select l, t
, varchar(case when c='' then '' else c end), X
from qtemp/ltcXfile)
;
cpytoimpf fromfile(ltcXfileVC) strdlm(*dblquote) /* effects: */
....+....1....+....2....+....3.
***Beginning of data*
,,"A","X"
,,"","X"
,,"C","X"
,,,"X"
,,"","X"
*****End of Data*******

</code>

Regards, Chuck

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.