By default, the program context return code field (PGM.*Return code) is set to *DBF record does not exist. If necessary, insert a move at this point to set return code to *Normal.
For processing that requires the creation of a DBF record, if the record based on the input key parameters is not found, you can insert a CRTOBJ function here and use the input values of the fields passed into this function (from the PAR context) as input parameters. This is the preferred method for doing this since it involves considerably fewer I/O resources than using a RTVOBJ to read a record and the executing a CRTOBJ or CHGOBJ based on the result of the read.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |