Sponsored Content
Top Forums UNIX for Advanced & Expert Users Help required in this script. Post 302317789 by vidyadhar85 on Wednesday 20th of May 2009 03:05:28 AM
Old 05-20-2009
HOPE THIS WILL SLOVE SOME OF YOUR DOUBTSmilie
Code:
dbaccess xyzdb << EOF >> db$abcd.log 2>&1          ------------------- connecting to database
alter table $abcd add ( encrypt char(11) ) ;       ------------------- altering the table to add a new column called encrypt with a datatype char of length 11 
create index idx_neuker on $abcd(insys_serial) ;    ------------------ creating a index named idx_neuker on table on column insys_serial
update statistics high for table $abcd(insys_serial);
create procedure p$abcd() ------- procedure started
returning char(40); 
DEFINE acc_num char(20); ---- defining the different variable with datatypes like char an dinteger with different length as mentioned within ()
DEFINE i integer;
DEFINE sum integer; 
set debug file to 'pev_rech_yyyymmnn.log'; ------ creating the debugg file with a name pev_rech_yyyymmnn.log
trace 'begin update';
let i = 0; ------ initializing the variable to 0
let sum=0;
begin work;  ------ begin here
foreach up_cur with hold for ----- in this loop they are selecting the insys_serial into a variable called acc_num and updating the field encrypt=msisdn
select insys_serial into acc_num from $abcd
update $abcd set encrypt=msisdn where insys_serial=acc_num;
let i=i+1;                   --------------- this is done till it process for 10000 records the commit is done and it will loop back
let sum=sum+1;
if i=10000 then 
trace 'record processed '||sum;
commit work;
let i=0;
begin work;               
end if
end foreach               ------- ending the if and for loop
commit work;
trace 'procedure ok! total processed records are '||sum;
return "procedure complete!";
end procedure;
execute procedure p$abcd();
drop procedure p$abcd ;  -- deleteing the index and procedure here
drop index idx_neuker;
EOF

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script help required!

Hi there, i am trying to create a script that checks for the existence of users on the system, if they exist then their details should print on the screen with a message that the id is in use. I am having a bit of trouble with it. Any ideas? Cheers Kev! (8 Replies)
Discussion started by: kev112
8 Replies

2. Shell Programming and Scripting

script required

The line is like this +abc+def+mgh+ddsdsd+sa i.e. words seperated by +. There is a plus in the beginning. i want to conver this line to abc, def, mgh, ddsdsd, sa please provide the logic in the form of a shell script Thanks in advance (13 Replies)
Discussion started by: skyineyes
13 Replies

3. Shell Programming and Scripting

Script required

Hi All, I have file nodes.txt that contains node names one by one. I'm running the following command. /opt/OV/bin/ovet_topodump.ovpl -nodeif <nodename> -detail Field <nodename> should take (replace) the node names from the nodes.txt one by one till last node. Pls. give me script for... (1 Reply)
Discussion started by: ntgobinath
1 Replies

4. Shell Programming and Scripting

Script Required

Hello guys, Need a help.I have a flat file. QWER 2:35 7044 00001 ROUT 1188 EA SS ASD 2:36 7044 00010 ROUT BSD 2:37 7044 00011 ROUT END QWER 3:35 7044 00011 ROUT 1088 EA SS ASD 3:36 7044 00010 ROUT BSD 3:37 7044 00011 ROUT END QWER 2:35 7044 00001 ROUT 1188 EA SS ASD ... (1 Reply)
Discussion started by: Satadru
1 Replies

5. Shell Programming and Scripting

Getting required fields from a test file in required fromat in unix

My data is something like shown below. date1 date2 aaa bbbb ccccc date3 date4 dddd eeeeeee ffffffffff ggggg hh I want the output like this date1date2 aaa eeeeee I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies

6. Shell Programming and Scripting

Help required to get a script

Hi Experts, I am very beginner in Bash Shell Scripting. Can anyone please guide me to create a script which should show the most busy file systems in sort basis as there are a lot of file systems on the server. I was told this task to be done by my IT lead and I must have to do this in... (3 Replies)
Discussion started by: naw_deepak
3 Replies

7. Shell Programming and Scripting

script required

