John R. Culleton wrote:
> I recal that some COBOL variants had a statement
> like CALL "SYSTEM" USING FIELDX for passing comand
> line strings to the CLI.
> I know I could link in a C language module to do
> this but I just wonderd if there was a built in
> function.
When using TC to create a module or executable, the RTL requires the C
library to link.
So you so not need a C language module, or special CALL.
As per your example above.
01 FIELDX.
05 FIELDX-CMD X(25) value 'ls -la'
05 FIELDX-END X value x'00'.
...
CALL "system" USING FIELDX
Hint when calling C functions.
Case is important and any C string parameters should be NULL terminated.
Hope this helps.
|