srinivas
10th November 2003, 12:36
In my system (un-licenced) when I take a table dump using the session ttaad4226m000 this what I am getting
EA|Eastern Area|
NA|Norther Area|
SA|Sothern Area|
WA|Western Area|
From some of our client's site we got the table dump using same session (licenced site) the output is
2002-08-22 17:39:54.837
#$!pre-dump!$#00017cv
E01|EASTERN REIGION|
N01|NORTHERN REIGION|
S01|SOUTHERN REIGION|
W01|WESTERN REIGION|
X01|EXPORTS / OVERSEAS|
There is some default text that is getting appended to evry file and hence I am unable to load their data in my system. Any one knows how to suppress this text and get data as my system gives.
I am on baan 4, NT while my clients are on solaris and NT. Same problem observed with both the client's data.
NvanBeest
10th November 2003, 12:46
First of all, this has nothing to do with being licenced or not, but is related to the portingset version.
Suppressing doesn't seem possible, but, if you delete the first two lines, the import will work correctly. So, just edit the dump, and remove those two lines.
srinivas
10th November 2003, 14:03
I have to import data from 3 companies of client's system into my system. That is whopping 9000+ tables and as many files. Manually it will takes weeks and months for me :(
NvanBeest
10th November 2003, 14:46
Then the only alternative is to upgrade your portingset to the same version as at the customer's site.
Brendan Shine
10th November 2003, 18:54
You could use sed to delete the first 2 lines in the file.
For example:
$ cat junk.111003
TEST LINE 1
TEST LINE 2
TEST LINE 3
TEST LINE 4
$ sed '1,2d' junk.111003
TEST LINE 3
The above would need to be put into a loop similar to the following:
cd directorywhereSfilesarelocated
for filename in `ls -1 *.S`
do
sed '1,2d' $filename > $filename.new
done
Sed can delete lines of a file based on the line number. To delete one or more lines in a file by line number use the following task definition.
#,#d
For example, the following sed command
$ sed '5,10d' myfile
deletes lines 5 through 10 of the file myfile. You do not have to specify a range of lines to delete. For example, delete line 5 of myfile.
$ sed '5d' myfile
A dollar sign ($) can be used to indicate the last line in a file. For example, delete lines 11 through the end of myfile.
$ sed '11,$d' myfile
This will output the first 10 lines of myfile.
http://unix.about.com/library/weekly/aa031802a.htm
NvanBeest
11th November 2003, 10:29
For the Solaris machine this is fine, and will work well.
But, is there a sed version for Windows?
Markus Schmitz
11th November 2003, 10:37
Good tip shine!
The sed command if perfect for your need. You can either do this on solaris before you transfer the files to your machine.
Or you install Cygwin on your windows box. Which will give you all needed commands, including the shell to execute them.
Enjoy
markus