RPG programming: Are nulls not permitted?

342985 pts.
Tags:
AS/400
DB2
RPG
I know this might be an off-topic discussion but I was recently told by one of our RPG programmers that none of our AS/400-based DB2 database tables can permit nulls because "they're really difficult to program" for in RPG. Is this true? If so, what makes the basic database feature so difficult in RPG?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb

    Nulls are difficult/impossible .. in the older RPG/400 (sometimes referred to as RPG III)

    Nulls are somewhat difficult in the newer RPG IV (sometimes referred to as RPG-ILE) 

    When you change a field or file to allow nulls every program using that file will need to be changed and will need to be retested..Some of these changes will be small but some of them will be significant.

    New programs in RPG IV will have to be written somewhat dfferently to work with the null values.

    Here is a discussion of nulls on the AS/400

    http://www.itjungle.com/mpo/mpo082803-story02.html

    49,600 pointsBadges:
    report
  • TomLiotta

    As with any programming language, nulls need to be handled appropriately by the developer. They're no more difficult to handle than any other value; they just need to be attended to.

    As Phil says, the older compilers have no support for nulls. But the compilers from the current century do. (The support has been available for quite a few years.)

    Perhaps the biggest problem in an existing site is that tables that have been around for many years will not allow null values. If those tables are altered to allow nulls, then all of the programs that currently process the tables must be modified to have coding added to handle nulls. I wouldn't be surprised if management is unwilling to assign resources to make those changes.

    But for any new tables, there should be no problem with allowing nulls. New development is a very different issue. If that's what your developers are talking about, then you have a significant problem.

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following