Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pre-Compiler: how to execute an "alter session" statement?

Posted on 2002-07-01
4
Medium Priority
?
682 Views
Last Modified: 2008-02-07
Oracle 7.3.3
PreCompiler: Pro Cobol

Does anyone remember how can I run this statement inside the ProCobol:

Alter session set sort_area_size=100000000;

I tried the following:
EXEC-SQL EXECUTE
  ALTER SESSION SET SORT_AREA_SIZE=100000000;
END EXEC


Iget the following compilation error:
UNDECLARE SQL IDENTIFIER "ALTER" at line...



Thanks
0
Comment
Question by:peledc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Expert Comment

by:rodchamberlin
ID: 7123319
Have you tried "EXECUTE IMMEDIATE":

EXEC-SQL EXECUTE IMMEDIATE "ALTER SESSION SET SORT_AREA_SIZE=100000000";
END EXEC

I don't know pro-cobol, but execute immediate usually just passes whatever string you put in quotes straight to the engine.
0
 
LVL 6

Expert Comment

by:M-Ali
ID: 7124056
Try,

EXEC SQL ALTER SESSION SET SORT_AREA_SIZE=100000000;

HTH

Ali
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8492240
PAQ'd and points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious sideā€¦
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question