#Example COBOL statement
cobol_statement = "MODIFY MAP CURSOR AT NBS-DS-01(1) FOR FIELD (NBS-DS-01, NBS-DS-02(2), NBS-DS-03(3))"
I need a json structure to covert this COBOL i need a result as
{"cursor": "NBS-DS-01(1)", "for": ["NBS-DS-01","NBS-DS-02(2)","NBS-DS-03(3)"]}
I need the json structure to be dynamic whatever the field I’am adding to be convert automatically
2
Answers
Try something like this:
Output:
You can try this regular expression. If you use a different format you need to reconstruct the regex.
Output: