Problem solve Get help with specific problems with your technologies, process and projects.

Delete the IFS object in a batch

The following tip shows you how to delete log files.

In order to maintain disk space, log files in batch need to be deleted after every week or so. The following information...

shows you how you can delete the log files (these files exist in IFS file system).

Suppose that the log file default_server_stderr.log should be deleted after every week. The following CL programs can be scheduled to run in batch every week.


 
*********************************************************************
CL program - delifsFILE

CRTCLPGM PGM(&LIB/delifsFILE) SRCFILE(&LIB/QCLSRC) SRCMBR(delifsFILE) 
*********************************************************************

PGM 

RMVLNK OBJLNK('/QIBM/UserData/WebASAdv/default/log +
s/default_server_stderr.log')               

MONMSG     MSGID(CPFA0A9)



ENDPPGM

**********************************************************************


if the whole directory 'log' to be deleted, modify the command as follows:

RMVLNK OBJLNK('/QIBM/UserData/WebASAdv/default/log')        
  
 

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close