November 13, 2012, 01:18 PM
TOM SCHULTE [CLOSED]Identify if a synonym is a stored procedure, or not.
How is it possible to tell if a synonym obtained from TABLEF FILE _EDAHOME/CATALOG/SYSAPPS or APP QUERY, etc. is for a stored procedure, or not?
Thanks!
This message has been edited. Last edited by: TOM SCHULTE , November 13, 2012 05:18 PM November 13, 2012, 02:02 PM
TOM SCHULTE I don't see the answer in SYSTABLE, or SYSFILES ... maybe once the synonym is made, it cannot be ascertained any longer whether it points to a stored procedure, or not?
November 13, 2012, 03:38 PM
Waz What about SYSCOLUM ?
If the Master has the segments INPUT OUTPUT and ANSWERSETn perhaps.
November 13, 2012, 04:02 PM
TOM SCHULTE When I use
TABLE FILE SYSCOLUM
PRINT *
END
-RUN
-EXIT
I don't see anything in the output that looks relevant to individual synonyms, like I expect
November 13, 2012, 04:11 PM
Waz FYI,
As this SYSCOLUM master is multisegment, a straight PRINT * will probably return 0 records.
Or you will get too much information. It is the SEGNAME that is the key.
try
TABLE FILE SYSCOLUM
PRINT TBNAME SEGNAME
END When I use this I see the segnames mentioned above.
SEGNAME INPUT OUTPUT ANSWERSET1
November 13, 2012, 04:24 PM
TOM SCHULTE Ah, I see. It looks like I can get a report of all stored procedure based synonynms with this:
TABLE FILE SYSCOLUM
PRINT TBNAME
WHERE SEGNAME='ANSWERSET1'
END
I wonder if that could give me any false positives? I don't see any in there, now.
November 13, 2012, 04:33 PM
Waz As the SEGNAME for tables could be anything, it is possible.
Do you also get INPUT and OUTPUT ?
You could check for a combination of SEGNAMES
November 13, 2012, 05:18 PM
TOM SCHULTE Thanks
I think this is something I can work with.