Existing customers have been working on using GenevaERS metadata in related processes outside of GenevaERS. Our first contributor to open source, Sandy Peresie, took on the challenge of building a process which reads Geneva metadata XML file and produces an output of selected elements in COBOL. This was an experimental project, the first of the GenevaERS open source projects.
She chose to use Python 3.8.
To execute the process:
- place the downloaded ascii/crlf VDP in the Data directory.
- change the file name in the safrmain_poc.py
- execute the file
Design specifications for this work in summary were:
- View Column Records can be used to produce the expected output from the view.
- To produce an input structure from the referenced LRs, do the following:
- Use a LogicaRecord from the tree. Read its LOGRECID field. You can also get the LR name from this section.
- Then in the LRField records look for fields that have that LOGRECID (that is treat it as a foreign key… a back reference) you will find there the LRFIELDID and name of the field and its start position within the record. (also an ordinal number) There is a complication here if the field redefines another at the same space. Look at the redefines. Suggest that you ignore redefined fields as a first iteration.
- Now that you have the LRFIELDID you can use the LR-Field-Attribute section of the XML In there you will find the data type of the field FLDFMTCD, its length, sign, number of decimal places etc.
The following is a screen shot of the output she produced from her initial prototyping efforts focused on step 1.
Thanks for your work Sandy! You’ve started the ball rolling on GenevaERS Open Source Contributions!