Monday, October 5, 2015

Ab-Initio - Air sanbox command. Part 1

Air sandbox commands:- 

1. air sandbox create <path>

                          [-template <path>]
                          [-prefix <prefix>]
                          [-replace <s1> <s2>]
                          [-location <location>]
                          [-nodirectories]

Creates a new sandbox in a directory. It creates the directory if  necessary, marks the directory as a sandbox, and creates the built-in sandbox directories.

       <path>           Path to the new sandbox.

       -template        Creates the sandbox from the specified template sandbox.

       -prefix         By default, the sandbox begins with a set of predefined parameters (DML, XFR) used to locate objects within the sandbox. This option is used to add a prefix to the front of these parameters.

For example: -prefix COMMON_ causes these parameters to be called COMMON_DML, COMMON_XFR, and so on.

                        The prefix is not applied to the location parameter and the RUN parameter.

       -replace When creating a sandbox from a template, changes All occurrences of one string <s1> to another string <s2> in all parameter names and expressions.

       -location Specifies the name of a parameter that points to the location of the project. Default is PROJECT_DIR.

       -nodirectories   Does not create the default sandbox directories.

2. air sandbox detach –q <path>

This detaches a sandbox from its associated EME project.
-q[Optional] - Suppresses error if the sandbox directory does not exist. 
Path[Optional] - Path to the sandbox directory. Default is the current directory.

3. air sandbox diff 

                        {<path> |
                        <path1> <path2> |
                        -version <v> <path> |
                        -version <v1> -version <v2> <path>}
                        [-terse | -verbose]
                        [-ignore-param-order]
                        [-text]

Displays differences between two graphs, two plans, or two text files. The method used to determine differences depends on the types of the objects specified, which in turn depend on the filename extensions. 

       <path>        Path to a file in the filesystem.

       -version    Specifies a version of the object to compare. It can be expressed as an version number, as a tag, or as 'current' (current version of the EME datastore). If -version is omitted, the command compares object <path> against the EME version from which the object was checked out.

       -terse    Valid for graphs or plans. If specified, shows only differences that might affect the running of the graph or plan, such as a change to the value of a parameter.

       -verbose    Valid for graphs or plans. If specified, shows all changes to the graph or plan, including minor differences, such as a change to the <x,y> coordinates of a component.

       -ignore-param-order
                   Valid for graphs or plans only. If specified, does not show differences in the order of graph, plan, task, or component parameters.

       -text       If specified, forces the two files to be treated as text, regardless of their actual types.

Example 1
To show the differences between two different graphs in  the filesystem:
          air sandbox diff mp/graph1.mp /disk1/sand/mp/graph2.mp
Example 2
To show the differences between two different plans in the filesystem:
          air sandbox diff plan/planA.mp /disk1/sand/plan/planB.mp

Example 3
To show the differences between a file in a sandbox and the same file in the EME datastore, at the version at which it was checked out, specify the path to the file in the sandbox:
air sandbox diff dml/customers.dml

Example 4
To show the differences between a graph in a sandbox and a specific version of the same graph in the EME datastore, specify the version and the path to the graph in the sandbox:
air sandbox diff -version 785 mp/graph.mp

Example 5
To show the differences between two versions of a text object in an EME datastore, specify both versions of the  object and the path to the object in the sandbox:
          air sandbox diff -version 785 -version 943 /sand/xfr/xfrA.xfr

The command returns an exit code of 0 if there are no differences to report, else it returns a non-zero exit code.