Sponsored Content
Top Forums Shell Programming and Scripting How to write bash shell script for mentioned requirement? Post 302739921 by Skrynesaver on Wednesday 5th of December 2012 06:57:49 AM
Old 12-05-2012
Which DB are the tables in and what CLI client do you use?

Is that client scriptable ?

The actual command will look something like
Code:
 
for i in $(db_client_select_column) 
  do 
  if [ $i ==  "Y" ]
    then db_dump_table_command
  fi
done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Required Shell script for My requirement

Hi All, I joined today in this forum to have all of your help. I have a Big requirement, pls. help me to resolve. I'm using HP-UX 11.23. I need a shell script for the following requirement. I have a file (nodes.txt) that contains 1000 nodes. I'm running the following command:... (3 Replies)
Discussion started by: ntgobinath
3 Replies

2. Shell Programming and Scripting

Can anybody write this bash script ?

hi, first congratulations on the nice forum! Can anybody write script, which can make copy of some or all files of the current directory in new directory (called "backups", which must be made in the current directory, if it's not already exist). And bring out a massage (report) with the count... (7 Replies)
Discussion started by: Cecko
7 Replies

3. Homework & Coursework Questions

How to write script in bash.

I am very new to Linux/Unix. Kindly assist the following: I wish to write a bash shell script called how_many_to_go that calculates and prints the number of days, hours, minutes and/or seconds until the end of the current month (based on the output of the date command). Do ... (2 Replies)
Discussion started by: alobi
2 Replies

4. Shell Programming and Scripting

How to write a script for the below mentioned issue

hello Forum members, I have a encrypted file which consist Unames and Pwd in the encrypted form and i have to write a script the PWD from the file and redirect into a log file.please find below the file and please help write a script. _config.id_dbs is the file which will open with a... (0 Replies)
Discussion started by: rajkumar_g
0 Replies

5. Shell Programming and Scripting

Help to write bash script code

I am newbie to UNIX. I came across this exercise in one the books.Can anyone help me with this question?????? Write a short Bash script that, given the name of a file as an argument, reads the file name and creates a new file containing only lines which consist of one word. Here is an example... (4 Replies)
Discussion started by: krthknaidu
4 Replies

6. Shell Programming and Scripting

Help to write a script for the below requirement

Hi, I am not so familiar with shell Script but I have a task in hand. So, here it goes: There is a file details.txt in the server where the below details are stored: Name Country D M Acc.No. sameer India 30 july sscc-errttt-q random US 20 july pecc-ttt4-s Deb India 31... (3 Replies)
Discussion started by: neel87
3 Replies

7. Shell Programming and Scripting

Writing if condition in shell script and failing to do requirement

Hi, I am trying to edit the values in a file. For example i am trying to edit the value of "ABC" in a file by executing shell script. Please Note that ABC value can be there mulitple times or it may not be there in the file Conditions for it is 1. If ABC is less than 123 then it should... (14 Replies)
Discussion started by: darling
14 Replies

8. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

9. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

10. UNIX for Beginners Questions & Answers

How To Write my Bash Script To Automate it?

Hello guys, I need some help. I am new in bash and I don't know how to automate the following script. head -2 out1 > 1.fasta sed ‘1,2 d' out1 > out2 rm out1 head -2 out2 > 2.fasta sed ‘1,2 d' out2 > out1 rm out2 head -2 out2 > 3.fasta sed '1,2 d' out2 > out1 rm out2 .......... (3 Replies)
Discussion started by: dellia222
3 Replies
DB2_CLIENT_INFO(3)							 1							DB2_CLIENT_INFO(3)

db2_client_info - Returns an object with properties that describe the DB2 database client

SYNOPSIS
object db2_client_info (resource $connection) DESCRIPTION
This function returns an object with read-only properties that return information about the DB2 database client. The following table lists the DB2 client properties: DB2 client properties +---------------------+--------------------------------------+---+ | Property name | | | | | | | | | Return type | | | | | | | | Description | | | | | | +---------------------+--------------------------------------+---+ | APPL_CODEPAGE | | | | | | | | | int | | | | | | | | The application code page. | | | | | | | CONN_CODEPAGE | | | | | | | | | int | | | | | | | | The code page for the current con- | | | | nection. | | | | | | | DATA_SOURCE_NAME | | | | | | | | | string | | | | | | | | The data source name (DSN) used to | | | | create the current connection to the | | | | database. | | | | | | | DRIVER_NAME | | | | | | | | | string | | | | | | | | The name of the library that imple- | | | | ments the DB2 Call Level Interface | | | | (CLI) specification. | | | | | | | DRIVER_ODBC_VER | | | | | | | | | string | | | | | | | | The version of ODBC that the DB2 | | | | client supports. This returns a | | | | string "MM.mm" where $MM is the | | | | major version and $mm is the minor | | | | version. The DB2 client always | | | | returns "03.51". | | | | | | | DRIVER_VER | | | | | | | | | string | | | | | | | | The version of the client, in the | | | | form of a string "MM.mm.uuuu" where | | | | $MM is the major version, $mm is the | | | | minor version, and $uuuu is the | | | | update. For example, "08.02.0001" | | | | represents major version 8, minor | | | | version 2, update 1. | | | | | | |ODBC_SQL_CONFORMANCE | | | | | | | | | string | | | | | | | | The level of ODBC SQL grammar sup- | | | | ported by the client: | | | | | | | | o MINIMUM | | | | - Supports the mini- | | | | mum ODBC SQL gram- | | | | mar. | | | | | | | | o CORE | | | | - Supports the core | | | | ODBC SQL grammar. | | | | | | | | o EXTENDED | | | | - Supports extended | | | | ODBC SQL grammar. | | | | | | | ODBC_VER | | | | | | | | | string | | | | | | | | The version of ODBC that the ODBC | | | | driver manager supports. This | | | | returns a string "MM.mm.rrrr" where | | | | $MM is the major version, $mm is the | | | | minor version, and $rrrr is the | | | | release. The DB2 client always | | | | returns "03.01.0000". | | | | | | +---------------------+--------------------------------------+---+ PARAMETERS
o $connection - Specifies an active DB2 client connection. RETURN VALUES
Returns an object on a successful call. Returns FALSE on failure. EXAMPLES
Example #1 A db2_client_info(3) example To retrieve information about the client, you must pass a valid database connection resource to db2_client_info(3). <?php $conn = db2_connect( 'SAMPLE', 'db2inst1', 'ibmdb2' ); $client = db2_client_info( $conn ); if ($client) { echo "DRIVER_NAME: "; var_dump( $client->DRIVER_NAME ); echo "DRIVER_VER: "; var_dump( $client->DRIVER_VER ); echo "DATA_SOURCE_NAME: "; var_dump( $client->DATA_SOURCE_NAME ); echo "DRIVER_ODBC_VER: "; var_dump( $client->DRIVER_ODBC_VER ); echo "ODBC_VER: "; var_dump( $client->ODBC_VER ); echo "ODBC_SQL_CONFORMANCE: "; var_dump( $client->ODBC_SQL_CONFORMANCE ); echo "APPL_CODEPAGE: "; var_dump( $client->APPL_CODEPAGE ); echo "CONN_CODEPAGE: "; var_dump( $client->CONN_CODEPAGE ); } else { echo "Error retrieving client information. Perhaps your database connection was invalid."; } db2_close($conn); ?> The above example will output: DRIVER_NAME: string(8) "libdb2.a" DRIVER_VER: string(10) "08.02.0001" DATA_SOURCE_NAME: string(6) "SAMPLE" DRIVER_ODBC_VER: string(5) "03.51" ODBC_VER: string(10) "03.01.0000" ODBC_SQL_CONFORMANCE: string(8) "EXTENDED" APPL_CODEPAGE: int(819) CONN_CODEPAGE: int(819) SEE ALSO
db2_server_info(3). PHP Documentation Group DB2_CLIENT_INFO(3)
All times are GMT -4. The time now is 05:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy