MicroStrategy ONE
Procedures
In Command Manager, procedures are reusable scripts that can be executed from other scripts. You can reuse procedures with different input values, so that the procedure performs the same task in a slightly different way.
For example, you can create a procedure called NewUser that creates a user and adds the user to groups. You can then call this procedure from another Command Manager script, supplying the name of the user and the groups. To use the procedure to create a user named KHuang and add the user to the groups Customers and Web Users, use the following syntax:
EXECUTE PROCEDURE "NewUser" ("KHuang", "Customers");
where NewUser is the name of the procedure, and KHuang and Customers are the inputs to the procedure. For detailed syntax information, see the Execute Procedure statement syntax.
Procedures are only available for use with project sources. Procedures cannot be used with Narrowcast Server statements.
Command Manager contains a large number of sample procedures that you can view and modify. These are stored in the Command Manager directory, in \Outlines\Procedure_Outlines\User_Procedures\ . You can view them in the Choose Outline dialog box, in the Procedures folder. For instructions on how to view or edit a sample procedure, see Inserting sample statements: Outlines.
Procedures can use Command Manager syntax, or they can be written in the Java programming language and incorporate Command Manager statements in Java commands. For information on using Java in procedures, see Using Java in Command Manager procedures.
You can create and edit procedures without connecting to an Intelligence Server. However, to test a procedure you must first establish a connection to a project source. For instructions, see Testing a procedure against a project source.
Related Topics
Testing a procedure against a project source
Saving and loading a procedure