|
From: David E. <de...@us...> - 2005-08-12 16:16:28
|
John R. Culleton wrote: > In many other languages it is easy to send a command to the > operating system and view the results. on sysout. I can I > suppose write an assembly language routine to do this, but it > would be nicer if someone else did it :<). I am thinking of > something along the lines of: > > CALL SYSTEM USING "ls -l *cpy". > > to get a listing of copybooks in the current directory. > > Thoughts? You can call any C library function. To achieve a 'system' call try using some thing like the following example. Example: ... 01 parm1. 05 parm1-value1 pic x(20). 05 parm1-value2 pic x(01) value x"00". ... move "ls -l *.cpy" to parm1-value1. CALL 'system' USING parm1. Note that since you a calling a C function, the string must be NULL terminated. |