Hi Marco,

[Watz wrote]
> 
> That would mean I could simply parse the DDL file created 
> with CATALOGEXTRACT USER for "CREATE TABLE" statements and 
> build a list of tablenames for the DATALOAD RepMan commands I 
> have to create. Sounds very easy at least for a complete user 
> extract. I already have the extracted catalog from my 
> SAPDB6.2 database (its a 14MB file!), so I will try that 
> later today with a small java app. The app should be able to 
> take the SAPDB6.2 DDL file and produce 
> 
> 1.) a xload batch file containing all the DATAEXTRACT FOR 
> DATALOAD statements in the right order
> 2.) a RepMan batch file containing all the DATALOAD 
> statements in the right order
> 3.) a new RepMan CATALOGLOAD DDL file containing only 
> sequence and view definitions to be loaded later (the 
> tables+indices will be done by DATALOAD first)
> 
Yes, completely right.

Rather than to create the dataload
statements by parsing the DDL file you could use the dataload
statements created by Xload upon extracting the data and simply put them
together into one file which could be used to feed repmcli.
DATAEXTRACT FOR DATALOAD creates CREATE TABLE commands + 
DATALOAD commands + CREATE INDEX commands for a certain table.
If you use the APPEND option in the DATAEXTRACT FOR DATALOAD
commands for the command files all DDL statements would
go into a single file (supposing the same file name in every stmt,
of course ;) ).
If I remember right the DATAEXTRACT statement in ADABAS could than
look like this using the APPEND option for the ddl file:
DATAEXTRACT FOR DATALOAD
 TABLE <table name>
 OUTFILE <file name.ddl> APPEND
 OUTFILE <file name.data>

One pitfall in the DDL file would be the command separator. For repmcli
you need a double slash not a single slash. Another one is the keyword
DEC used by ADABAS where we use DECIMAL. And you need to replace the
keyword COMPRESS (if used as format) by COMPRESSED.
And do not use outfile/infile *. That's not supported by RepMan.

What I wanted to say is that step 2 isn't necessary but can be done
by Xload (and some manual tuning) when running the file created in step 1.

> As far as I understood (correct me) the table with catalog 
> information created with SAVE CATALOG can help in building a 
> list of consistent DATALOAD statements for one or more tables 
> with their dependencies, but I would have to evaluate the 
> table myself just like xload/RepMan do it internally. However 
> correctly evaluating this table sounds like a "cleaner" way 
> than parsing the DDL file, just more work. We should probably 
> put up the table description up on the SAPDB wiki, too.
> 
Well, that's right, too. You would have to evaluate the table
by yourself. It isn't too hard but parsing the DDL file is easier
for the first step.

Regards,
 Steffen
-- 
Steffen Schildberg
SAP DB Team
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to