CA Gen action block generation fails with "DBMSNAME property missing for funcdef ..." for several functions.
search cancel

CA Gen action block generation fails with "DBMSNAME property missing for funcdef ..." for several functions.

book

Article ID: 207508

calendar_today

Updated On:

Products

Gen

Issue/Introduction

Some functions like TIMETEXT or DATETIMESTAMP functions can be selected for use in an action block database statement but then cause the CSE or Toolset generation for MVS, DB2 z/OS, COBOL, CICS to fail.  For example the toolset generate.err file or CSE <action_block>.err file will contain message:

DBMSNAME property missing for function TIMETEXT

Environment

Release : 8.6
Component : CA Gen Client Server Encyclopedia

Cause

36 functions can be used in action block database statements and those functions should have a DBMSNAME property set.
The associated USESELEC property is used to control whether a function is listed for use when creating an action block database statement so each of those 36 functions should also have USESELEC='Y'.
The root cause of the problem was found to be that some of the customer's models did not have the DBMSNAME property set for one or more of those 36 functions.

Resolution

The following update SQL was provided to reset the DBMSNAME property for all 36 functions which should have it:
+++
update dname set name32_prop_3 = 'CONCAT' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'CONCAT');

update dname set name32_prop_3 = 'CONCAT' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'CONCATDBCS');

update dname set name32_prop_3 = 'CONCAT' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'CONCATMIXED');

update dname set name32_prop_3 = 'DATE' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'DATEDAYS');

update dname set name32_prop_3 = 'DATE' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'DATETEXT');   

update dname set name32_prop_3 = 'DATE' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'DATETIMESTAMP');  

update dname set name32_prop_3 = 'DAY' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'DAY');

update dname set name32_prop_3 = 'DAY' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'DAYTIMESTAMP');

update dname set name32_prop_3 = 'DAYS' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'DAYS');   

update dname set name32_prop_3 = 'DAYS' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'DAYSTIMESTAMP');                        

update dname set name32_prop_3 = 'HOUR' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'HOUR'); 

update dname set name32_prop_3 = 'HOUR' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'HOURTIMESTAMP'); 

update dname set name32_prop_3 = 'LENGTH' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'LENGTH'); 

update dname set name32_prop_3 = 'LENGTH' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'LENGTHDBCS'); 

update dname set name32_prop_3 = 'MICROSECOND' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'MICROSECOND');

update dname set name32_prop_3 = 'MINUTE' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'MINUTE');

update dname set name32_prop_3 = 'MINUTE' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'MINUTETIMESTAMP');

update dname set name32_prop_3 = 'MONTH' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'MONTH');

update dname set name32_prop_3 = 'MONTH' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'MONTHTIMESTAMP');

update dname set name32_prop_3 = 'SECOND' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'SECOND');

update dname set name32_prop_3 = 'SECOND' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'SECONDTIMESTAMP');

update dname set name32_prop_3 = 'SUBSTR' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'SUBSTR');

update dname set name32_prop_3 = 'SUBSTR' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'SUBSTRDBCS');

update dname set name32_prop_3 = 'SUBSTR' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'SUBSTRMIXED');

update dname set name32_prop_3 = 'TIMESTAMP' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'TIMESTAMP');

update dname set name32_prop_3 = 'TIMESTAMP' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'TIMESTAMPDATETIME');

update dname set name32_prop_3 = 'TIME' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'TIMETEXT');

update dname set name32_prop_3 = 'TIME' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'TIMETIMESTAMP');

update dname set name32_prop_3 = 'TRIM' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'TRIM');

update dname set name32_prop_3 = 'TRIM' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'TRIMDBCS');

update dname set name32_prop_3 = 'TRIM' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'TRIMMIXED');

update dname set name32_prop_3 = 'UPPER' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'UPPER');

update dname set name32_prop_3 = 'UPPER' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'UPPERDBCS');

update dname set name32_prop_3 = 'UPPER' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'UPPERMIXED');

update dname set name32_prop_3 = 'YEAR' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'YEAR');

update dname set name32_prop_3 = 'YEAR' where name_obj_id in (select obj_id from dobj where obj_model_id in (select model_id from dmdl where model_name='MODEL_NAME') and obj_type_code = 24 and obj_name = 'YEARTIMESTAMP');
+++

The above SQL makes the changes for a specific model but if there are a large number of "bad models" impacted that part could be removed to run the SQL on the whole of the CSE i.e. updating existing "good models" won't cause any problems. However, testing on one model first to confirm it resolves the problem would be suggested.

NOTE: Per usual practices, before running any update SQL we strongly recommend having a backup of all individual models being updated or a backup of the complete CSE database.

Additional Information

The associated USESELEC property used to control whether a function is listed for use when creating an action block database statement was not impacted by this problem i.e. each of the 36 functions that can be used in such statements still had USESELEC='Y'.