‎10-02-2020 05:13 PM - edited ‎10-02-2020 06:09 PM
Hi,
I'm using Hopex v1R3, desktop app.
I'm writing a vbscript to scan some environments/repositories for databases, and then generate all ddl.
I'm stuck on the "generation of database" part.
I'm sure it is possible to start this generation from the database object, in this vbscript (with parameters on where to save the ddl).
Can someone help me with the command and syntax?
(Attached a "visual" for clarification.)
Thx a lot.
Danny
Solved! Go to Solution.
‎13-02-2020 12:59 PM
Yes, This works. Thanks a lot for this. Very helpfull.
‎13-02-2020 12:03 PM
Hi,
you don't have to use Generation rule 'DB2 OS 390 V8::Database'" directly...
try with this sample:
set oRep = GetRoot
Set oDbs = oRep.GetCollection("Database")
Set oDb = oDbs.Item(1)
Set oRule = oRep.GetObjectFromId("~WIENN6s(tO30[Database Container RootLevel]")
print oDb.Name + " - " + oRule.Name
oDb.GenerateCode oRule,"C:\Temp\", true
Sny
‎11-02-2020 06:10 PM
I tried this from the script-editor
set oRep = GetRoot
Set oDbs = oRep.GetCollection("Database")
Set oDb = oDbs.Item(1)
Set oRules = oRep.GetSelection("select [generation rule] where [name] ='DB2 OS 390 V8::Database'")
Set oRule = oRules.Item(1)
print oDb.Name + " - " + oRule.Name
oDb.GenerateCode oRule,"C:\Temp\", true
No errors on executing, but this doesn't seem to do anything.
Any thoughts?