COBOL analysis is being deprecated. Version 1.23 is the final Semmle release to include the CodeQL library for COBOL.
For an overview of this library, along with tutorials and examples, see CodeQL for COBOL
Does this AstNode have ‘other’ as a ancestor?
predicate hasAncestor(AstNode other)