12-26-2017
Please be way more precise!
What is a "latest file"? By file system time stamp? Time string in file name? Running sequence number?
What is "the count of" latest file?
What do you need to "insert into DB2 table"? The algorithm? The data? The SQL- code?
And, which would be your preferred tool? awk (as shown)? perl? python? any other?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I have delimited file(|).
Sample data:
1|name|50009|DS24|0|12
2|name|30009|DS24|0|13
3|name|20409|DS24|0|14
4|name|20009|DS24|0|15
5|name|10009|DS24|0|16
I want to load this data into a oracle table (update and insert)
Please help me the commands and also... (1 Reply)
Discussion started by: unihp1
1 Replies
2. Shell Programming and Scripting
Hi All,
I want to connect two tables in DB2 using shell script and then compare the contents of two tables field by field. Could any one please help me in connecting database tables using Unix and retriving data from the same.
Thanks,
Durwas (0 Replies)
Discussion started by: dtidke
0 Replies
3. UNIX for Dummies Questions & Answers
need some advice on the following situation.
I have a DB2 table which has a varchar Column. This varchar column can have special characters like ©, ®, ™ .
When I extract from this table to a sequential file for this varchar column I am only able to get © and ® .
To Get the ™... (1 Reply)
Discussion started by: cosec
1 Replies
4. Shell Programming and Scripting
Hi
I need help on this. Its very urgent for me.. please try to help me out..
I have data in tables in DB2 database. I would like to export the data from DB2 tables into a text file, which has to be space delimited. so that I can carry out awk, grep operations on that file. I tried to export... (2 Replies)
Discussion started by: ss3944
2 Replies
5. Shell Programming and Scripting
Hi
I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.)
I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
Discussion started by: aemunathan
2 Replies
6. UNIX for Dummies Questions & Answers
hi,
I need to create a bash shell script which picks up data from a text file and in the output file puts it into an html made table. I have to use sed and awk utilties to do this
the input text file will contain data in the format:
job name para1 para2 para3 para4 para4
1 ... (1 Reply)
Discussion started by: intern123
1 Replies
7. Shell Programming and Scripting
Hi ,
I Have following requirement:
DB2 Sql query to pass from a parameter file
for example, I would create a parameter file with (SELECT column 1, column 2 FROM Table name) then job would read it and create a file with the contents named table.txt
How to write/modify below ksh script to... (10 Replies)
Discussion started by: developer.dwh9
10 Replies
8. Shell Programming and Scripting
Hi All,
I want to insert STAT and ENDTIME values for each job in joblist into TBL_DAILY_STATUS table.
Eg: insert into tbl_daily_status values(STAT,ENDTIME);
Please help me on this.
#!/bin/ksh
joblist="com_abc_job com_abc_dot_job com_abc_seq com_abc_det"
for i in $joblist
do... (8 Replies)
Discussion started by: vichuelaa
8 Replies
9. Shell Programming and Scripting
Hello All Members,
I am new to this forum and to the shell scripting. I want to write a shell script to do the following:
Scenario: I have a pipe delimited .txt file with multiple fields in it. The very first row of the file contains the name of the column which resembles the name of the... (18 Replies)
Discussion started by: chetanojha
18 Replies
10. Programming
Dear Team
I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update )
Scenario
We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)
Discussion started by: Perlbaby
1 Replies
LEARN ABOUT PHP
db2_special_columns
DB2_SPECIAL_COLUMNS(3) 1 DB2_SPECIAL_COLUMNS(3)
db2_special_columns - Returns a result set listing the unique row identifier columns for a table
SYNOPSIS
resource db2_special_columns (resource $connection, string $qualifier, string $schema, string $table_name, int $scope)
DESCRIPTION
Returns a result set listing the unique row identifier columns for a table.
PARAMETERS
o $connection
- A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
o $qualifier
- A qualifier for DB2 databases running on OS/390 or z/OS servers. For other databases, pass NULL or an empty string.
o $schema
- The schema which contains the tables.
o $table_name
- The name of the table.
o $scope
- Integer value representing the minimum duration for which the unique row identifier is valid. This can be one of the following
values:
+--------------+--------------------------------------+---+
|Integer value | | |
| | | |
| | SQL constant | |
| | | |
| | Description | |
| | | |
+--------------+--------------------------------------+---+
| 0 | | |
| | | |
| | SQL_SCOPE_CURROW | |
| | | |
| | Row identifier is valid only while | |
| | the cursor is positioned on the row. | |
| | | |
| 1 | | |
| | | |
| | SQL_SCOPE_TRANSACTION | |
| | | |
| | Row identifier is valid for the | |
| | duration of the transaction. | |
| | | |
| 2 | | |
| | | |
| | SQL_SCOPE_SESSION | |
| | | |
| | Row identifier is valid for the | |
| | duration of the connection. | |
| | | |
+--------------+--------------------------------------+---+
RETURN VALUES
Returns a statement resource with a result set containing rows with unique row identifier information for a table. The rows are composed
of the following columns:
+------------+---------------------------------------------------+
|Column name | |
| | |
| | Description |
| | |
+------------+---------------------------------------------------+
| SCOPE | |
| | |
| | |
| | |
| | box, tab (|); c | c | c | . T{ Integer |
| | value |
| | |
| | SQL constant |
| | |
| | Description |
| | |
+------------+---------------------------------------------------+
| 0 | |
| | |
| | SQL_SCOPE_CURROW |
| | |
| | Row identifier is valid only while the cursor is |
| | positioned on the row. |
| | |
| 1 | |
| | |
| | SQL_SCOPE_TRANSACTION |
| | |
| | Row identifier is valid for the duration of the |
| | transaction. |
| | |
| 2 | |
| | |
| | SQL_SCOPE_SESSION |
| | |
| | Row identifier is valid for the duration of the |
| | connection. |
| | |
+------------+---------------------------------------------------+
T} T{ COLUMN_NAME
T} |T{ Name of the unique column.
T} T{ DATA_TYPE
T} |T{ SQL data type for the column.
T} T{ TYPE_NAME
T} |T{ Character string representation of the SQL data type for the column.
T} T{ COLUMN_SIZE
T} |T{ An integer value representing the size of the column.
T} T{ BUFFER_LENGTH
T} |T{
Maximum number of bytes necessary to store data from this column.
T} T{ DECIMAL_DIGITS
T} |T{
The scale of the column, or NULL where scale is not applicable.
T} T{ NUM_PREC_RADIX
T} |T{
An integer value of either 10 (representing an exact numeric data type), 2 (representing an approximate numeric data type), or NULL (rep-
resenting a data type for which radix is not applicable).
T} T{ PSEUDO_COLUMN
T} |T{ Always returns 1.
T}
SEE ALSO
db2_column_privileges(3), db2_columns(3), db2_foreign_keys(3), db2_primary_keys(3), db2_procedure_columns(3), db2_procedures(3), db2_sta-
tistics(3), db2_table_privileges(3), db2_tables(3).
PHP Documentation Group DB2_SPECIAL_COLUMNS(3)