Not sure that I understand everything from your description, but in order to query nodes within a subset of nodes you should use WITH clause.
match (n:ProgNode {compileunit:'Cwe1057.java', inode:'265'})-[*]->(BIGSET:ProgNode)
WITH BIGSET as j
match
(j:ProgNode {compileunit:'Cwe1057.java', KDM:Transform})-[*]->(LITTLSET:ProgNode
{compileunit:'Cwe1057.java', KDM:Primitive})
return j, LITTLESET
match (n:ProgNode {compileunit:'Cwe1057.java', inode:'265'})-[]->(j:ProgNode)
WITH j as BIGSET
match
(BIGSET:ProgNode {compileunit:'Cwe1057.java', KDM:'Transform'})-[]->(LITTLESET:ProgNode
{compileunit:'Cwe1057.java', KDM:'Primitive'})
return BIGSET, LITTLESET
Worked perfectly. Thank you. Found another set within that BIGSET so somewhat embarrased but that was simple and easily done. Thank you again