Sponsored Content
Top Forums Shell Programming and Scripting Passing a parameter from a shell script to sqlplus Post 302844048 by Mahomed on Friday 16th of August 2013 08:18:00 AM
Old 08-16-2013
Hi Durden_Tyler,

Thank you very much for your help.

You are correct, the PER12.sql script does have the ACCEPT statement, I will now modify and try...

before:
ACCEPT v_personId PROMPT 'Enter a valid PERSON_ID for the employee: '
PROMPT
ACCEPT v_payElements PROMPT 'Display Payroll Element Entries (Y|N): '

After:
ACCEPT v_personId = &1
REM PROMPT 'Enter a valid PERSON_ID for the employee: '
REM PROMPT
ACCEPT v_payElements = &2
REM PROMPT 'Display Payroll Element Entries (Y|N): '


Let me give this a bash.

Cheers!!!
Mahomed
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

passing parameters from a shell script to sqlplus

Hi , I want to pass parameters from a shell script to a sql script and use the parameter in the sql query ..and then I want to spool a particular select query on to my unix box... for 4 different locations by writing only one sql script Right now no file is generated on the unix box...it is a... (2 Replies)
Discussion started by: phani
2 Replies

2. Shell Programming and Scripting

error in passing a variable to sqlplus from a shell script

hi, I am using a shell script from where i will be conecting to sqlplus.. i am having a problem in passing a variable to sqlplus query.. i will be assigning the variable in the unix environment..whenever i am trying to pass a variable having the contents greater than 2500 characters, i am... (3 Replies)
Discussion started by: kripssmart
3 Replies

3. Shell Programming and Scripting

How to pass parameter from sqlplus(procedure completed) to your shell script

if then # mail -s "Import failed file does not exist" sanjay.jaiswal@xyz.com echo "FILE does not exist" exit 1 fi echo "FILE EXIST" size=-1 set $(du /export/home/oracle/nas/scott21.dmp.gz) while do echo "Inside the loop" size=$1 set $(du... (1 Reply)
Discussion started by: sanora600
1 Replies

4. Shell Programming and Scripting

Passing parameter from one file to shell script

Hi All, I have a 2 files. File1 i am generating using an ETL tool, which is a comman seperated delimited file which contains country code & load date. everytime, this country code will be updated from a table. It might be AB or BA & ld_date will be for which date we need to load the file. ... (7 Replies)
Discussion started by: Amit.Sagpariya
7 Replies

5. AIX

Passing a parameter to a shell script?

I would like to run a compress script on files in certain directories. My compress_script.sh is just basically compress file* In order for me to use this I have to copy it into each directory and run it. How can I state the directory on the command line with the compress script so it... (2 Replies)
Discussion started by: NycUnxer
2 Replies

6. SCO

Parameter passing to dot shell script

OS SCO Open Server 6.0 MP4 I am trying to change the value of a enviornment variable thru a script and want to pass a parameter on the commande line, If I hard code the value inside the script the script changes the enviornment variable . mytest where my test is MYVAR=$1 export MYVAR... (6 Replies)
Discussion started by: atish0
6 Replies

7. Shell Programming and Scripting

Passing Parameter containing space in between to Shell Script

Hi, I have one shell script which use two parameter however one of its parameter have space in between. eg. a.sh 20110114 b c d here b c d is one parameter I used 'b c d' but its not giving correct result. Also i tried b\c\d but this one also didnt work. Any help would be... (5 Replies)
Discussion started by: diehard
5 Replies

8. UNIX for Dummies Questions & Answers

Passing a Unix parameter to SQLPlus login command

hi All, i m trying to pass a user choice paramter from unix to sqlplus connect command here i want the user to enter the username and password he wants to connect in sql plus through read in unix and then automatically connect to that instance. sqlplus -s $1/$2 where $ 1 and $2 will b... (2 Replies)
Discussion started by: Jcpratap
2 Replies

9. Shell Programming and Scripting

Shell Script passing parameters to sqlplus code

Hello All, I am interested in finding out a way to pass parameters that are entered at the prompt from HP unix and passed to SQLPlus code with a Shell Script. Is this possible? Thanks (4 Replies)
Discussion started by: compprog11
4 Replies

10. Shell Programming and Scripting

Passing parameter with single quote to shell script

Hello All, I am trying below +++++++++ #/bin/bash set -x Host=$1 Port=$2 User=$3 Pass=$4 Warning=$5 Critical=$6 SCRIPT_LOC=/opt/agent/ Parameters="'""hostname=$Host&""port=$Port&""username=$User&""password=$Pass&""jvm=UsedMemory,$Warning,$Critical""'" echo $Parameters... (10 Replies)
Discussion started by: sundari127
10 Replies
MacPerl(3)						User Contributed Perl Documentation						MacPerl(3)

