ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How do I change a table from Read-only to be able to update?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I change a table from Read-only to be able to update?

    I have a table called TAXLIB18. I have 15+ million rows I want to delete. So I execute the following:

    Code:
    DELETE FROM IJRNPREP/TAXLIB18 WHERE JOJOB = 'CAMAIMAGES'
    And I get message SQL0150 - View or logical file TAXLIB18 in IJRNPREP read-only.

    IJRNPREP/TAXLIB18 is type PF - so it's not an index or a view.


  • #2
    Run a DSPFD command. What does it show for ALWUPD?

    Comment


    • #3
      It is *NO. How do I change that?

      Comment


      • #4
        You can't, you will have to recreate. From this page https://www.ibm.com/support/knowledg...bafoseccap.htm an excerpt:

        You cannot change file capabilities after the file is created. You must delete the file and then re-create it with the capability that you want. The Display File Description (DSPFD) command can be used to determine the capabilities of a file

        Comment


        • #5
          Which makes senses - if you could it would somewhat defeat the purpose.... I copied the data to another file, deleted the ones I wanted to delete and copied it back specifying MBROPT(*REPLACE).

          Thank you for your assistance!

          Comment

          Working...
          X