04-02-2008
Join the data in two files
hello friendz...
I have multiple around 6 files in the folder I have to load the each file to the different tables in DB2 database.
List of tables is present in a file called table_list.txt file
MR_Detail_1
MR_Detail_4
MR_Detail_5
Note:-
LET.MRTEST.BBBB.txt present in xyz folder should be loaded into MR_Detail_1 table
LET.MRTEST.CCCC.txt present in xyz folder should be loaded into MR_detail_4 table
LET.MRTEST.DDDD.txt present in xyz folder should be loaded into MR_detail_5 table
There are around 6 columns in the database and the data comes from the file.
Format for the file
3412222240171M41006422373273564021006SDFGHJRSGJBBBBBBBBBBBBBBBBBBBB
0009546640171M41006400373273564531345TTTTPAPAPABBBBBBBBBBBBBBBBBBBB
Each file contains this type of data .How will I write my shell script so that my code picks the file automatically from xyz folder and keep loading on the Table_list.txt.There should me mapping between the Files and tables
What do you suggest shall I keep this mapping between file name and table in 1 file and read this file..how can do this
like creating this format file
LET.MRTEST.BBBB.txt MR_DETAIL_1
LET.MRTEST.BBBB.txt MR_DETAIL_4
LET.MRTEST.BBBB.txt MR_DETAIL_5
AND READING these elements and substituting in my loadutility command how can I do this...please help me
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can you please help me with writing script for following purpose.
I have to divide single large web access log file into multiple log files based on dates inside the log file.
For example:
if data is logged in the access file for jan-10-08 , jan-11-08 , Jan-12-08
then make small log file... (1 Reply)
Discussion started by: kamleshm
1 Replies
2. Shell Programming and Scripting
Hello,
I have two files that have the date field as a common. I request your help with some script that divide the value of the file1 by the value in the file2 only when the field date are the same between both files and create a new text file.
This is a sample of the files
file1... (1 Reply)
Discussion started by: csierra
1 Replies
3. Shell Programming and Scripting
Hello everyone!
I have 2 types of files in the following format:
1) *.fa
>1234
...some text...
>2345
...some text...
>3456
...some text...
.
.
.
.
2) *.info
>1234 (7 Replies)
Discussion started by: ad23
7 Replies
4. Shell Programming and Scripting
I have two files that have the date field in common. I request your help with some script that divide each field value from file1 by the correspond field value of the file2 only when the field date is equal in both files. Thanks in advance !
This is a sample of the files
file 1
12/16/2010,... (2 Replies)
Discussion started by: csierra
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a file abc.dat. It contains the fileds of empid, empname, empcity. each city contains 10 records. i want to create the city file and pass the same city records into the file. I don't know the city names.
In unix using awk command how can we do?
abc.dat:
1 john delhi
2... (2 Replies)
Discussion started by: raghukreddy.ab
2 Replies
6. Shell Programming and Scripting
frnds:
i want to divide data on the behalf of dotted line and redirectd into new files
)
-------------------------
M-GET CONFIRMATION (
-------------------------
M-GET CONFIRMATION (
INVOKE IDENTIFIER
final data shuld be into 3 files ...... (6 Replies)
Discussion started by: dodasajan
6 Replies
7. Shell Programming and Scripting
hello!
i need a little help from you :) ... i need to split a file into separate files depending on two conditions using scripting. The file has no delimiters. The conditions are col 17 = "P" and col 81 = "*", this will go to one output file; col 17 = "R" and col 81 = " ". Here is an example.
... (3 Replies)
Discussion started by: chanclitas
3 Replies
8. Shell Programming and Scripting
Hi All,
I do have an EBCDIC file sent from the z/os , this file has records with different record types in it, the type of record is identified by bytes 45-46 like
value 12 has employee record
value 14 has salaray record and etc....
we do now want to split the big ebcdic file into multiple... (3 Replies)
Discussion started by: okkadu
3 Replies
9. Shell Programming and Scripting
Hi,
I have 2 csv/txt files with single columns. I am trying to merge them using paste, but its not working..
output3.csv:
flowerbomb
everlon-jewelry
sofft
steve-madden
dolce-gabbana-watchoutput2.csv:
http://www1.abc.com/cms/slp/2/Flowerbomb
http://www1.abc.com/cms/slp/2/Everlon-Jewelry... (5 Replies)
Discussion started by: ajayakunuri
5 Replies
10. UNIX for Beginners Questions & Answers
I am trying to consolidate multiple information files (<hostname>.Linux.nfslist) into one file so that I can import it into Excel. I can get the file contents with cat *Linux.nfslist >> nfslist.txt. I need each line prefaced with the hostname. I am unsure how to do this.
--- Post updated at... (5 Replies)
Discussion started by: Kentlee65
5 Replies
LEARN ABOUT DEBIAN
c-icap-mkbdb
c-icap-mkbdb(8) System Manager's Manual c-icap-mkbdb(8)
NAME
c-icap-mkbdb - simple ICAP clientutility to create Berkeley DB lookup tables
SYNOPSIS
c-icap-mkbdb [ -d debug_level ] [ -i file.txt ] [ -o file.db ] [ -t string|int|ip ] [ -v string|int|ip ] [ --dump ]
DESCRIPTION
c-icap-mkbdb utility can be used to create Berkeley DB databases which can be used as lookup tables by the c-icap server.
OPTIONS
-d debug_level
The debug level
-i file.txt
The file contains the data (required). The line format of this file must be:
key: value1, value2, ....
-o file.db
The database to be created
-t string|int|ip
The type of the key. Select string for string keys, int for integer keys or ip for using IP addresses as keys. The "string" is the
default.
-v string|int|ip
The type of the values. The "string" is the default.
--dump Do not update the database just dump it to the screen.
EXAMPLES
c-icap-mkbdb -o keys -i keys.txt
It builds the keys Berkeley DB database, using string type for keys and values.
c-icap-mkbdb -o keys --dump
Dump the contents of the keys database
SEE ALSO
c-icap(8) c-icap-client(8) c-icap-stretch(8) c-icap-config(8) c-icap-libicapapi-config(8)
AUTHOR
Tsantilas Christos
c_icap 0.1.6 c-icap-mkbdb(8)