Hi all, welcome to another post in the series ‘Audit Command Language Tutorial for Beginners’. We hope all our readers are able to follow along and able to learn something new with each new post. For all those joining us at this stage, please start at the top of the series to get the most benefit from these posts about Audit Command Language.
In this post we will be discussing an important concept of Nested scripts. This is the closest the Audit Command Language scripts come to the object oriented concept of programming. To be clear has nothing to do with the concept of objects as in C++ or Java. Rather, it is simply the modular approach to programming that is enabled with the nested scripts i.e. different scripts are performing specifically designed tasks so as to keep the program properly arranged.
Lets assume we have a data set is which lists details employee details. We can extract all sorts of information from such a data set. See example of data set below:
Here are a few pieces of information that can be extracted from this data set. See below:
- Extract Country Codes in the data sets.
- Extract unique Work dept with total salaries paid across each dept.
- All employees hired before or after a certain date.
- All employee codes with total salaries paid.
Now all the above information can be extracted by scripting a single Audit Command Language script but it is possible that we may want to perform further analysis on data sets created for each of the above points and it would thus be more suitable to design the scripts individually for each such case. The layout of the scripts might look like as shown in the screenshot below:
All scripts labelled “Analysis” in the screenshot are each individual analysis case for any data set. Once all cases are scripted, the next step is to deign the flow of execution of the scripts. The flow can only be linear in nature in the Audit Command Language. Of course, the same script can be referred to as many times as required for any execution flow. At any stage in any script the flow of the calling other scripts can be done by using the Command ‘DO’. See ACL script example below:
Syntax: Do Analysis1
Simply using the “DO” command allows us to design the flow of any Audit Command Language project. Of course there are endless possibilities of flows that can be explored based on the type of analysis that you are undertaking. We have prepared a demo video showing how such project might look. See the video below:
Please keep practicing and feel free to reach out to us with your valuable feedback and comments. Please look through our various posts for ACL script examples and ACL scripts commands. Please sign up for our newsletter, so that we may keep you posted on the latest activity on our website and Youtube channel.