Advertisement

04.30.2008 at 07:31AM PDT, ID: 23365425
[x]
Attachment Details

#1.How to Pass variables into a atomic script in db2. Something like DEFINE in oracle pl/sql block. And #2 is Is there a way to use INTO clause in select statements in and atomic sqlpl script.

Asked by boppanak in AS / 400, DB2 Database, IBM AIX Unix

Tags: , ,

I have a script file named abcd.pl code like this...

BEGIN ATOMIC
       DECLARE abcd VARCHAR(50);
       SELECT xxxx
           INTO abcd
           FROM <table>;
END;

This is throwing out an error saying that abcd is not a valid after INTO.
Can some one suggest an alternative ?

I have another quick question.....
How can we pass Input variables into a script like above while calling it from a Unix prompt. Like...
$db2 -td@ -f abcd.pl <PARM1> <PARM2> ...etc.Start Free Trial
[+][-]04.30.2008 at 07:44AM PDT, ID: 21471157

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 08:43AM PDT, ID: 21471801

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 09:03AM PDT, ID: 21472024

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.05.2008 at 12:55PM PDT, ID: 21502516

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: AS / 400, DB2 Database, IBM AIX Unix
Tags: db2, unix, How to pass variable from shell script into atomic sqlpl in db2.
Sign Up Now!
Solution Provided By: Kdo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.13.2008 at 12:37AM PDT, ID: 22219788

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.22.2008 at 06:02PM PDT, ID: 22295311

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628