# Copy the object code of a program whose source is deleted.

**URL:** <https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes, Adabas-Natural-Cloud\
**Created:** [September 14, 2010, 8:04pm UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663 "2010-09-14T20:04:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Girish3](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@Girish3](https://techcommunity.softwareag.com/u/Girish3)\
**Post date:** [September 14, 2010, 8:04pm UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663/1 "2010-09-14T20:04:19Z")

</div>

Hi all,

I have a program, whose source has been deleted.  
I was wondering if there is a way of copying this program (which only has object code) from 1 library to another.

---

<div class="post-metadata">

**Author:** ![Brian\_Johnson1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/brian_johnson1/32/163_2.png) [@Brian\_Johnson1](https://techcommunity.softwareag.com/u/Brian_Johnson1)\
**Post date:** [September 14, 2010, 9:21pm UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663/2 "2010-09-14T21:21:25Z")

</div>

Hi Girish,

It is very much possible to copy modules with object only (no source) with the SYSMAIN utility. Please contact your Natural administrator to request this if it is needed to be done.

Also, you may wish to ask your Natural admin if there are any backups of the system files or NATUNLDs laying around that might still have the source code.

If your shop has N2O installed, it may contain the source code as well in its archives. Again, you should discuss this further with your Natural admin.

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [September 14, 2010, 9:53pm UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663/3 "2010-09-14T21:53:12Z")

</div>

In many shops SYSMAIN is secured for use only by Natural Administrators. If so, try Object Handler (SYSOBJH).

---

<div class="post-metadata">

**Author:** ![Brian\_Johnson1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/brian_johnson1/32/163_2.png) [@Brian\_Johnson1](https://techcommunity.softwareag.com/u/Brian_Johnson1)\
**Post date:** [September 14, 2010, 10:06pm UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663/4 "2010-09-14T22:06:54Z")

</div>

In many shops, SYSOBJH is also not freely opened up to all.

Definitely, the theme here is speak with your Natural administrator for help in migrating object code without source and/or restoring source from any backups or archives that may exist.

---

<div class="post-metadata">

**Author:** ![Girish3](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@Girish3](https://techcommunity.softwareag.com/u/Girish3)\
**Post date:** [September 15, 2010, 10:40am UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663/5 "2010-09-15T10:40:56Z")

</div>

SYSMAIN worked well with programs in normal libraries.  
The reason I asked this question was to copy one of the Natural APIs (USR1058N) from SYSEXT library to my library. When i used SYSMAIN, it gave me an error “4890:Invalid owner/co-owner confirmation.(SYSEXT)”.

Is there any other way to use Natural APIs ?

Also i found that we can put SYSEXT as a steplib to our library, the procedure of which i am not aware.

Your help is much appreciated!

---

<div class="post-metadata">

**Author:** ![Ats](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@Ats](https://techcommunity.softwareag.com/u/Ats)\
**Post date:** [September 15, 2010, 12:11pm UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663/6 "2010-09-15T12:11:49Z")

</div>

Girish,

Below are my points:

1. The Natural APIs (subprograms) are always cataloged objects hence source code of API USR1058N is not deleted but not made available by SAG (to any customer :?: ). Hence I doubt if it can be retrieved by any means.

2. When you’re trying to copy the object from SYSEXT to your library, you lack the necessary access.

3. Ask your Natural admin if the SYSEXT system library is defined in the FNAT system file as a steplib (should be 8)) library for the user library which contains the Natural objects that use this API. If so, no API-specific actions are required when upgrading your Natural version. You then simply access this with CALLNAT ‘API-name’. Keep in mind to have any LDAs, PDAs need.

4. Sample program (how to use it) USR1058P can be found in SYSEXT library (if you are permitted). Try copying just this program into your library (how :?: , check the last point) and it should work fine (without any necessity of steplib if already defined by your admin).

You can work around with this program (in your library) for any additional requirements.

1. The procedure of putting SYSEXT as a steplib is briefly expained in point 3. Your Natural admin would be more than happy to do this for you.

2. If you don’t have right to copy objects from SYSEXT using SYSMAIN/SYSOBJH but can logon to SYSEXT and edit programs (not APIs i.e. subprograms) use below commnads on command line:

This should make a copy (source & cataloged object) of USR1058P in your library with same name.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Girish3](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@Girish3](https://techcommunity.softwareag.com/u/Girish3)\
**Post date:** [September 16, 2010, 11:52am UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663/7 "2010-09-16T11:52:33Z")

</div>

I will contact my Adabas DBA, Thanks all for your help!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:59pm UTC](https://techcommunity.softwareag.com/t/copy-the-object-code-of-a-program-whose-source-is-deleted/94663/8 "2021-04-02T14:59:03Z")

</div>


