× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Randy,

Your environment sounds very much like ours. We have used CM (and its
predecessors) for 15+ years and I am very familiar with the 310, 312, 315,
317, 740, 741, 750, 751, et. al. and we too directly read and (in some
situations) update them.

I currently have a project where I will need to replace existing items and
when I saw SimLibCopyObject, I thought it might save me some coding time. I
have now heard back from IBM and they are investigating the use of
SimLibCopyObject. I'll report back when I get their final word.

Thanks for your comments - It is great to hear from a fellow CM user!

Joe

On 2/13/2008 at 4:03 PM, in message
<7C2E3FCA1052B443BA68C8FB11109D610123BC28@xxxxxxxxxxxxxxxxxxxxx>, Randy
Dufault<Randy_Dufault@xxxxxxxxxxxxxxxxxxx>
wrote:
SimLibCopyObject is only part of the puzzle. I suspect you are wanting
to copy an entire item, not just the object.
You'll need a whole bunch of calls:

Assuming you know the item id you want to copy:

SimLibCreateItem - creates a new target item
SimLibGetItemAffiliatedTOC - gets a list of the objects in the source
item
SimLibCopyObject - call for each object in the source item
SimLibStoreObject - call for each new object to insert into the target
(new) item

AFAIK IBM never did produce a usable set of RPG prototypes for these.

Since CM is a stable product and is unlikely to ever change, a lot of
the time we just read and write the tables directly. For the most part
you just need to copy all the columns from the pertinent existing
EKD0310, EKD0317 and EKD0312 rows, just changing the DOCID values and
DOCID relationships. New DOCIDS can be pretty much any 13 character
value. IBM only produces new ones that start with 'B'. You can copy the
file object with CPY. It's a bit more complicated if you need to store
on optical (need to write EKD0111 and EKD0371 rows).

Cheers,
Randy
-----Original Message-----


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.