Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gauthamchilled
Creator
Creator

section access more than one field

Hi,

I have gone thru HIC's blog on section access reduction in more than one field. Not sure how to build the following auth keys for all possible combinations.

how to get all possible combinations for the below like

   

COMPACOMPBCOMPCCOMPD
111ANY
11ANYANY

-                 -                -                   -

i know the script for this to concatnate and get the auth key for the bridge table. but how to generate the combinations easily..

not sure how many combinations it will have also. please help.

22 Replies
gauthamchilled
Creator
Creator
Author

JUST a help to generate all key combinations to create auth key.anyone help?

cesaraccardi
Specialist
Specialist

Hi,

Can't you just do a resident load from the fact table to get all possible values for each field?

Cesar

cesaraccardi
Specialist
Specialist

A load 'distinct' should work

Chanty4u
MVP
MVP

what ever the section access script  hve u can  load and  do resident load.

u will get those as per requirmnt

and  all shud be in Upper case.

gauthamchilled
Creator
Creator
Author

But HIC is doing multiple times

Capture.PNG

in generic keys pdf attached page no 13

gauthamchilled
Creator
Creator
Author

since i am using 4 fields reduction. i cannot use section access script table directly. I am creating authorization table and auth bridge table. so confusion to get all possible key combinations

cesaraccardi
Specialist
Specialist

Hi,

If you have 4 reduction fields then you have to load 4 times:

LOAD DISTINCT

     COMPA & '|<ANY>|<ANY>|<ANY>' as %AuthKey,

     COMPA & '|' & COMPB & '|' & COMPC & '|' & COMPD    as %FactKey

RESIDENT FACT;

LOAD DISTINCT

     '<ANY>|' & COMPB & '|<ANY>|<ANY>' as %AuthKey,

     COMPA & '|' & COMPB & '|' & COMPC & '|' & COMPD    as %FactKey

RESIDENT FACT;

LOAD DISTINCT

     '<ANY>|<ANY>|' & COMPC & '|<ANY>' as %AuthKey,

    COMPA & '|' & COMPB & '|' & COMPC & '|' & COMPD    as %FactKey

RESIDENT FACT;

LOAD DISTINCT

     '<ANY>|<ANY>|<ANY>|' & COMPD as %AuthKey,

     COMPA & '|' & COMPB & '|' & COMPC & '|' & COMPD    as %FactKey

RESIDENT FACT;

And you create %FactKey on the fact table as well to do the linkage.

cesaraccardi
Specialist
Specialist

You can add a WHERE clause to each loading as well to reduce the size of the Authorisation bridge table:

LOAD DISTINCT

     COMPA & '|<ANY>|<ANY>|<ANY>' as %AuthKey,

     COMPA & '|' & COMPB & '|' & COMPC & '|' & COMPD    as %FactKey

RESIDENT FACT WHERE NOT ISNULL(COMPA);

LOAD DISTINCT

     '<ANY>|' & COMPB & '|<ANY>|<ANY>' as %AuthKey,

     COMPA & '|' & COMPB & '|' & COMPC & '|' & COMPD    as %FactKey

RESIDENT FACT WHERE NOT ISNULL(COMPB);

LOAD DISTINCT

     '<ANY>|<ANY>|' & COMPC & '|<ANY>' as %AuthKey,

    COMPA & '|' & COMPB & '|' & COMPC & '|' & COMPD    as %FactKey

RESIDENT FACT WHERE NOT ISNULL(COMPC);

LOAD DISTINCT

     '<ANY>|<ANY>|<ANY>|' & COMPD as %AuthKey,

     COMPA & '|' & COMPB & '|' & COMPC & '|' & COMPD    as %FactKey

RESIDENT FACT WHERE NOT ISNULL(COMPD);

gauthamchilled
Creator
Creator
Author

OK.

so only 4 combinations?

'<ANY>|<ANY>|<ANY>|<ANY>' is not there?