This is the input file contents "data",9999,"data",999 "ddd"y"dat","dat","dart" 9999,999,999,"dat" 99,78,"duhu"yes"duhu" I need the output file contents "data",9999,"data",999 "dddydat","dat","dart" 9999,999,999,"dat" 99,78,"duhuyesduhu" Please use code tags when posting data and... (5 Replies)
Discussion started by: polineni
5 Replies

8. Shell Programming and Scripting

Script required

Hey All, I am seeking for the script which will do as follows, 1) Login on one Unix server "Server1" 2) Want to access other Unix server "Server2", and want to get the information as, on one go. df -k /tmp df -k / df -k "any file system" 3) Re-direct the output to "space.txt" on... (12 Replies)
Discussion started by: ravinderkodan88
12 Replies

9. UNIX for Dummies Questions & Answers

Perl Script:how to find how many parameters are required to run the script

How to find how many parameters are required to run a Perl script? (1 Reply)
Discussion started by: Lakshman_Gupta
1 Replies

10. UNIX for Dummies Questions & Answers

Not able to get the required o/p from my script

Hi Experts, I have a script as below : # cat a.sh var=`mysql -usupport -p'testing' -e "select count(1) from db_test.sampletable;"` echo $var the output of this script is : count(1) 145039 Now i want to remove header from my o/p and modify somewhat like 145039 I have... (9 Replies)
Discussion started by: mukulverma2408
9 Replies
fwb_ipt(1)							 Firewall Builder							fwb_ipt(1)

NAME
fwb_ipt - Policy compiler for iptables SYNOPSIS
fwb_ipt -fdata_file.xml [-4] [-6] [-V] [-dwdir] [-i] [-ooutput.fw] [-Ofw1_id,fw1_output.fw[,fw2_id,fw2_output.fw]] [-v] [-xc] [-xnN] [-xpN] [-xt] object_name DESCRIPTION
fwb_ipt is a firewall policy compiler component of Firewall Builder (see fwbuilder(1)). Compiler reads objects definitions and firewall description from the data file specified with "-f" option and generates resultant iptables script. The script is written to the file with the name the same as the name of the firewall object, plus extension ".fw". The data file and the name of the firewall objects must be specified on the command line. Other command line parameters are optional. OPTIONS
-4 Generate iptables script for IPv4 part of the policy. If any rules of the firewall refer to IPv6 addresses, compiler will skip these rules. Options "-4" and "-6" are exclusive. If neither option is used, compiler tries to generate both parts of the script, although generation of the IPv6 part is controlled by the option "Enable IPv6 support" in the "IPv6" tab of the firewall object advanced settings dialog. This option is off by default. -6 Generate iptables script for IPv6 part of the policy. If any rules of the firewall refer to IPv6 addresses, compiler will skip these rules. -f FILE Specify the name of the data file to be processed. -o output.fw Specify output file name -O fw1_id,fw1_output.fw[,fw2_id,fw2_output.fw] The argument is a comma separated list of firewall object IDs and corresponding output file names. This option is used by fwbuilder GUI while compiling firewall clusters. -d wdir Specify working directory. Compiler creates file with iptables script in this directory. If this parameter is missing, then ipta- bles script will be placed in the current working directory. -v Be verbose: compiler prints diagnostic messages when it works. -V Print version number and quit. -i When this option is present, the last argument on the command line is supposed to be firewall object ID rather than its name -xc When output file name is determined automatically (i.e. flags -o or -O are not present), the file name is composed of the cluster name and member firewall name rather than just member firewall name. This is used mostly for testing when the same member firewall object can be a part of different clusters with different configurations. -xt This flag makes compiler treat all fatal errors as warnings and continue processing rules. Generated configuration script most likely will be incorrect but will include error message as a comment; this flag is used for testing and debugging. -xp N Debugging flag: this causes compiler to print detailed description of the policy rule number "N" as it precesses it, step by step. -xn N Debugging flag: this causes compiler to print detailed description of the NAT rule number "N" as it precesses it, step by step. URL
Firewall Builder home page is located at the following URL: http://www.fwbuilder.org/ BUGS
Please report bugs using bug tracking system on SourceForge: http://sourceforge.net/tracker/?group_id=5314&atid=105314 SEE ALSO
fwbuilder(1), fwb_ipf(1), fwb_pf(1) FWB
fwb_ipt(1)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy