×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Dennis wrote:
Thanks for your reply, but I don't think I follow. Let me paraphrase the
way I read this: If you collect all the data into one place, then SQL can
collect all the data into one place recursively.
What did I miss?
Dennis -
If you put all of the the program reference information into a single
outfile, then you can use a recursive SQL statement to print a formatted
list, and even indent the called programs in the listing showing a level
number.
Now use Query Management run this recursive SQL over the PGMREF file:
( cyclic_data will be '1' in the resulting query if a recursive item is
detected.)
WITH REF
(
Level
, WHPNAM
, WHFNAM
, WHOBJT
)
AS
(SELECT
1
, ROOT.WHPNAM
, ROOT.WHFNAM
, ROOT.WHOBJT
FROM &FILELIB/PGMREF ROOT
WHERE ROOT.WHPNAM = &PARENT
and ROOT.WHOBJT = 'P'
UNION ALL
SELECT
PARENT.LEVEL + 1
, CHILD.WHPNAM
, CHILD.WHFNAM
, CHILD.WHOBJT
FROM REF PARENT, &FILELIB/PGMREF CHILD
WHERE PARENT.WHFNAM = CHILD.WHPNAM
and CHILD.WHOBJT = 'P'
)
Search depth first by WHPNAM,WHFNAM Set Sort1
Cycle WHFNAM Set cyclic_data to '1' DEFAULT '0'
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.