When using MU / PE fields in Adabas, the option exists to set-up C* notation fields (counters) which are automatically populated by Adabas to tell me the number of records which are populated - very useful.
To add such a field I can go to any LDA which contains a view of the DDM, left-click on the ‘P’ or ‘M’ type field and add the ‘Counter’ option. A new field with type ‘C’ appears directly above the ‘P’ or ‘M’ field that has the same field name. I can refer to the value of that field in a program by returning the value of .C*. Great!
However, I also would like this view of the DDM to be transferred into an object (another LDA but not a view) to be passed back up from the DB call. If I attempt to do an import of this LDA into an Object Data Area, the ‘C’ field is ignored. If I copy and paste the field’s line in, it comes up as an error:
NAT0428 Invalid variable name definition in a data structure
If I create a field using the C* notation, I get an error as the character * is not permitted in field names.
I typically transfer data between the database and the incoming structure through using ‘move by name’, for example:
move by name xmlview to xmlobj /* moves the view LDA to the Object LDA structure /* OR move by name xmlview to xmlpda /* moves the view LDA to a PDA structure
which will ignore the C* fields as they can’t exist in either ‘Object Data Area’ or ‘Parameter Data Area’ structures
Short of having to define a new field such as -counter in any LDA or PDA and then perform
Move view.c*xml-string to xmlobj.xml-string-counter
in every program which transfers a view to an object; does Software AG provide any other way of utilizing the ‘C’ type counter fields for PE/MU fields in other than specifically the ‘V’ view of the DDM?