× 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 4/25/2014 4:14 PM, 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.

Cut and try only really works if you keep good notes so that you
understand why X resulted in Y. Otherwise you'll be doing all that cut
and try all over again when you want to make changes in the future.

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

I don't want null capable in any way, shape, or form to avoid problems
like this one. Yet I have them anyway. 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.

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.

The secret to using SQL is... use SQL. Don't mix and match CL commands
like CRTDUPOBJ with SQL tables. The SQL way to change a table is to
write a script that does an ALTER TABLE. If you need to propagate that
to other libraries you can change the script to SET SCHEMA TESTLIB and
re-run it.

--buck

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.