Result set into an array


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Result set into an array
# 1  
Old 09-14-2010
Result set into an array

Hi,

I have an issue with the result set. I wanted to run db2 query against db2 server in unix environment using perl script. I wanted to get the result set into an array.

$db=<<DB_Name>>

connect to $db
get connection state

this is my query = SELECT DISTINCT 'R' FROM SYSCAT.TABAUTH;

any help really appreciated..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need to filter the result set within 2 time frame

my sample file is like this $cat onefile 05/21/18 13:10:07 ABRT US1CPDAY Status 1 05/21/18 21:18:54 ABRT DailyBackup_VFFPRDAPENTL01 Status 6 05/21/18 21:26:24 ABRT DailyBackup_VFFPRDAPENTL02 Status 6 05/21/18 21:57:36 ABRT DailyBackup_vm-ea1ffpreng01 Status 6... (7 Replies)
Discussion started by: gotamp
7 Replies

2. UNIX for Dummies Questions & Answers

Find commmand returning search path with the result set

OS Platform : Oracle Linux 6.5 We are creating a shell script to purge old log files . It uses find command with rm in it. The syntax is find <Path of Log Directory> -exec rm -fr {} \; Example: find /tmp/test3 -exec rm -fr {} \; For rm command , we use -r option to... (4 Replies)
Discussion started by: kraljic
4 Replies

3. Shell Programming and Scripting

ksh : Building an array based on condition result

I want to build an Errorlog. I would like to build an array as I move through the if statements and print the array once all error conditions have been defined. The results need to be comma delimited. tsver will be static "1.9.6(2)" other vars $prit $lt $rt can have the same or a different... (1 Reply)
Discussion started by: popeye
1 Replies

4. Shell Programming and Scripting

how to output the array result into a matrix

I have a file like this: ASSPASVFETQY,hTRBV12-4,hTRBJ2-5,2 ASSPASTGGDYGYT,hTRBV18,hTRBJ1-2,2 ASSPASGDGYT,hTRBV5-1,hTRBJ1-2,2 ASSPASFPEDTQY,hTRBV27,hTRBJ2-3,2 ASSPARVNYGYT,hTRBV5-1,hTRBJ1-2,2 ASSPARTSGGLNEQF,hTRBV6-4,hTRBJ2-1,2 ASSPARQSYNEQF,hTRBV11-1,hTRBJ2-1,2... (3 Replies)
Discussion started by: xshang
3 Replies

5. Shell Programming and Scripting

How do i access sybase using isql and how do i get result set in perl script?

Hi, How do i get result set in perl script using isql while connecting sybase server. I have a perl script which connected to sybase and get the result set. but i wanted to get the result set. How do i get the result set in perl script not unix shell script.. $server ="ServerName"; open... (1 Reply)
Discussion started by: solo123
1 Replies

6. Shell Programming and Scripting

If the grep command returns any result set

my intension is to use a grep command inside the shell script and if any row is returned or not.. depending on the resultset i have to code on further. how to check this i mean.. could anyone help me out with the if condition how to use it here !! (4 Replies)
Discussion started by: gotam
4 Replies

7. Shell Programming and Scripting

How to get and process mysql result set in shell script

Hi All, I am in a problem here is the description, Actually in my shell script i am firing a mysql query which returns multiple records and i have to process each record one by one. So could any one please suggest me how to solve my problem? Thanks in Advance Ashok Sharma (4 Replies)
Discussion started by: ashok1979
4 Replies

8. Programming

Send email for each row in a result set

I have SQL giving me output of disabled ids in the system every day. I can send on email for this disabled user list. But I want to send one email for every disabled user or for every row. thank you for your help. Kyle (2 Replies)
Discussion started by: s1a2m3
2 Replies

9. Shell Programming and Scripting

Prase a file and store and result to an array

Dear all, I have a file having the following formats: ThreadFail=Web1=1234 ThreadFail=Web2=2345 ThreadFail=Web3=12 ConnectionFail=DB1=11 ConnectionFail=DB2=22 The number of lines will be different from every time . How can I parse the file and store the result to an a array inside... (6 Replies)
Discussion started by: youareapkman
6 Replies

10. Shell Programming and Scripting

Prase a file and stored the result to an array

Dear all , I have a file whose content has the following format: jboss.web:type=ThreadPool,name=AAAA jboss.web:type=ThreadPool,name=BBBB How can I parse this file to get the value of the name of each line (AAAA , BBBB) and store the result to an array ? (array = AAAA , array = BBBB).... (4 Replies)
Discussion started by: youareapkman
4 Replies
Login or Register to Ask a Question
BOS_GETRESTART(8)					       AFS Command Reference						 BOS_GETRESTART(8)

NAME
       bos_getrestart - Displays the automatic restart times for server processes

SYNOPSIS
       bos getrestart -server <machine name> [-cell <cell name>]
	   [-noauth] [-localauth] [-help]

       bos getr -s <machine name> [-c <cell name>] [-n]
	   [-l] [-h]

DESCRIPTION
       The bos getrestart command displays two restart times from the /etc/openafs/BosConfig file on the server machine named by the -server
       argument:

       o   The general restart time at which the BOS Server process automatically restarts itself and all processes marked with status "Run" in
	   the BosConfig file. The default is Sunday at 4:00 a.m.

       o   The binary restart time at which the BOS Server automatically restarts any process for which the time stamp on the binary file in the
	   /usr/lib/openafs directory is later than the last restart time for the process. The default is 5:00 a.m. Use the bos getdate command to
	   list a binary file's timestamp, and the -long flag to the bos status command to display a process's most recent restart time.

       Use the bos setrestart command to set the restart times.

OPTIONS
       -server <machine name>
	   Indicates the server machine for which to display the restart times. Identify the machine by IP address or its host name (either fully-
	   qualified or abbreviated unambiguously). For details, see bos(8).

       -cell <cell name>
	   Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see bos(8).

       -noauth
	   Assigns the unprivileged identity "anonymous" to the issuer. Do not combine this flag with the -localauth flag. For more details, see
	   bos(8).

       -localauth
	   Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The bos command interpreter presents the ticket
	   to the BOS Server during mutual authentication. Do not combine this flag with the -cell or -noauth options. For more details, see
	   bos(8).

       -help
	   Prints the online help for this command. All other valid options are ignored.

OUTPUT
       The output consists of two lines:

	  Server <machine_name> restarts at <time>
	  Server <machine_name> restarts for new binaries at <time>

       Possible values for <time> include:

       o   "never", indicating that the BOS Server never performs that type of restart.

       o   "now", indicating that the BOS Server performs that type of restart only each time it restarts.

       o   A specified day and time, indicating that the BOS Server performs that type of restart once per week. Example: "sun 4:00 am".

       o   A specified time, indicating that the BOS Server performs that type of restart once per day. Examples: "11:00 pm", "3:00 am".

EXAMPLES
       The following example displays the restart times for the machine "db2.abc.com":

	  % bos getrestart db2.abc.com
	  Server db2.abc.com restarts at sun 4:00 am
	  Server db2.abc.com restarts for new binaries at 2:15 am

       In the following example, the issuer abbreviates the machine name "fs1.abc.com" to "fs1", relying on the cell's name server to resolve the
       name. The output echoes the abbreviated form.

	  % bos getrestart fs1
	  Server fs1 restarts at sat 5:00 am
	  Server fs1 restarts for new binaries at 11:30 pm

PRIVILEGE REQUIRED
       None

SEE ALSO
       BosConfig(5), KeyFile(5), bos(8), bos_getdate(8), bos_setrestart(8), bos_status(8)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							 BOS_GETRESTART(8)