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



Depending on how often you need to do this, id it is a once off, iNav would
work generate the SQL code, removing the NOT NULL and running the script to
rebuild the table. This is the simplest way. The more complicated way is to
look at the DDL in iNav and do a change on each line and remove the NOT
NULL.

If you have multiple tables to do, I would suggest a simple RPG program
receiving parms of the table and library names. Then loop through
QSYS2.SYSCOLUMNS picking up each column in the table and generating a
dynamic instruction to do a ALTER TABLE to remove the NOT NULL.

Darryl.

On Thu, Jul 13, 2017 at 12:35 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:


Nathan,

Is there a way to remove the NOT NULL from all columns with one command,
or do I need to remove NOT NULL from each column individually?


In regard to utilities that generate DDL source from existing physical and
logical files, Justin just mentioned the one in iNav. Years ago I
downloaded a copy of GENDDL from Tommy Holden.

These utilities just generate DDL source. GENDDL outputs it to a source
member that you specify on the command. You just mass replace "NOT NULL"
with "" using an editor (i.e. SEU), then RUNSQLSTMT to create the table.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.