how to run dynamic sdo like constructObject..

Posted by Admin on 25-Mar-2010 09:20

HI all,

I want to run one sdo by code. I have sdo's logical name.

please suggest.

regards,

kartikeya

All Replies

Posted by asthomas on 25-Mar-2010 09:27

What do you want to do with the SDO?

If you are tryng to use it to create data, you can do the following:

/* Define temp-table for update of timesheet table */
DEFINE TEMP-TABLE ttXXXXXRowObjUpd NO-UNDO
{pp/obj/xxxxxfullo.i}
{src/adm2/rupdflds.i}.


CREATE ttXXXXXRowObjUpd.

ASSIGN
ttXXXXXRowObjUpd.RowMod = "A":U
ttXXXXXRowObjUpd.RowNum = 100001.

ASSIGN
   ttXXXXXRowObjUpd.field = ...

RUN updateTableViaSDO IN gshGenManager (
INPUT "":U,
INPUT "

":U,
INPUT "OpenOnInit":U + CHR(3) + "FALSE":U, /* SDO Properties */
INPUT "", /* User Properties */
INPUT-OUTPUT TABLE ttXXXXXRowObjUpd) NO-ERROR.

Regards

Thomas

Posted by Admin on 25-Mar-2010 09:43

What exactly do you want to do?

Try this:

hRepositoryManager = DYNAMIC-FUNCTION ("getManagerHandle", "RepositoryManager") .

RUN startDataObject IN hRepositoryManager ("yourfullo",

                                           OUTPUT hSDO).

Posted by Admin on 25-Mar-2010 10:03

thanks mike..

Posted by Admin on 25-Mar-2010 10:07

this procedure also run initializeObject or we explicitly initialize? 

Posted by Admin on 25-Mar-2010 10:10

You're welcome.

I believe the fact, that launchContainer is part of the session manager and startDataObject is part of the repository manager will always remain a secret to those that were in charge at that time.

Posted by Admin on 25-Mar-2010 10:15

I don't expect it to do so (but a message in initializeObject would test - or the source code of the RY manager).

It certainly would be disturbing if it would do so if you need to set properties like the partition name, rowsToBatch, OpenQueryOnInitialize ect.

Posted by Peter Judge on 05-Apr-2010 12:27

mikefe wrote:

You're welcome.

I believe the fact, that launchContainer is part of the session manager and startDataObject is part of the repository manager will always remain a secret to those that were in charge at that time.

I can't profess to being in charge of anything, but since I am the person responsible for startDataObject(), I'll try to remember/explain why it's in the Repos Mgr. I'm fairly sure it has to do with the fact that the procedure directly accesses the (client-side object and class) cache temp-tables for performance reasons. No doubt, there are alternative ways of doing this that might be preferable, but that's what we decided to do at the time.

Also consolidation of the invocation/launching APIs into the Repos Mgr would probably also have been a bright thing to do (launchContainer was in the Session Manager from Day One, for reasons unknown to me).

-- peter

Posted by Peter Judge on 05-Apr-2010 12:28

kartikvbn wrote:

this procedure also run initializeObject or we explicitly initialize? 

Short answer is that you need to DIY.

You can inspect the source yourself: it's installed in $DLC\src\dynamics\ry\app\ryrepmngrp.i

-- peter

This thread is closed