REFCURSOR is a pointer to an open cursor in your current process.
You did nothing to open the cursor. You need to invoke the stored procedure, then "aim" your refcursor at the return value of the SP.
You mean
ln_desc:=P_TEST ('1', ln_desc);
I tried the same but not worked.
Can you please post the code or any link if any.
---------- Post updated 08-11-09 at 08:32 AM ---------- Previous update was 08-10-09 at 06:33 PM ----------
Hi ,
My question is on cursors only. your are write that we can read from the file. But first question arises how to write the records in the cursor to the file in the k shell script.
Hi guys,
I have searched all the forums and searched the net as much as possible, but I carn't find any tutorials about shell scripting with Oracle. Has anyone come across any?
Thanks for reading and in advance of posts,
B14... (2 Replies)
Hi
I connected to oracle database through shell script
My requiremnt is to get more than one record from the sql query.
How can i do in unix to get multiple records. (1 Reply)
#! /bin/sh
abcd = "Hello world"
if
then
echo $abcd
fi
i got error message that
line3 : abcd: command not found
line5 : [0: command not found
line5 : [1: command not found
i have no idea why i got this message. Can some one help me ??? (6 Replies)
Hi! Everyone
I am new to the shell scripting basically.I have been asked to create a shell script that connect to a oracle database to read data from a particular schema then spool it into a csv file then email to customer.
Can anybody let me know how to go about that.
I have create... (14 Replies)
Hi,
My Oracle Stored procedure returns sys_refcursor to shell script. I have to iterate through it in script and use those retrieved values further in my script. I am using K Shell Scrpting.
Stored Procedure is:
create or replace
PROCEDURE p_test(job_id IN VARCHAR2, c1 OUT SYS_REFCURSOR)... (0 Replies)
Hi,
Please see contains both files created for automating the data from oracle through shell.
1)a_p.ksh
#!/bin/ksh
LOG=/home/A_P.log
MESSAGE=/home/MESSAGE_A_P.txt
mail_list=/home/AP_MAIL_LIST.txt
data=/home/spooled_A_P.log
echo "`date` Starting execution for A_P COUNT" > $LOG
... (2 Replies)
My Code is
get_week_date()
{
`sqlplus -s ${DQM_SQL_LOGON}@${DQM_SID} << EOF
SET ECHO OFF
SET FEEDBACK OFF
SET PAGES 0
SET SERVEROUTPUT ON
SET VERIFY OFF
SET TRIMSPOOL ON
(update file_level_qc fq set FQ.DATA_FILE_NAME='Hyvee_Pharmacy_Solutions_201304_v1.txt'... (2 Replies)
Hello,
I need to get all the members information from an oracle table whose flag value is enabled. Later on i need to perform several computation based upon the flag value and other columns. For example,
Member ID Flag Frequency date
1 ... (2 Replies)
Discussion started by: Krishraj
2 Replies
10. Forum Support Area for Unregistered Users & Account Problems
Hi,
I am trying to create a table through shell scripting . I used a command sqlplus -s to connect to sqlplus and user as sysdba. but there is a problem in it. can anyone please solve this .
#!/bin/bash
$(`sqlplus -s / as sysdba <<eof
create table sample (id,int);
insert into sample... (1 Reply)
Discussion started by: Unregistered
1 Replies
LEARN ABOUT CENTOS
sd_journal_get_cursor
SD_JOURNAL_GET_CURSOR(3) sd_journal_get_cursor SD_JOURNAL_GET_CURSOR(3)NAME
sd_journal_get_cursor, sd_journal_test_cursor - Get cursor string for or test cursor string against the current journal entry
SYNOPSIS
#include <systemd/sd-journal.h>
int sd_journal_get_cursor(sd_journal* j, char ** cursor);
int sd_journal_test_cursor(sd_journal* j, const char * cursor);
DESCRIPTION
sd_journal_get_cursor() returns a cursor string for the current journal entry. A cursor is a serialization of the current journal position
formatted as text. The string only contains printable characters and can be passed around in text form. The cursor identifies a journal
entry globally and in a stable way and may be used to later seek to it via sd_journal_seek_cursor(3). The cursor string should be
considered opaque and not be parsed by clients. Seeking to a cursor position without the specific entry being available locally will seek
to the next closest (in terms of time) available entry. The call takes two arguments: a journal context object and a pointer to a string
pointer where the cursor string will be placed. The string is allocated via libc malloc(3) and should be freed after use with free(3).
Note that sd_journal_get_cursor() will not work before sd_journal_next(3) (or related call) has been called at least once, in order to
position the read pointer at a valid entry.
sd_journal_test_cursor() may be used to check whether the current position in the journal matches the specified cursor. This is useful
since cursor strings do not uniquely identify an entry: the same entry might be referred to by multiple different cursor strings, and hence
string comparing cursors is not possible. Use this call to verify after an invocation of sd_journal_seek_cursor(3) whether the entry being
sought to was actually found in the journal or the next closest entry was used instead.
RETURN VALUE
sd_journal_get_cursor() returns 0 on success or a negative errno-style error code. sd_journal_test_cursor() returns positive if the
current entry matches the specified cursor, 0 if it does not match the specified cursor or a negative errno-style error code on failure.
NOTES
The sd_journal_get_cursor() and sd_journal_test_cursor() interfaces are available as a shared library, which can be compiled and linked to
with the libsystemd-journal pkg-config(1) file.
SEE ALSO systemd(1), sd-journal(3), sd_journal_open(3), sd_journal_seek_cursor(3)systemd 208SD_JOURNAL_GET_CURSOR(3)