** This thread discusses the article: Data Structure Templates **
One problem I've run in to with template date structures is using the inz() keyword for numeric subfields. If you are not careful to initialize the subfields properly, decimal data errors can occur when comparing the subfield. One downfall of the 'based(templ_ptr)' method is that one cannot use 'inz()' on any of the subfields in such a DS, and therefore can't use 'inz(*likeDS)' on the DS which is subsequently defined 'likeDS'.
** This thread discusses the article: Data Structure Templates **
Right, and this is going to be fixed in an upcomding release when IBM implements templates as a language elmeent. However, one should INZ all data structures, except based.
Comment