There is an OPS/MVS OPSAPI function. The Command and Reference manual describes this, but also refers to an equivalent TSO CMD processor. However that is not described, nor is there any help for it.
Where can I find how to call this OPSAPI cmd?
In REXX as a function:
OPSAPI(“EVTCODE(„eventcode‟) EVTTEXT(„text’)”) That works fine, but as a tso command
TSO OPSAPI EVTCODE(„eventcode‟) EVTTEXT(„text’) gives: Command buffer internal format error. detected by OPSAPI
Use the OPSAPI within OPS/REXX programs, TSO/E programs, or OMVS scripts.Additionally, an OPSAPI command processor version of this function exists. Use thisversion from the TSO foreground or in batch, if needed.
So.. what is the TSO syntax?
(all tested in r12.2)
I was able to reproduce the problem you are reporting using the OPSAPI function as a Command Processor from the TSO/ISPF environment. If you use: TSO OPSAPI then you get:
Command buffer internal format error. detected by OPSAPI***
Same errors occurs if you try it form TSO/ISPF option 6:
As for the missing documentation on how to use this function as a command processor I have looked back from unsupported release 11.5 and found that this function has been out for a while but it was not formally documented until release 12.2 and forward. So I tried from TSO/ISPF option 6:
OPSAPI EVTCODE('OPWSTEST') EVTTEXT('HELLO WORLD!')
OPS9521S Command buffer internal format error. detected by OPSAPI***
This is an excerpt of what this message is about:
OPS9521S Command buffer internal format error. detected by cmd Modifiable: Yes Explanation: An invalid command buffer format was detected by the command syntax processing routine. Either no operands were specified or the internal format of the buffer was not a TSO CPPL, a JCL EXEC parameter, or a REXX function parameter list. Action: Review the command syntax for this command and the environments in which this command may be used. Supply the correct number of arguments required by the command. Contact your local CA OPS/MVS systems programming group for additional help. The variable fields of the message text are: cmd Command processor name
I am going to continue trying it and as soon as I have it resolved I will let you know.
We will then update the documentation with a workable example.
Let me know if this all sounds good Marcel.
Marcel, the OPSAPI module only supports being a rexx function.
Ok, then the quoted passage in my question should be removed from the manual.....
Marcel van Ek
Wanted to take a moment today to confirm message OPS9521S is also produced if an attempt to use the OPSAPI module from a batch JCL and parameters are passed using the EXEC PARM= statement.
Will proceed to contact our Product Documentation team so the online documentation is revised.