I am supporting my co-worker on Natural migration from Unix to Linux, and one of the tasks is to transfer the objects from one site to other. One option would be to use IMPORT function; however, it seems this procedure needs to inform whether the object is in report mode or structured mode. As I have many of them, and they are developed mixing report and structured, I don’t have any option to leave the object as the origin.
So, is there a way to solve it, or do I need to transfer using SYSTRANS or SYSOBJH? Would be great if it is possible to use IMPORT function? Is there any trick to use SYSOBJH handling many libraries or not on Unix? My experience is on MF.
thank you for your information. I have tested using SYSOBJH online and it works. now, as Linux is not my expertise as well, I am trying to do it in batch mode, because I have many libraries to transfer. Using SYSOBJH command, as you are suggesting and I also am trying to do it, it seems that I need to execute the object OBJHCMD before, however, it is a little different than MF on batchmode.
The idea is to create a program that would read a sequencial file where the libraries are included, and then for each library I would build the command to transfer. So, if anyone knows how to create this procedure, I would appreciate it a lot, because I will spend a lot time testing.
I don’t have a Linux script to offer you, but here’s the Windows equivalent.
SET PATH=%PATH%;C:\Program Files\Software AG\Natural\6.3\Bin
echo sysobjh >%NATFILE%.inc
echo unload s* lib jcl objtype n >>%NATFILE%.inc
echo unload * lib junk objtype n >>%NATFILE%.inc
echo FIN >>%NATFILE%.inc
natural batchmode parm=NATBATCH CMSYNIN=%NATFILE%.inc CMOBJIN=%NATFILE%.inc CMPRINT=%NATFILE%.out CMPRT01=%NATFILE%.txt NATLOG=ALL BMSIM=MF
rem config file: CMWKF01=%natfile%.sag CMWKF04=%natfile%.prt
If ERRORLEVEL 1 GOTO :NATERROR
echo Error from Natural Step, check %NATFILE%.OUT for details
rem del %NATFILE%.out
rem del %NATFILE%.txt
You must define Work 1 (unloaded objects) and Work 4 (optional report) in your NatParms via the Natural Configuration Utility.
For this test, I generate the ObjH parameters in-stream using ECHO commands. You’ll provide .INC as a separate file.
Your proposal to read and edit a list of library names seems overly complicated to me. Is the list created manually or computer-generated? Is it very dynamic? Is it very large but not a complete set? Wouldn’t wildcards help? (eg LIB * or LIB rgz*)
Thank you very much for the information and script, I appreciated a lot.
Unfortunately, I cannot copy the entire fuser, because the customer wants to take advantage to the moment to clean up the environment. So, there are some libraries that need to be copied and other not.