Examples

This topic shows two example MQL sessions.

This page discusses:

Simple Export

This MQL session shows two baseline export files being created.

MQL CommandsDescription
MQL<1>set context user Administrator; MQL<2>xml on; Line 2 places the session into XML mode. All subsequent export commands will generate export files in XML format.
MQL<3>export program A* into file d:\enoviaV6R2011\studio\xml\program1.xml; Line 3 exports all programs that start with "A".
MQL<4>export person * into file d:\enoviaV6R2011\studio\xml\person1.xml;

MQL<5>quit;

Line 4 exports all persons.

Export with Comparisons

This MQL session shows several comparisons being performed using the baseline export file person1.xml. It is assumed changes have occurred in the database, or the session is being performed on a different database.

CommandDescription
MQL<1>set context user Administrator;
MQL<2>compare person "Joe C*" from file
     d:\enoviaV6R2011\studio\xml\person1.xml;
 0 objects have been added.
 0 objects have been removed.
 0 objects have been changed.
 5 objects are the same.
Line 2 compares all person objects that start with "Joe C" with the baseline file person1.xml. Since no log file is specified, no report is generated. (Not having a log file would typically be done to see if anything has changed.) The summary message states that none of the five objects analyzed have changed.
MQL<3>compare person "Joe C*" workspace 
     from file d:\enoviaV6R2011\studio\xml\person1.xml
0 objects have been added. 
0 objects have been removed. 
1 object has been changed. 
4 objects are the same.
Line 3 performs the same compare but also includes workspace items assigned to the persons. The results now show that there has been a change. To view the changes, a report must be generated.
MQL<4>verbose on; Line 4 turns on verbose mode.
MQL<5>compare person "Joe C*" workspace  
     from file d:\enoviaV6R2011\studio\xml\person1.xml 
     use log d:\enoviaV6R2011\studio\xml\person1w.log; 
0 objects have been added. 
0 objects have been removed. 
1 object has been changed. 
4 objects are the same. 
compare successfully completed.
Line 5 performs the previous compare but also gives a log file to place the report into. The resulting report can be found in Log File.

This portion of the MQL window shows a continuation of the previous session. Here, the baseline export file program1.xml is used for several more comparisons. The sections that follow show the contents of the files used in the compare commands.

CommandDescription
 MQL<6>verbose off;
 MQL<7>compare program A* from file
     d:\enoviaV6R2011\studio\xml\program1.xml use log
     d:\enoviaV6R2011\studio\xml\program1.log map
     d:\enoviaV6R2011\studio\xml\program1.map;
2 objects have been added.
0 objects have been removed.
3 objects have been changed.
11 objects are the same.
compare successfully completed.
Line 7 performs a compare on all program objects that start with the letter "A" but also includes a map file that identifies a rename of one of the program objects. For more information, see program1.map and program1.log. "Use" is only used once even though two files are used (a log file and a map file).
MQL<8>verbose on;
 MQL<9>compare program A* from file
     d:\enoviaV6R2011\studio\xml\program1.xml use log
     d:\enoviaV6R2011\studio\xml\program2.log map
     d:\enoviaV6R2011\studio\xml\program1.map; 
2 objects have been added.
0 objects have been removed.
3 objects have been changed.
11 objects are the same.
compare successfully completed.
Line 9 performs the same compare as in Line 7 but with verbose mode turned on. Look at the two reports (program1.map and program2.log) to see the difference between verbose off and on.
 MQL<10>compare program A* from file
     d:\enoviaV6R2011\studio\xml\program1.xml use log program3.log map
     d:\enoviaV6R2011\studio\xml\program1.map exclude
     d:\enoviaV6R2011\studio\xml\program1.exc;
2 objects have been added.
0 objects have been removed.
2 objects have been changed.
Line 10 performs the same compare but adds an exclude file that eliminates two program objects from the analysis (thus leading to two fewer objects mentioned in the results). For more information, see program1.exc and program3.log.