The Number 1 independent website for ACL information!

TexasACL User Group
About Us
Training
Why ACL
Essays & Scripts
ACL News
Events
Links
FAQ
Site Map
Support Us
This is a basic Segregation of Duties test.  It assumes that you have two files.  The first file is the Transaction_file that contains the user_name and a duty code.  The script assumes that each user_name/duty code combination will have it's own record.  In other words:

 User name
Duty Code
Smith
A1
Jones
A1
JonesB2
Jones
C3
The script also assumes that there is a second file, List_file, that contains records for each combination of Duty Codes that pose a SOD risk:

 SOD_Field1SOD_field2
A1A2
A1
C3
B2
D4



A01_SOD

COM******************************************
COM Name Porter Broyles
COM Website: www.texasacl.com
COM Written July 2008
COM Transaction_File is a file that has the user name and the duty code.
COM List_File is the file that has two fields with two duty codes that create a conflict of interest.
COM*****************************************

set safety off
delete format TEMP_1 OK
delete TEMP_1.fil OK

COM**********************************************************************
COM sort SOD tansaction file and summarize on name and duty code
COM to create one record for each duty code for each person
COM**********************************************************************

OPEN Transaction_file
SUM ON Name Duty_Code TO TEMP_1 PRESORT

OPEN List_file
COUNT
v_cntr=1

DO SOD_Test while loopctr <=COUNT1

SET SAFETY ON


Script SOD_Test


COM*************************************
COM The code assumes that the SOD list has two fields listing two functions that indicate a
COM Segregation of Duties weakness.  When using this code, replace SOD_field1 and SOD_field2
COM with the respective field names.
COM*************************************

OPEN List_file
LOCATE RECORD v_cntr
V_SOD1=SOD_field1
v_SOD2= SOD_field2

Open TEMP_1
v_name=blanks(25)

set filter match(Duty_Code,v_SOD1,v_SOD2)

GROUP if prev_name=name
  EXTRACT Name v_SOD1 v_SOD2 to REPORT_SOD_errors Append
ELSE
  v_name=name
END

v_cntr = v_cntr + 1