SYSOBJH - how to use

Hello,

I am trying to use SYSOBJH… I know it’s replacing SYSTRANS and SYSUNLD and all those other useful utilities. I can’t figure out how to unload DDMs based on the documentation or any other posting here.

I’ve tried all kinds of permutations of:

LOGON SYSTEM
SYSOBJH
UNLOAD *,OBJT,DDM
EXIT
FIN

with commas, without commas, different lines, same lines, etc.

Is there a useful document with examples of all the different uses of SYSOBJH? A five-day class on SYSOBJH? A university with a reputable degree offering (PhD, SYSOBJH)?

Thanks in advance!

Object Handler is a bit daunting because it can do so much. I like the graphical interface on Open Systems, but on the mainframe, I find the batch option easier to use and avoid the on-line screens.

Here’s what I use:

//UNLDDDM  EXEC NATBT
//CMPRINT   DD SYSOUT=*                             
//CMWKF01   DD DSN=ddms.will.be.here,
//             DISP=(NEW,CATLG,DELETE),             
//             UNIT=
//             SPACE=(CYL,(10,3),RLSE),             
//             RECFM=FB,LRECL=102
//CMSYNIN   DD *                                     
%Q                                                  
SYSOBJH                                             
UNLOAD * LIB natliby OBJTYPE D
SHOW STATISTICS                                     
FIN                                                 
/*                                                  

For transfer between platforms, you’ll need the TRANSFER option:

UNLOAD * LIB natliby OBJTYPE D WHERE TRANSFER

The parameters are a bit different for programming objects and FDTs.

All this is documented under Tools and Utilities.

Thanks, Ralph.

The LRECL=102 gave me trouble, but I saw in another thread that someone else had the same error:

Natural error 1512 occurred in line 1580 of program OUNWRHDR

I applied the solution there to make it RECFM=VB,LRECL=4624 and it worked.

Wish the Tools and Utilities section was a bit more plain… thought I was following it the way it was written and none of that seemed to work.

Anyway, this got me working at least for DDMs. Maybe I can use this as a template for the other types (Natural objects, FDTs, etc).

Sorry about the LRECL - old JCL that works about 90% of the time. Use 220 for 100% success. And I prefer RECFM=FB, especially since I ship most unloads to a Windows server.

//CMSYNIN DD *
GLOBALS LS=220

Here are more examples:

UNLOAD ddm-name LIB nat-lib OBJTYPE D WHERE TRANSFER
UNLOAD *        LIB nat-lib OBJTYPE D WHERE TRANSFER
UNLOAD *        LIB nat-lib OBJTYPE N WHERE TRANSFER
UNLOAD *        LIB nat-lib OBJTYPE N NATTYPE GLA WHERE TRANSFER
UNLOAD FDT DBID 123 FNR  12 WHERE TRANSFER
UNLOAD FDT DBID 123 FMFNR 1 TOFNR 500 WHERE TRANSFER


LOADALL WITH NEWLIBRARY new-lib WHERE TRANSFER REPLACE
LOAD old-name LIB old-lib OBJTYPE N WITH NEWNAME new-name NEWL new-lib

Many thanks, Ralph! This is a tremendous help for me.

UNLOAD FDT DBID 123 FNR 12 WHERE TRANSFERERROR

the above worked fine with any problem but when I try to LOADALL I got the following message:

ERROR 148 RETURNED FROM ABSOPN (OPEN WITH AOS)

  • are you running SYSOBJH on the mainframe or Linux or where? what version of Natural?
  • I looked through Natural for Unix and Natural for Mainframe and cannot find the term “TRANSFERERROR” anywhere. Can you point out the documentation reference for this? And/or what you expect the WHERE TRANSFERERROR to do? The WHERE TRANSFER clause identifies a transfer file format.
  • what is the content of the unload file? should be readable in a text editor
  • what is the full LOADALL statement you used?

The error 148 usually indicates that the application can’t find the database (DBID) that you specified (or let default). Please check your FDTDBID/NEWFDTDBID parameter settings. See the documentation [url]https://techcommunity.softwareag.com/ecosystem/documentation/natural/nat912unx/utis/sysobjh_parm.htm#sysobjh_parm_fdtdbid[/url] for further details.

Note that the UNLOAD FDT writes out the FDT in Predict format. LOAD FDT writes to the ADAFDUWORKFILE in ADAFDU format, suitable for running the ADAFDU utility.

UNLOAD FDT DBID 123 FNR 12 WHERE TRANSFERERROR

Its a mistake I means TRANSFER and not TRANSFERERROR

I am running SYSOBJH in the mainframe in environment.

Unloaded file is in the text format and I can read it.

LOADALL WHERE TRANSFER REPLACE

I don’t believe that LOADALL is valid for FDTs. Many years ago I created a program to load one FDT at a time from an Object Handler file containing all the FDTs from a source database. It generated

LOAD FDT DBID db-t FNR fnr-t WHERE TRANSFER

for a list of known file numbers, replacing db-t with the target DBID and fnr-t with a specific file number.

UNLOAD

UNLOAD FDT DBID 30 FNR 524 WHERE TRANSFER

The file is created successfully and I can read it without any problem.

LOAD

LOAD FDT DBID 90 FNR 524 WHERE TRANSFER REPLACE ALL

Error Message: Nothing found for this request

LOAD FDT DBID 90 FNR 524 WITH FDTDBID 30 FDTFNR 524 NEWFDTDBID 90 % NEWFDTDBID 524 WHERE TRANSFER REPLACE ALL

Error Message: Nothing found for this request

LOADALL WHERE TRANSFER REPLACE ALL

Error Message: ERROR 148 RETURNED FROM ABSOPN (OPEN WITH AOS)

DBID and FNR define the search criteria, not the target settings (as pointed out by George in a related post).

Same as above. Try setting DBID 30.

I found this in the documentation under Object Specification - FDTs:

  • DBID A valid DBID or 0 for all DBIDs.
  • FNR A valid FNR or 0 for all FDTs

Caution: I don’t know whether this would honor a NEWFDTDBD setting.