the next trials....
1|A|A|1|111||111|20020202|20020303|FALSE|XXX|
1|A|A|1|111| |111|20020202|20020303|FALSE|XXX|

with "SET NULL '' " didn't either work with nor without
double quotes as delimiter.

Georg


Schildberg, Steffen wrote:
[EMAIL PROTECTED]">
Hi Georg,

[Georg wrote]

Subject: Re: error during repmcli / dataload / set command

Hi Steffen,

what I am trying is the mirgration from Adabas D 11 to Sapdb.

Ok, we did that already with Andreas Ernst (one of the members
on the list) and discovered/resolved some tiny problems. We'll
get this running, too.


[snipped command for extracting data and content of data file
- looked good to me]

/ *
DATALOAD TABLE USERDATA
"FIELD1" 1-14 CHAR
"FIELD2" 18-67 CHAR DEFAULT NULL
"FIELD3" 71-120 CHAR
"FIELD4" 124-173 CHAR DEFAULT NULL
"FIELD5" 177-186 CHAR DEFAULT NULL
"FIELD6" 190-209 CHAR DEFAULT NULL
"FIELD7" 213-232 CHAR DEFAULT NULL
"FIELD8" 236-243 CHAR DEFAULT NULL
"FIELD9" 247-254 CHAR DEFAULT NULL
"FIELD10" 258-267 CHAR DEFAULT NULL
"FIELD11" 271-290 CHAR DEFAULT NULL
"FIELD12" 294-547 CHAR DEFAULT NULL
INFILE *
DEC '/ /./'
DATE 'INTERNAL'
TIME 'INTERNAL'
TIMESTAMP 'INTERNAL'
NULL '? '
BOOLEAN 'TRUE /FALSE '

sapdb@server:~> repmcli -u user,pwd -d DB1 -b import.sql -p1 userdata

Looks good.


content of import.sql

SET DECIMAL '/ /./'

SET DATE INTERNAL

SET TIME INTERNAL

SET TIMESTAMP INTERNAL

SET NULL '? '

SET BOOLEAN 'TRUE /FALSE '

DATALOAD TABLE &1
"FIELD1" 1-14
"FIELD2" 18-67
"FIELD3" 71-120
"FIELD4" 124-173
"FIELD5" 177-186
"FIELD6" 190-209
"FIELD7" 213-232
"FIELD8" 236-243
"FIELD9" 247-254
"FIELD10" 258-267
"FIELD11" 271-290
"FIELD12" 294-547

INFILE 'userdata.dat'
<-------------------------------------------------------------
------------------------------>

First of all (and that resolves your current problem) empty lines and
lines beginning with slash are treated as comments by repmcli and not
send to the lserver. So the lserver is missing the infile in your
DATALOAD command (well, right the error message is somewhat misleading;
I'll work on it).
Second you may use almost the same syntax ADABAS provides. So you can use
the command created while extracting like

DATALOAD TABLE USERDATA
"FIELD1" 1-14 CHAR

[snipped some field descriptions]

"FIELD12" 294-547 CHAR DEFAULT NULL
INFILE '<file name>'
DEC '/ /./'
DATE 'INTERNAL'
TIME 'INTERNAL'
TIMESTAMP 'INTERNAL'
NULL '? '
BOOLEAN 'TRUE /FALSE '

You only have to change the "INFILE *" to "INFILE '<file name>'" because
RepMan does not support the INFILE *.

Next I will try to get a little bit more into the deepness of 
the xload
- program of Adabas and try another format for execution.
My first trys with the input file were like this


1|A|A|1|111|111|111|||FALSE|XXX|
-> Missing data for specified column FIELD2.

or
1|"A"|"A"|"1"|"111"|"111"|"111"|||"FALSE"|"XXX"|
-> Missing data for specified column FIELD8.

[snipped some variants of data file content]

All those tests were made with this script

[snipped some script entries]
DATALOAD TABLE &1
INFILE 'test.data' ASCII SEPARATOR '|'

To run the RepMan with the COMPRESSED format (default format) you
need to define a SEPARATOR and a DELIMITER or use the defaults
for all data. This means that contrary to ADABAS numerical values
like 1 must be included in delimiters if it is defined.
So you could try this
DATALOAD TABLE &1
INFILE 'test.data' ASCII SEPARATOR '|' DELIMITER ''

with the following data
1|A|A|1|111|111|111|||FALSE|XXX|

This defines 'no' delimiter and no delimiter is expected.
If you define a delimiter like in

DATALOAD TABLE &1
INFILE 'test.data' ASCII SEPARATOR '|'

(the delimiter is defined per default to ") your data should look
like this
"1"|"A"|"A"|"1"|"111"|"111"|"111"|||"FALSE"|"XXX"|

Ok, let me know if it works or if further errors arise.
Regards,
Steffen

-- 
Georg Thomé
Diplom Informatiker(FH)
Process Informatics    
                
IEE Luxembourg
zone industrielle
L-6468 Echternach
phone 00352/728989-6810
fax   00352/728989-6109
email [EMAIL PROTECTED]
web   www.iee.lu



Reply via email to