NAME
MacPerl - Built-in Macintosh specific routines. SYNOPSIS
$phone = MacPerl::Ask("Enter your phone number:"); MacPerl::Answer("Nunc et in hora mortis nostrae", "Amen"); $color = MacPerl::Pick("What's your favorite color baby ?", "Red", "Green", "Gold"); MacPerl::SetFileInfo("MPS ", "TEXT", yin, yang); MacPerl::GetFileInfo(yin); MacPerl::Quit(kMacPerlAlwaysQuit); FUNCTIONS
MacPerl::Answer(PROMPT) MacPerl::Answer(PROMPT,BUTTON1) MacPerl::Answer(PROMPT,BUTTON1,BUTTON2) MacPerl::Answer(PROMPT,BUTTON1,BUTTON2,BUTTON3) Presents to the user a dialog with 1, 2, or 3 buttons. Examples: MacPerl::Answer("Nunc et in hora mortis nostrae", "Amen"); always returns 0. MacPerl::Answer("I refuse"); is equivalent to "MacPerl'Answer("I refuse", "OK");" MacPerl::Answer("Delete hard disk ?", "OK", "Cancel"); returns 1 for OK, 0 for Cancel MacPerl::Answer("Overwrite existig file", "Overwrite", "Skip", "Cancel"); returns 2 for Overwrite, 1 for Skip, 0 for Cancel MacPerl::Ask(PROMPT, DEFAULT) MacPerl::Ask(PROMPT) Asks the user for a string. A default value may be given. Returns undef if the dialog is cancelled. Example: $phone = MacPerl::Ask("Enter your phone number:"); $name = MacPerl::Ask("Enter your first name", "Bruce"); Useful for Australian database applications MacPerl::Pick(PROMPT, VALUES) Asks the user to pick a choice from a list. VALUES is a list of choices. Returns undef if the dialog is cancelled. Examples: $color = MacPerl::Pick("What's your favorite color baby ?", "Red", "Green", "Gold"); MacPerl::SetFileInfo(CREATOR,TYPE,FILE...) Changes the file types and creators of the file(s). Examples: MacPerl::SetFileInfo("MPS ", "TEXT", yin, yang); Turn yin and yang into MPW text files MacPerl::GetFileInfo(FILE) In scalar context, returns the file type. In array context, returns (creator,type). Examples: MacPerl::GetFileInfo(yin); Returns "TEXT" or ("MPS ", "TEXT"). MacPerl::DoAppleScript(SCRIPT) Execute an AppleScript script. Returns the text of the script result. Script error strings are returned in $@. Example: my $text = MacPerl::DoAppleScript(<<END_SCRIPT) or die $@; tell application "BBEdit" make new Window copy "Inserting text the hard way." to character 1 of front Window get (characters 1 through 9 of front Window) as text end tell END_SCRIPT Note: calling DoAppleScript to tell MacPerl to do something via AppleScript may yield unpredictable results, especially when waiting on MacPerl to reply, such as when stringing multiple events together, or expecting data to be returned. Try wrapping the "tell" block in "ignoring application responses" / "end ignoring" if necessary. MacPerl::Reply(ANSWER) Reply to current DoScript request. Useful if you are calling Perl scripts from other applications. MacPerl::Quit(LEVEL) Mac OS only. If LEVEL is 0, don't quit after ending the script. If 1, quit if running under a runtime version, if 2, always quit. If LEVEL is 3, quit if this was the first script to be run since starting MacPerl. MacPerl::LoadExternals(LIBFILE) Mac OS only. Load XCMD and XFCN extensions contained in file LIBFILE, which is searched along the same path as it would be for a require. The extensions are made accessible in the current package, unless they containing an explicit package name. MacPerl::FAccess(FILE, CMD, ARGS) Mac OS only. When called from the tool, manipulate various information of files. To get the command constants, it's convenient to require "FAccess.ph". $TAB = MacPerl::FAccess(FILE, F_GTABINFO) MacPerl::FAccess(FILE, F_STABINFO, TAB) Manipulate tabulator setting (in spaces per tab). ($FONTNAME, $FONTSIZE) = MacPerl::FAccess(FILE, F_GFONTINFO) $FONTNUM = MacPerl::FAccess(FILE, F_GFONTINFO) MacPerl::FAccess(FILE, F_SFONTINFO, FONT [, SIZE]) Manipulate font and size information. Both font names and font numbers are accepted for F_SFONTINFO; F_GFONTINFO returns a font name in an array context, a font number in a scalar context. ($STARTSEL, $ENDSEL, $DISPLAYTOP) = MacPerl::FAccess(FILE, F_GSELINFO) $STARTSEL = MacPerl::FAccess(FILE, F_GSELINFO) MacPerl::FAccess(FILE, F_SSELINFO, $STARTSEL, $ENDSEL [, $DISPLAYTOP]) Manipulate the MPW selection of a file. ($LEFT, $TOP, $RIGHT, $BOTTOM) = MacPerl::FAccess(FILE, F_GWININFO) =item $TOP = MacPerl::FAccess(FILE, F_GWININFO) =item MacPerl::FAccess(FILE, F_SWININFO, LEFT, TOP [, RIGHT, BOTTOM]) Manipulate the window position. MacPerl::MakeFSSpec(PATH) This command encodes a path name into an encoding (volume #, directory #, File name) which is guaranteed to be unique for every file. Don't store this encoding between runs of MacPerl! MacPerl::MakePath(FSSPEC) The inverse of MacPerl::MakeFSSpec(): turn an encoding into a path name. MacPerl::Volumes() In scalar context, return the FSSPEC of the startup volume. In list context, return FSSPECs of all volumes. SEE ALSO
macperl perl v5.18.2 2009-09-07 MacPerl(3)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy