How To Copy OCM Records From One Environment To Another Using SQL
Share
This method can be used to copy any records in a database but the issue that I was trying to resolve was to copy 8 records in the Object Configuration Management (OCM) file, F986101, of one object to another object.
INSERT INTO SY900/F986101( OMENHV, OMOBNM, OMDATP, OMUGRP,OMOAPP, OMDATM, OMSY, OMSTSO, OMPID, OMFUNO, OMUSER, OMJOBN, OMOCM2, OMUPMJ, OMUPMT) (SELECT OMENHV, '', OMDATP, OMUGRP, OMOAPP, OMDATM, OMSY, OMSTSO, 'SQL', OMFUNO, ' ', ' ', OMOCM2, , FROM SY900/F986101 WHERE OMOBNM=' ')
When using this SQL you will need to replace the following:
- <NEW_OBJECT> – The target object to which you would like to copy the records.
- <USERID> – (optional) The UserID that you would like to credit making this change.
- <6DIGITDATE> & <6DIGITTIME> – (optional) The JDE Date and Time that you are making the change.
- <ORIGINAL_OBJECTID> – The ObjectID of the OCM record that you wish to copy.
This method can also be used to copy OCM records from one environment to another by setting the environment in the select statement and where clause.
Author
Stewart Schatz
More Stories
Quick Tip: IBM Navigator for i Default URL
This is a really quick one but I keep forgetting it: http://<SERVERNAME>:2004/ibm/console
Windows God Mode… What!?!
Windows God Mode is a hidden feature in the Windows operating system that allows users to access all of the system’s control panel options and settings in a single place.
How To Test A SQL Server Connection
There is an easy way to test your SQL Server connection when running Windows without any special software. I found...
4 Lines To Export Outlook Rules To Excel/CSV Using PowerShell
I used to use a ton of Outlook Rules to organize the thousands of emails that I receive each day....
Get The Size & Record Count Of All Tables In A SQL Server Database
Use the SQL query below to display the size and record count of all tables in an SQL Server database....
How To Get AS400/iSeries Job Queue Information Using SQL
I received a request the other day about the JD Edwards EnterpriseOne job queues and what the maximum number of...
Average Rating