
Return to the IFS Tips
Delete of an IFS file
D unlink PR 10I 0 ExtProc('unlink')
D path * Value
D rmdir PR 10I 0 ExtProc('rmdir')
D path * value
D killme S 50A
C* Delete the file
c eval killme = '/\timtest/qs1testfile.csv' +
x'00'
c callp unlink(%addr(killme))
C* Delete the directory
c eval killme = '/\timtest' + x'00'
c callp rmdir(%addr(killme))
c eval *inlr = *on
for those who can target the V3R7 + releases, below
is a simpler version of Scott's code that takes advantage of the
wonderful *String option. I have keyed the changes to the prototype in upper
case to make them more obvious. The changes to the C specs speak for
themselves.
D unlink PR 10I 0 ExtProc('unlink')
D path * Value OPTIONS(*STRING)
D rmdir PR 10I 0 ExtProc('rmdir')
D path * value OPTIONS(*STRING)
D killme S 50A
* Delete the file
C callp unlink('/\timtest/qs1testfile.csv')
* Delete the directory
C callp rmdir('/\timtest')
C eval *inlr = *on
[report a broken link by clicking here]






