Hooray!

 0 Replies
 0 Subscribed to this topic
 15 Subscribed to this forum
Sort:
Author
Messages
trueblueg8tor
Advanced Member
Posts: 41
Advanced Member

    This has probably already been solved but I've been waiting so long for this I had to share it. Here is an example of a query you can use if you ever wondered what security classes have a form with certain function codes. (Note, obviously, this is intended for LSF environments where GEN is a relational db) Enjoy!


    --Tell Me Which Security Classes Have “A” AND “S” Function Codes for PO420

    --All Security Classes Minus...
    SELECT DISTINCT SECCLASS FROM YOURSCHEMA.SECCLASS WHERE SECCLASS NOT IN

    --SC's that Don't Have the PO System Code...
    (SELECT DISTINCT SECCLASS FROM YOURSCHEMA.USERCAT WHERE PRODUCTLINE = 'LAWPROD' AND CATEGORY ='PO')

    --SC's that Don't have the Token you're looking for...
    AND SECCLASS NOT IN
    (SELECT SECCLASS FROM YOURSCHEMA.USEREXE WHERE PRODUCTLINE ='LAWPROD' AND TOKEN ='PO420')

    --SC's that have been denied the FC's you're looking for...
    AND SECCLASS NOT IN
    (SELECT SECCLASS FROM YOURSCHEMA.USERSCR WHERE PRODUCTLINE = 'LAWPROD' AND TOKEN ='PO420' AND (INVALIDFCS LIKE '%A%' OR INVALIDFCS LIKE '%S%'))

    -- and have LAWPROD product line access
    AND SECCLASS IN (SELECT SECCLASS FROM YOURSCHEMA.USERPROD WHERE PRODUCTLINE ='LAWPROD');