AcuParam1...AcuParam14 is a variant data item. It can hold values to be passed to the COBOL application as parameters, or you can set the data item before execution and have data returned when the program terminates.
Note that you will not get any data until the application has halted with STOP RUN, GOBACK or EXIT PROGRAM. You should call the method, AcuIsActive, before trying to access the data. When AcuIsActive returns false ("0"), the data is available, provided there is any data.
Parameter Type | Input | Output |
---|---|---|
variant | [ ] | [TRUE, FALSE] |
Because this is variant, the properties accept any variant-compliant data type: numbers, float, strings, etc.
For example:
AcuGTAX.AcuParam1 = "C:\TMP" CurrentParam = AcuGTAX.AcuParam1
These properties are available any time after the Web runtime has been invoked. The contents of each property specified are read and applied to the runtime when AcuExecute is invoked.
You can use these additional properties to specify more parameters for the COBOL application. Note that to access properties, you must use C$GETVARIANT in your COBOL program.
Here is a Visual Basic example:
' Cobol test variables Public testNum As Variant Public testStr As Variant Public testLongNum As Variant Public testfloatNum As Variant Dim CobolApp As Object Set CobolApp = New AcuGT ' Set up config and error files strCommandLine = _ "-c acuvb.cfg -dle acuerr.log" CobolApp.Initialize strCommandLine ' Set initial values testNum = 123 testStr = "qwertyuiopasdfghjklzxcvbnm" testLongNum = 1234567890 testfloatNum = 23.4 Label1.Caption = testNum Label2.Caption = testStr Label3.Caption = testLongNum Label4.Caption = testfloatNum Label9.Caption = "Before Cobol Call" returnValue = CobolApp.Call("astest", testNum, testStr, testLongNum, testfloatNum) 'Values after cobol program. This did not work before. Label1.Caption = testNum Label2.Caption = testStr Label3.Caption = testLongNum Label4.Caption = testfloatNum Label9.Caption = "After Cobol Call"