We’re looking to add a field description in a DB2/400 file

829015 pts.
Tags:
AS/400
DB2/400
My partner and I have a set of files on an AS/400 system but we don't have DDS for (the files were created in SQL). We would like to add field descriptions but we're struggling to find how to do this in AS/400.

Could someone tell me how we can add a field description? Is directly updating SYSIBM.SQLCOLUMNS to set COLUMN_TEXT safe? Thanks!

Answer Wiki

Thanks. We'll let you know when a new response is added.

Look at the COMMENT ON and LABEL ON commands. They should let you accomplish your task.

Discuss This Question: 6  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.
  • TomLiotta

    No. Do not try to update any system catalog tables directly. Use the normal SQL statements to add column text or descriptions. E.g., for a text description:

    LABEL ON COLUMN MyLib/MyTable (
        MyColumn TEXT IS  
    'The descriptive text for this column can be long.'
      )

    Tom

    125,585 pointsBadges:
    report
  • WoodEngineer
    Check out command CHGFFDTXT.  It is a little old but still works on our 6.1 system. 

    Source code at  http://itke.pastebin.com/Z4Q6Fke5
    6,955 pointsBadges:
    report
  • Yorkshireman
    The clue is in your question - id the files were created with SQL - just use SQL to update the text.  

    You could investigate Navigator - several facilities in there specific to SQL. 



    6,085 pointsBadges:
    report
  • philpl1jb

    Doubt you'll get a response, question was asked in December.

    December 2013, hope they haven't been waiting for an answer.

    Have a nice, safe New Years.

    54,090 pointsBadges:
    report
  • Yorkshireman

    Time on my hands - haven't found a sensible way to filter this site by date or by 'unanswered' 

    Or even better - real, actual, technical questions.. 


    Nice to hear from you.  Welcome 2016..

    6,085 pointsBadges:
    report
  • Yorkshireman

    Oh and I forgot - since the last time I was here there's a daft 'share this with your network' annoyance after every post. 

    back to midrange for me...

    6,085 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.

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

Following

Share this item with your network: