You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refractor without --scan: cobol_dag_architect reads ASSIGN TO "x" as DD 'TO', misses SELECT OPTIONAL and non-ASCII file names (lineage differs from --scan) #3998
Found while fixing #3992 (PR #3994), and left out of that PR. It affects the refractor without --scan. There, cobol_dag_architect supplies the program's file lineage (analysis.lineage.inputs/outputs) from its own SELECT reader, not the engine's.
Defect
_SELECT in gitgalaxy/tools/cobol_to_cobol/cobol_dag_architect.py:36:
The engine's own reader (core/file_control.py, used with --scan) and, since #3994, analyze_cobol_intent's files_requested get all three right. So the same program gets different lineage depending on whether --scan is passed.
Actual (no --scan): inputs: ['TO'], outputs: []
With --scan: inputs: ['./IN-FILE', 'CUSTDD'], outputs: ['OUTDD'] (expected)
Expected
Both paths give the same lineage. The cleanest fix is probably for the no-scan path to use the engine's SELECT reader (core/file_control.py) rather than keep a second regex. Otherwise _SELECT has to read the ASSIGN target before literals are blanked, accept OPTIONAL, never take TO as a name, and use the COBOL word class (national, Japanese, full-width). A test should check that --scan and no-scan lineage agree on these SELECT forms.
Activity
Fix #3998: no-scan lineage reads SELECT with the engine's reader (#3999)