We are looking to switch our daily Natural objects backup from SYSUNLD NATUNLD to SYSOBJH UNLOAD. Using NATUNLD, we only backup selected libraries. When I switch to SYSOBJH, it tries to backup ALL libraries, whether they exist or not in Natural Security. We don’t want all libraries, only specific ones. When it tries to unload a library that does not exist in Nat Sec, it gives us a ‘NAT4889 Function disallowed by security definition. (XXXXXXX)’ error. The unload continues, but we get a CC 0060. Even if a library is defined in Nat Sec, but you don’t want it unloaded, it still unloads it.
I can work around this by setting up a PARM module with a SYSOBJH UNLOAD statement for each library we want and it works. The problem with using this method is if we create a library, we have to remember to add it to the list.
I have defined the specific libraries in NATURAL SECURITY>MAINTENANCE>Utilites>SYSOBJH, however, SYSOBJH seems to ignore this list.
SYSOBJH processes only libraries that are defined in NSC (if flag ‘Transition period logon’ is set to ‘N’ in ‘General options’ of Natural Security). For each existing library that is defined in NSC the settings of the corresponding utility profile for SYSOBJH are checked and a corresponding error message is issued if the function is disallowed.
To handle CC0060 SYSOBJH provides a user exit routine (see SRC-EX01 in library SYSOBJH).
If you want to unload specific libraries only, SYSOBJH allows specifying LIST Workplans or PROCEDURE Workplans.
In a LIST Workplan the libraries to be processed are specified, e.g.
LIBRARY LIB1 ( * )
LIBRARY LIB2 ( * )
a.s.o.
and the corresponding command to unload the definitions of the LIST workplan named LISTWP1:
UNLOAD ( LISTWP1 ) WHERE BATCHREPORT
In a PROCEDURE Workplan the SYSOBJH commands to be processed are specified, e.g.
UNLOAD * LIB LIB1 OBJTYPE N where batchreport;
UNLOAD * LIB LIB2 OBJTYPE N where batchreport;
a.s.o.
And the corresponding command to unload the definitions of the PROCEDURE workplan named PROCWP1:
EXECUTE ( PROCWP1 )
See the corresponding documentation chapters.