Plex 2E

  • 1.  CA2E Changing the record key

    Posted Oct 06, 2017 03:19 PM

    I am assuming that the Synon change object will not allow a change to a records key field.  How is this typically done?  Would it be using a delete and add record?



  • 2.  Re: CA2E Changing the record key

    Posted Oct 07, 2017 03:52 AM

    I think you will be surprised - you can change the key field values on a CHGOBJ!

     

    Pass the new key fields in as additional parameters to the CHGOBJ, then in one of the user points before update move the new key fields to the original key fields - and it should work.

     

    I seem to recall that this will not work when generating COBOL - but that is from 15+ years ago - and the memories are fading somewhat...



  • 3.  Re: CA2E Changing the record key

    Posted Oct 07, 2017 09:31 PM

    Thanks Darryl ... sadly the application I am working with is 15 years old and generating COBOL.  Ha! However, I'll try RPG as this is just a utility/conversion application.




  • 4.  Re: CA2E Changing the record key

    Posted Oct 09, 2017 11:36 AM

    Just following up ... you were correct.  This worked in RPG but not COBOL.  Thanks again.
    #chgobj



  • 5.  Re: CA2E Changing the record key

    Posted Oct 12, 2017 09:23 AM

    WOW!  Learned something new!  18 years of creating a new record to replace and delete.  Thanks!!  Don't forget to change records to files that are owned by the parent.