👁 0
Q: What is PERFORM recursion limit?
Answer:
COBOL doesn't traditionally support recursion; same paragraph in PERFORM stack causes error. RECURSIVE clause in PROGRAM-ID enables it. Recursive programs need local storage. Stack depth limited by system resources. Usually avoid in COBOL.
👁 0
Q: How to write recursive CTE?
Answer:
WITH RECURSIVE cte AS (base-case UNION ALL recursive-case referencing cte) SELECT * FROM cte. For hierarchies: start with root, join to find children. DEPTH limit prevents infinite recursion.