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



On 25-Apr-2014 15:14 -0500, Dale Janus wrote:
I have added the new field to my file with DDL. I removed
constraints, added constraints, I kept trying stuff until something
worked.

Not sure what this has to do with RPG.?

Now I am trying to use the tools I have used for many years to use
the new file in all my libraries. I use CRTDUPOBJ to make an empty
copy of the file I just added the field to in the next library I need
it. I try to move data into it using CPYF and *MAP *DROP. It fails
with CPF5035 error code 20 "-- A field that is not null capable could
not be set to null. "

The msg CPF5035 RC20 is indicating the row for the named column has a NULL value but the corresponding same-named field in the TOFILE() does not allow the NULL value.

I don't want null capable in any way, shape, or form to avoid
problems like this one. Yet I have them anyway.

When using ALTER TABLE [or CHGPF SRCFILE(named)] to modify the Record Format of the file, and the null-capable [ALWNULL] attribute is not desirable, then assign a DEFAULT [DFTVAL] for the column.

I just want to copy data, like I've done for years and years. If
there is an SQL command/tool as easy to use as CPYF, I'm willing to
try it.

INSERT INTO ... SELECT ... FROM ...

I am trying to use the new methods like DDL. But I have spent over a
day on something that should have taken less than an hour.

I am pretty sure I explained the situation and how to overcome the difficulties in my response on midrange-l:
http://archive.midrange.com/midrange-l/201404/msg00843.html


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.