03-18-2008
How to Control Cronjobs using Shell Script??
Hi All,
Now i am running the 3 oracle procedures one by one manually.
Query: If 1st Procedure OUT_PUT is Success, then call 2nd Procedure.
If 2nd Procedure OUT_PUT is Success, then call 3rd Procedure.
If 1st Procedure is failed, then no need of calling the other
procedures.
How to Schedule 1st, 2nd, 3rd Procedures jobs are@
###############################################
SCHEDULE JOBS
###############################################
# 30 01 * * * /u14/ods/scripts/in_pps_state_change.sh >> /u14/ods/scripts/scriptslog/in_other_mail.log 2>&1
# 00 03 * * * /u14/ods/scripts/in_pps_cos_change.sh >> /u14/ods/scripts/scriptslog/in_other_mail.log 2>&1
# 30 04 * * * /u14/ods/scripts/in_pps_usage_change.sh >> /u14/ods/scripts/scriptslog/in_other_mail.log 2>&1
################################################
CALLING ORACLE PROCEDURE FROM SHELL SCRIPT
################################################
Eg of SP calling:: in_pps_usage_change.sh
RETVAL=`sqlplus -s ODS/ODS@ODSDB <<EOF
SET SERVEROUTPUT ON SIZE 100000
Declare
OUT_STATUS NUMBER;
OUT_MSG VARCHAR2(200);
Begin
ODS_SP_REMOVE_PRE_SUB_DUP(OUT_STATUS, OUT_MSG);
dbms_output.put_line ('KeepThis '||OUT_STATUS ||' '||nvl(OUT_MSG,''));
End;
/
SET SERVEROUTPUT OFF
EXIT;
EOF`
X=`echo $RETVAL | grep KeepThis | awk '{print $2}'`
Y=`echo $RETVAL | grep KeepThis | awk '{print $3}'`
echo " " >> $USER_LOG
echo "Procedure: ODS_SP_REMOVE_PRE_SUB_DUP output is: " >> $USER_LOG
echo "OUT_STATUS= $X" >> $USER_LOG
echo "OUT_MSG= $Y " >> $USER_LOG
################################################
Please provide me the solution of my query..
Thanks&Regards
Hanuma
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi..
I have a perl program that uses "system" to execute a shell script called startengine. The script "startengine" itself calls a lot of other smaller scripts to setup the engine etc. It finally has to execute ./engine which is another shell script which is long and takes a long time to... (3 Replies)
Discussion started by: JLJ
3 Replies
2. Shell Programming and Scripting
Dear all,
good day.
i'm asking about how to disable <control>-c or <control>-z in the beginning of a shell script then enable it again before the script exit
Best Regards
---------- Post updated at 04:41 AM ---------- Previous update was at 04:18 AM ----------
Dear All
i found the... (3 Replies)
Discussion started by: islam.said
3 Replies
3. Shell Programming and Scripting
I have a browser running in a separate virtual terminal and would like to be able to send shortcut codes (e.g. ctrl+A) to the browser (and have it react) from a bash script in a separate virtual terminal. I need to keep the script in the separate virtual terminal. (2 Replies)
Discussion started by: slak0
2 Replies
4. Shell Programming and Scripting
Version Control Through the Shell Script
Hi Guys,
Apologize for the big request, please take some time and read it completely... This is Very important for me, and ur help is Very much Appriciated.
I want to maintain the Version control to all my scripts running in Production server, I am... (6 Replies)
Discussion started by: Anji
6 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I need to remove control m character from a file.
Steps which i am doing in shell script are:
1) We are comparing the header of the file to the database table header
Here the file header has control-m characters. How do i remove it.
Please help. Below are the steps i am using,... (12 Replies)
Discussion started by: abhi_123
12 Replies
6. UNIX for Dummies Questions & Answers
I have a shell script variable called batch_id which contains the following value
export BTCH_ID=`cat /TEMPDATA/jelg0100_batchid_sorted.dat`
echo "BTCH_ID " = $BTCH_ID
BTCH_ID = 1389428^
This variable can be 7, 8 or 9 digits long, so I must capture only the true numerical value.
I am... (8 Replies)
Discussion started by: dgreene
8 Replies
7. Post Here to Contact Site Administrators and Moderators
Hi,
Below is a shell script that i made:-
#!/bin/ksh
#path=/opt/tibco/shared/adaptadores/SSCC/EVEREST/input/
if ;
then
echo "ZIP Exists and now Processing"
for files in /opt/tibco/shared/adaptadores/SSCC/EVEREST/input/T010B04.*
do
unzip $files
echo "Files Unzipped"
echo $files... (1 Reply)
Discussion started by: mmtrexon
1 Replies
8. Shell Programming and Scripting
Hi,
Below is a shell script that i made:-
#!/bin/ksh
#path=/opt/tibco/shared/adaptadores/SSCC/EVEREST/input/
if ;
then
echo "ZIP Exists and now Processing"
for files in /opt/tibco/shared/adaptadores/SSCC/EVEREST/input/T010B04.*
do
unzip $files
echo "Files Unzipped"
echo $files... (4 Replies)
Discussion started by: mmtrexon
4 Replies
9. Shell Programming and Scripting
can anyone share script for how to remove control m character (1 Reply)
Discussion started by: pw227j
1 Replies
10. Shell Programming and Scripting
Hi All,
I have a shell script(test_abc.sh) with the following shell commands, which are invoking the same shell script with different parameters.
test_abc.sh
. ./test.sh abc >> test.log
. ./test.sh xyz >> test.log
. ./test.sh pys >> test.log
. ./test.sh abc >> test.log
.
.
... (4 Replies)
Discussion started by: dev.devil.1983
4 Replies
LEARN ABOUT DEBIAN
ods-hsmutil
ods-hsmutil(1) OpenDNSSEC ods-hsmutil ods-hsmutil(1)
NAME
ods-hsmutil - OpenDNSSEC HSM utility
SYNOPSIS
ods-hsmutil [-c config] [-v] command [options]
DESCRIPTION
The ods-hsmutil utility is mainly used for debugging or testing. It is designed to interact directly with your HSM and can be used to manu-
ally list, create or delete keys. It can also be used to perform a set of basics HSM tests. Be careful before creating or deleting keys
using ods-hsmutil, as the changes are not synchronized with the KASP Enforcer.
The repositories are configured by the user in the OpenDNSSEC configuration file. The configuration contains the name of the repository,
the token label, the user PIN, and the path to its shared library.
COMMANDS
list [repository]
List the keys that are available in all or one repository
generate repository rsa keysize
Generate a new RSA key with the given keysize in the repository
remove id
Delete the key with the given id
purge repository
Delete all keys in one repository
dnskey id name
Create a DNSKEY RR for the given owner name based on the key with this id
test repository
Perform a number of tests on a repository
info Show detailed information about all repositories
OPTIONS
-c config
Path to an OpenDNSSEC configuration file
(defaults to /etc/opendnssec/conf.xml)
-h Show the help screen
-v Output more information by increasing the verbosity level
SEE ALSO
ods-auditor(1), ods-control(8), ods-enforcerd(8), ods-hsmspeed(1), ods-kaspcheck(1), ods-ksmutil(1), ods-signer(8), ods-signerd(8),
ods-timing(5), opendnssec(7), http://www.opendnssec.org/
AUTHORS
ods-hsmutil was written by Jakob Schlyter as part of the OpenDNSSEC project.
OpenDNSSEC February 2010 ods-hsmutil(1)