In the ongoing effort to use cool and interesting tools for application and database updating it has been very nice to see the geninsertdbc.bat tool put into practical use. Harnessing these tools to create DBC files can be very advantageous if you are still getting all the available commands and syntax down to master them. So, let’s look at a scenario where I needed to update a Maximo automation script.
The required solution is to update a pre-existing automation script with new code for the source field in the autoscript table as well as update the scriptlanguage field. The caveat is that the script language (python) requires proper formatting to execute correctly. In the first attempt I tried to update the automation script via a freeform insert in the DBC’s statements section using SQL line breaks and indentation syntax.
While this did achieve the outward appearance that I wanted Maximo was not “sold” on the line spacing and indentation of the ( CHAR(13) or CHAR(9) ) SQL syntax and the automation script would not run after the server(s) were restarted.
Now, to get to the fun part. An alternate method was suggested on how to get this information into Maximo via the geninsertdbc.bat tool. IBM has tools available that can auto generate DBC files based on parameters that you give the output tool at the command prompt. I reset the automation script’s source code with the python source code that was previously working, and I opened an administrative command prompt then navigated to the ..\maximo\tools\maximo\internal directory under the Maximo installation folders.
I ran the following command: C:\IBM\SMP\maximo\tools\maximo\internal>geninsertdbc.bat -tautoscript -w"autoscript = 'ITEMDELETION'" -ftest2 -ca3jgroup
To break this down lets look at the parameters given for the command.
-t: will pull from the table
-w: will specify a where clause
-f: will name the output file
-c: will point the file to a directory of your choosing
After the geninsertdbc.bat tool is run there will be an output file created which will look similar to this.
In this file we have the column information extracted from the database and formatted in the XML layout of a DBC file ready to be either edited or re-added to Maximo via the runscriptfile.bat command. What I was able to use from this file was the character string that the geninsertdbc.bat placed around the source string (
) which is the character string that allows for spacing and line breaks while inserting into databases via the DBC file method.
I then took this info and created a DBC file that would update as opposed to insert into the database. The source COLUMNVALUE took some effort to get the correct spacing and breaks in place, but when you run the script and restart the server(s) your automation script will run without any further efforts.
This really is just a scratch of the surface of what you can do with auto generating DBC files. Further uses can only truly be explored/acknowledged by trying this method on other tables to see the results that may come from it and applying the built-in functionality detailed in files like the script.dtd file for manipulating the data to be added/changed.
An outstanding source for learning about DBC files is located on this IBM Developer Works page. I encourage anyone interested in this to go through this content and then try to apply it to your day to day tasks.
Greg Valladares is a Maximo Technical Support Analyst with 6 years of Maximo installation, configuration, administration, and support. Greg enjoys seeing when the lightbulb goes on for someone using Maximo or any technical product and knows that person has just added a valuable tool to their arsenal of skills that they will continue to use for years to come. When Greg is not working on computers he enjoys playing music on one of the instruments he badly attempts to play as well as growing food in his backyard and seeing tangible results such as the peppers being made into a new hot sauce flavor.
MxApprove End User License Agreement
If you agree to the terms of this MxApprove End User License Agreement (the “License Agreement”), click the Accept License Agreement button after reviewing the contents of this License Agreement to proceed with accessing the MxApprove (the “Application”). IF YOU DO NOT AGREE TO THE TERMS OF THE THIS LICENSE AGREEMENT, YOU WILL NOT HAVE ACCESS TO THE APPLICATION.
This is a license agreement between you, as the licensee and A3J Group LLC, a Delaware limited liability company, (“A3J”), its successors and assigns, its affiliated companies, and its authorized distributors and resellers as the licensor. This is not a contract for sale of the Application, but a license to use the Application subject to the terms and conditions of this License Agreement. Please read the terms carefully. You and A3J agree as follows:
Application.
The Application is the property of A3J. The term Application includes any related documentation, updates and permitted copies of the Application licensed to you by A3J. A3J expressly reserves all rights not expressly granted you.
Scope of License.
Upon your acceptance of the terms contained in this License Agreement, A3J grants you a nonexclusive, nontransferable, limited right to use the Application for personal or business use on the Licensed Devices, as defined below. The term "Use" means to install and access the Application in conjunction with the Application’s related and compatible software.
“Primary Device” shall mean the mobile device, tablet or other device compatible with applications owned or controlled by you, on which you download and install the Application and agree to be bound by the terms of this License Agreement and any other agreement associated with the Application. “Licensed Devices” shall mean the Primary Device and any other device that synchs or otherwise shares the same cloud or backup identification as the Primary Device.
This License Agreement does not allow you to use the Application on any device that you do not own or control. You may not distribute or make the Application available over a network where it could be used by multiple devices at the same time. You may not rent, lease, lend, sell, redistribute or sublicense the Application. You may not assign any right granted under this License Agreement without A3J’s prior written consent. You may not copy the Application. YOU AGREE THAT YOU WILL NOT MODIFY, ADAPT, TRANSLATE, ALTER NOR CREATE DERIVATIVE WORKS OF THE APPLICATION. YOU FURTHER AGREE THAT YOU WILL NOT REVERSE ENGINEER, DECOMPILE, DECRYPT, DISASSEMBLE, NOR SEEK TO DISCOVER THE SOURCE CODE OF THE APPLICATION OR ANY UPDATES ASSOCIATED THEREWITH. IF THE APPLICATION CONTAINS EMBEDDING BITS THAT LIMIT THE CAPABILITIES OF THE APPLICATION, YOU MAY NOT CHANGE OR ALTER THE EMBEDDING BITS.
Embedding of the Application is prohibited. You may NOT otherwise embed the Application. For example and without limitation: (i) You may NOT embed the Application into your hardware, software or other products, such as, application programs, electronic games, e-books, kiosks, printers, etc.; (ii) You may NOT embed the Application into your web pages; and (iii) You may NOT embed the Application into electronic commercial documents. This means that the Application may not be embedded or otherwise used in non-static files that may be accessed by computers or other devices that are NOT Licensed Devices.
A breach of these restrictions may subject you to prosecution and damages, including but not limited equitable relief in the form of an injunction.
Any updates or supplements to the Application will be governed by this License Agreement, unless a separate license agreement accompanies the update or supplement.
Intellectual Property Rights.
The Application, and any trademark, copyrights, patents, or any rights associated with the same, are the intellectual property of A3J. A3J reserves all of its rights under applicable laws. You acknowledge that the structure, organization and code of the Application are valuable trade secrets and confidential information of A3J and you shall not use this proprietary content, information or materials in any way except as expressly permitted under this License Agreement.
No Other Use.
You are granted only the rights expressly stated in this Agreement, and you may not use the Application for any other use or purpose. In addition to other prohibited uses described in this Agreement and without limitation, the following uses are specifically prohibited: (i) You may not share the Application with other individuals or business entities; (ii) You may not use the Application on more than the permitted Licensed Devices; (iii) You may not change the name of the Application; (iv) You may not translate the Application into other platforms.
Consent to Use Data.
A3J may collect and use technical data and related information, including but not limited to technical information about your device, system and application software gathered periodically to facilitate the provision of software updates, product support and other services related to the Application. A3J may use this information, provided this use does not personally identify you, to modify or further develop the Application and/or provide additional technologies to you.
Termination.
The license rights granted under this License Agreement are effective until terminated by you or A3J. Your rights under this License Agreement will terminate automatically without notice from A3J if you fail to comply with any of the term(s) of this License Agreement. Upon termination of the license, you shall cease all use of the Application, and destroy all copies, if any, full or partial, of the Application.
No Warranty.
YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT USE OF THE LICENSED APPLICATION IS AT YOUR SOLE RISK. TO THE EXTENT PERMITTED BY LAW, THE APPLICATION IS PROVIDED “AS-IS” AND “AS AVAILABLE,” WITH ALL FAULTS AND WITHOUT WARRANTY OF ANY KIND. A3J DOES NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULTS YOU MAY OBTAIN BY USING THE APPLICATION. A3J MAKES NO WARRANTIES, CONDITIONS, REPRESENTATIONS OR TERMS, EXPRESS OR IMPLIED, WHETHER BY STATUTE, COMMON LAW, CUSTOM, USAGE OR OTHERWISE AS TO OTHER MATTERS, INCLUDING WITHOUT LIMITATION, NON INFRINGEMENT OF THIRD PARTY RIGHTS, TITLE, INTEGRATION, SATISFACTORY QUALITY, MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. FURTHER, A3J MAKES NO WARRANTIES AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE APPLICATION OR THAT THE APPLICATION WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION AND USE OF THE APPLICATION WILL BE UNINTERRUPTED OR ERROR-FREE OR THAT DEFECTS IN THE APPLICATION WILL BE CORRECTED. IN THE EVENT THE APPLICATION PROVES DEFECTIVE, YOU ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES OR LIMITATIONS PLACED ON STATUTORY RIGHTS, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
Damage Limitations.
TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT SHALL A3J BE LIABLE FOR PERSONAL INJURY, OR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES WHATSOEVER, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, LOSS OF DATA, BUSINESS INTERRUPTION OR ANY OTHER COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OR INABILITY TO USE THE APPLICATION, HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT OR OTHERWISE) AND EVEN IF A3J HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall A3J’s cumulative liability for any loss or damage to you (other than as may be required by applicable law in cases involving personal injury) exceed the amount of fifty dollars (US$50.00). The foregoing limitations will apply even if the above-stated remedy fails of its essential purpose.
No Export or Re-Export.
You may not use or otherwise export or “re-export” the Application. Specifically, and without limitation, you may not export or re-export the Application into (a) U.S. embargoed countries or (b) to anyone on the U.S. Treasury Department’s list of Specially Designated Nationals or the U.S. Department of Commerce Denied Person’s List or Entity List. By downloading and installing the Application and agreeing to the terms of this License Agreement you represent and warrant that you are not located in such a country or a person or entity on any such list. You further warrant and represent that you will not use the Application for any purpose prohibited by the laws of the United States.
Governing Law.
This Agreement is governed by the laws of the State of Florida, United States of America, excluding conflict of laws provisions and excluding the United Nations Convention on Contracts for the International Sale of Goods. You expressly agree that any disputes related to this Agreement will be resolved in the Circuit Court of Hillsborough County, Florida, U.S.A., or the United States District Court for the Middle District of Florida, U.S.A. Both you and A3J consent to the personal jurisdiction and venue of those courts. If any part of this Agreement is found void and unenforceable the balance of the Agreement will remain valid and enforceable according to its terms.
This License Agreement represents the entire agreement between you and A3J in connection with its subject matter. This License Agreement may only be modified by A3J in a writing that expressly states that the writing is intended to modify this License Agreement.
Contacting A3J.
A3J has a mailing address of 3225 S. MacDill Avenue, Tampa, Florida 33629, U.S.A. All support requests, completed registrations and other inquiries should be sent via e-mail to info@a3jgroup.com.