In the tutorial application, the program cm.fm calls updfiles()
from the EndFldLp PCL.
Here is that PCL.
It makes two calls to sys.upd_file().
/*
End Field Loop PCL
Name: updfiles
Usage: updfiles();
This PCL updates the file cust_mstr based on sys.mode
For Add or modify modes, if no record exists in the
zip code file, add one now
*/
if ( (sys.mode=="Add")||(sys.mode=="Modify") ) {
zc_zip = cm_zip;
if (sys.read_file(zip_code,F_ADD|F_NOMSG) == 0 ) {
zc_city = cm_city;
zc_state = cm_state;
zc_phprefix = cm_phone[0](0,2);
sys.upd_file(zip_code,F_DEFAULT);
}
}
sys.upd_file(cust_mstr,F_DEFAULT);