Changing a custom index to "Key Change=Yes"?

Sort:
You are not authorized to post a reply.
Author
Messages
Woozy
Veteran Member
Posts: 709
Veteran Member

    Hi All,

    We are on LSF 9.0.1.11.  Sometime in the past, we created a custom index on HRHISTORY (HRHSET99) that has "Key Change = No".  We recently identified an error with a delivered program that was attempting update HRHISTORY and found that the error was because it is trying to change a field that is included in our custom index.

    Since the index is only used by one program, and is only used for query (not update), can I just change the index to "Key Change = Yes" and then recompile the program that uses it, or are there other impacts of making this change?

    If I do make this change, will I need to run dbreorg?  Will need to regenerate the indexes somehow? 

    Thanks!

    Kelly

     

    Kelly Meade
    J. R. Simplot Company
    Boise, ID
    John Henley
    Senior Member
    Posts: 3348
    Senior Member
      Kelly,
      You should be able to make the change in dbdef, run blddbdict, and then dbreorg -d
      There is no physical change required to the database.
      Then recompile any programs that access the HRHISTORY table (probably easiest to do full recompile or at least HR, BN, PA, PR, LP, etc. )
      Thanks for using the LawsonGuru.com forums!
      John
      Woozy
      Veteran Member
      Posts: 709
      Veteran Member
        Thanks John. I'll give that a shot. I appreciate your help, once again.

        Kelly
        Kelly Meade
        J. R. Simplot Company
        Boise, ID
        jaherb
        Veteran Member
        Posts: 164
        Veteran Member
          Kelly..... I don't think you are going to get what you are looking for by doing that. You are not permitted to change key fields even with that field set to "Yes".
          That was for old Lawson logic.

          What I have had to do is write the logic to save the record, delete the table record and then re-create and add it again.

          Jim
          John Henley
          Senior Member
          Posts: 3348
          Senior Member
            Jim, I disagree. There are a number of indexes that include a status. When the status changes the row is updated not deleted and recreated.
            Thanks for using the LawsonGuru.com forums!
            John
            Woozy
            Veteran Member
            Posts: 709
            Veteran Member
              Jim/John - I am only using this custom index for query, but changing that flag appears to have resolved the errors that were happening when other indexes are used for update. Hopefully the issue is resolved, but we're stilll testing to validate.

              If we find more issues, I'll likely ping you back. Thanks for your help!
              Kelly Meade
              J. R. Simplot Company
              Boise, ID
              You are not authorized to post a reply.