Sponsored Content
Top Forums UNIX for Advanced & Expert Users Passing a unix variable value to a Plsql function Post 302142848 by cobroraj on Monday 29th of October 2007 11:18:11 PM
Old 10-30-2007
Passing a unix variable value to a Plsql function

Suppose I have a unix variable called RGNM which is holding a value. Now I want to call a plsql function in my script. THis plsql function takes one IN parameter. I want to pass my UNIX VARIABLE Value to the plsql function. Can i just give it by giving $RGNM in the function after calling sqlplus and function name.

Please help me
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing a variable name to be created within a function

Is it possible to pass a variable name, as a parameter to a function, so it can be created within this function ? Something like this: func_uppercase abcdefgh var_name where the 1st parameter is the string I want to convert and the 2nd is the desired variable name... $2=`echo "$1" |... (2 Replies)
Discussion started by: 435 Gavea
2 Replies

2. UNIX for Dummies Questions & Answers

passing variable to function

Hi, I am trying to sum up numbered columns and in order to tidy up the program I have wrote a function to do the adding of some numbers. I have a problem though with passing a variable to the function in the UNIX bash shell. The function only gives the first number in the variable list and does... (4 Replies)
Discussion started by: Knotty
4 Replies

3. UNIX for Advanced & Expert Users

calling plsql function in a unix script

Could anyone please help me. I have a function in plsql that returns a number. But i am listing some records through that function using DBMS_OUTPUT.PUT_LINE. I want to catch those records by executing this function through a unix script. The following shows what i did echo "Connected from... (2 Replies)
Discussion started by: cobroraj
2 Replies

4. UNIX for Dummies Questions & Answers

passing a variable inside a variable to a function

I would like to know how to pass a variable inside a variable to a function. sample code below -------------- for x in 1 9 do check_null $C$x ##call function to check if the value is null if then echo "line number:$var_cnt,... (2 Replies)
Discussion started by: KingVikram
2 Replies

5. Shell Programming and Scripting

Passing global variable to a function which is called by another function

Hi , I have three funcions f1, f2 and f3 . f1 calls f2 and f2 calls f3 . I have a global variable "period" which i want to pass to f3 . Can i pass the variable directly in the definition of f3 ? Pls help . sars (4 Replies)
Discussion started by: sars
4 Replies

6. Shell Programming and Scripting

what is the maximum length of a unix shell variable which can be can passed to plsql

what is the maximum length of a unix shell variable which can be can passed to plsql variable:( (1 Reply)
Discussion started by: alokjyotibal
1 Replies

7. Shell Programming and Scripting

passing variable content to a function

following on from below link https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569 i will be using file reading in while loop say for example while read line123 do echo "line read is $line123" insert_funct $line123 done< mysqldump.sql... (6 Replies)
Discussion started by: vivek d r
6 Replies

8. Shell Programming and Scripting

Passing variable value in a function to be used by another function

Hello All, I would like to ask help from you on how to pass variable value from a function that has been called inside the function. I have created below and put the variables in " ". Is there another way I can do this? Thank you in advance. readtasklist() { while read -r mod ver... (1 Reply)
Discussion started by: aderamos12
1 Replies

9. Homework & Coursework Questions

How to Dynamically Pass Parameter to plsql Function & Capture its Output Value in a Shell Variable?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: 2. Relevant commands, code, scripts, algorithms: #! /bin/ksh v="ORG_ID" ... (2 Replies)
Discussion started by: sujitdas2104
2 Replies

10. Shell Programming and Scripting

Parsing Comma Separated values to UNIX variable from PLSQL

Hi All, I'm trying to pass the comma separated values (string) returned from Plsql Procedure to UNIX variable. getting the below log message cat: -: Bad file descriptor awk: cmd. line:1: fatal: error reading input file `-': Bad file descriptor The output coming from plsql procedure is... (3 Replies)
Discussion started by: Mahesh3089
3 Replies
setpgid(2)							System Calls Manual							setpgid(2)

