Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: C$OSLockInfo not works with MF format files

$
0
0

Hi mikmng,

Since wholock is not a subprogram like C$OSLockInfo, I don't believe you'll be able to call it directly as a subroutine. However, you can use the Micro Focus function CALL "SYSTEM" to invoke wholock, with something like:

      move spaces to who-command
      move "testfile.dat" to file-to-check
      string
         "wholock "       delimited by size
         file-to-check    delimited by space
         " >wholock_results.txt"
         x"00"
        into who-command
      end-string
      call "SYSTEM" USING who-command

Then, your program could read the contents of wholock_results.txt to determine the offending process(es). (Please bear in mind that this is a simple example, and is not meant to be used in a real application without some further coding.)


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>