cancel
Showing results for 
Search instead for 
Did you mean: 

Unix - Cobol

Sathish C
Frequent Advisor

Unix - Cobol

Is it possible to pass an argument to an Unix system call command in Cobol .

Ex

Inside cobol

EXHIBIT NAMED WS02-OUTPUT-FILE-NAME.
call "system" using by reference 'll WS02-OUTPUT-FILE-NAME" GIVING AR02-STATUS
Some cause happiness wherever they go; others, whenever they go
1 REPLY
Jean-Luc Oudart
Honored Contributor

Re: Unix - Cobol

We use it this way
CALL 'SYSTEM' USING WSAA-CMD

with :
01 WSAA-CMD.
03 FILLER PIC X(8) VALUE ' 03 FILLER PIC X VALUE x'00'.

You can also trp the return code :

CALL 'SYSTEM' USING WSAA-CMD RETURNING return-code
The type for return code is explained in tge Cobol reference manual.

Regards,
Jean-Luc
fiat lux