You must be logged in to use the copy button.

        
**Free
Ctl-Opt
  Copyright('Copyright JAS, Inc.')
  Option(*SrcStmt :*NoDebugIO)  CCSID(*CHAR:*JOBRUN)
  DftActGrp(*No) DecEdit(*Jobrun) ALWNULL(*USRCTL)
  ActGrp('TEST')
  BNDDIR('JASTOOL');

/define ifs_Obj_Exists_PR
/copy qProtosrc,JSIFSOBJEX

// Check if ifs library /home/JSUPE exists
if ifs_Obj_Exists('/home/JSUPE');
  Dsply 'Object found';
else;
  Dsply 'Not found';
endIf;

// Assuming that '/home/JSUPE/test.txt' exists
// I want to check if I have write access permission to it
if ifs_Obj_Exists('/home/JSUPE/text.txt' :2);
    Dsply 'You have write access on this file';
else;
  Dsply 'You do not have write access on this file';
endIf;

*Inlr = *on;