NAME
setpgid, setpgrp - Sets the process group ID SYNOPSIS
#include <unistd.h> int setpgid( pid_t process_id, pid_t process_group_id); pid_t setpgrp(void); Application developers may want to specify an #include statement for <sys/types.h> before the one for <unistd.h> if programs are being developed for multiple platforms. The additional #include statement is not required on Tru64 UNIX systems or by ISO or X/Open standards, but may be required on other vendors' systems that conform to these standards. The following alternate declaration for setpgrp() does not conform to current standards and is supported only for backward compatibility: int setpgrp( pid_t process_id, pid_t process_group_id); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: setpgid(): XSH5.0 setpgrp(): SVID 3, XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the ID of the process whose process group ID is to be changed. Specifies the new process group ID. DESCRIPTION
Use the setpgid() function to add a process to an existing process group or to create a new process group within a process's session. The setpgid() function does not change the process group ID of a session leader. The setpgid() function sets the process group ID of the process identified by the process_id parameter. The process group ID is set to the value specified in the process_group_id parameter. If the process_id parameter contains 0 (zero), the setpgid() function sets the process group ID of the calling process. The new value of the process group ID is the one specified in the process_group_id parameter. If the process_group_id parameter contains 0 (zero), the setpgid() function sets the process group ID of the specified process using the process group ID of the calling process. The specified process is the one identified by the process_id parameter. The setpgid() function supports job control. The setpgrp() function sets the process group ID of the calling process to be equal to the process ID of the calling process. If the func- tion creates a new session, the new session has no controlling terminal. This function does not change the process group ID of a session leader. NOTES
[Tru64 UNIX] When compiled in the X/Open UNIX environment, calls to the setpgrp() function are internally renamed by prepending _E to the function name. When you are debugging a module that includes the setpgrp() function and for which _XOPEN_SOURCE_EXTENDED has been defined, use _Esetpgrp to refer to the setpgrp() call. See standards(5) for further information. [Tru64 UNIX] The backward-compatible version of the setpgrp() function is supported for use outside of the System V habitat or X/Open- UNIX environment. This version of setpgrp( behaves like the setpgid() function. In this case, you specify a process ID and process group ID as parameters in the call to setpgrp(). The setpgrp() function does not change the process group ID of a session leader. RETURN VALUES
Upon successful completion, the setpgid() function returns a value of 0 (zero). Otherwise, the function returns a value of -1 and sets errno to indicate the error. Upon successful completion, the setpgrp() function returns the new process group ID. [Tru64 UNIX] The alternate version of setpgrp() returns a value of 0 (zero) on successful completion. Otherwise, the function returns a value of -1 and sets errno to indicate the error. ERRORS
The setpgid() function sets errno to the specified values for the following conditions: The value of the process_id parameter matches the process ID of a child process of the calling process and the child process has successfully executed one of the exec() functions. The value of the process_group_id parameter is less than or equal to 0 (zero), or is not a valid process ID. The value of the process_group_id parameter is a valid process ID, but that process is not in the same session as the calling process. The process indicated by the process_id parameter is a session leader. The value of the process_id parameter matches the process ID of a child process of the calling process and the child process is not in the same session as the calling process. The value of the process_group_id parameter is valid but does not match the process ID of the process indicated by the process_id parameter, and there is no process with a process group ID that matches the value of the process_group_id parameter in the same ses- sion as the calling process. The value of the process_id parameter does not match the process ID of the calling process or of a child process of the calling process. No errors are defined for the standard version of the setpgrp() function. [Tru64 UNIX] The backward-compatible version of setpgrp() sets errno to the same values as setpgid(). RELATED INFORMATION
Functions: exec(2), fork(2), getpid(2), getsid(2), kill(2) Standards: standards(5) Guides: Programmer's Guide delim off setpgid(2)
All times are GMT -4. The time now is 12:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy