• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 687
  • Last Modified:

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
0
peledc
Asked:
peledc
1 Solution
 
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
 
SpideyModCommented:
PAQ'd and points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now