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

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
LVL 1
peledcAsked:
Who is Participating?
 
SpideyModConnect With a Mentor Commented:
PAQ'd and points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0
 
rodchamberlinCommented:
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
 
M-AliCommented:
Try,

EXEC SQL ALTER SESSION SET SORT_AREA_SIZE=100000000;

HTH

Ali
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.