tags:

views:

107

answers:

2

I need to pass the TRAP(OFF) runtime option to an IBM AIX COBOL application. The problem is, I have no idea how to do that, and I can't find anything in the IBM documentation on how to do that. I've tried export TRAP=OFF in my runscript, but that didnt do it. Does anyone know how to do this?

+1  A: 

Depending on the flavor of COBOL (I use AcuCOBOL) you can accept data into a working storage variable from a command line option like so:

ACCEPT WS-CMD-LINE FROM COMMAND-LINE.

You can also set an environment variable like you are trying to do and ACCEPT it like so:

ACCEPT WS-ENV-VAR FROM ENVIRONMENT "TRAP".

Hope this helps!

Buggabill
+2  A: 

In order to set runtime options for applications created with COBOL for AIX, one must set the environment variable COBRTOPT to contain the options to be set. For example, to set TRAP(OFF) :

export COBRTOPT="TRAP(OFF)"

I will ask our documentation writers to clarify the documention by perhaps linking the second reference back to the first.

Dwayne Moore
Thanks, that did it!
Jeff Shattock