The null update suppression logic generated in CHGOBJ functions determines whether to update the database record as shown in the following steps:
If the images differ and the *Record data changed field is not *NO, CHGOBJ sets the *Record data changed field to *YES.
Note: Where and how often the previous checks are done within the CHGOBJ depends on whether YNLLUPD is *AFTREAD or *YES. If *YES, check is done both after the After Data Read and after the Before Data Update user points. If *AFTREAD, the check is done only after the After Data Read user point.
For more information about:
It is possible to change the primary key of a file using CHGOBJ. However, this is only valid for RPG/DDS and this generally violates relational database principles. Changing the primary key should be performed using DLTOBJ function followed by a CRTOBJ function. In COBOL or SQL, a primary key change must be performed in this way.
For a given based-on access path, if you want to update all database fields in some functions but only a subset of fields in other functions, create a second CHGOBJ function by copying the default CHGOBJ function. On the second CHGOBJ, specify the fields you do not want to update as Neither (N) parameters. Only fields specified as Input (I) parameters are updated in the database record. Use the second CHGOBJ instead of the default CHGOBJ in the functions where you want to update the subset of the database fields.
For more information about:
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |