CALL "C$DELETE" USING fileName [fileType] GIVING returnCode |
fileName | PIC X(n) | Specifies the name of the file to be deleted. If the file name starts with "@[DISPLAY]:", the file will be searched on the client in an Application Server. If the file name starts with "isf://", the file will be searched via the File Server specified in the name. See The ISF protocol for more information. |
fileType | PIC X(1) | Specifies the file type. Valid values are: "I" File is Indexed. "R" File is Relative. "S" File is binary Sequential, the default. The default type "S" is suitable to delete generic disk files like PDFs. File type "I" is useful in cases where the original file is held in more than one physical disk file (for example, JIsam and c-tree files are physically held in two separate files). With File type "I" the file name is passed to the indexed file handler APIs so it must be suitable for them. For example, if the file handler is JIsam, avoid the "dat" extension and use a server side path. |
0 | Operation successful, the file has been deleted. |
1 | An error occurred, the file has not been deleted. |
*> define retCode as pic 9(n) call "c$delete" using "/myapp/tmp/cust_828383838322323.tmp" giving retCode if retCode = 0 display message "Temp file was deleted" else display message "Error deleting temp file" end-if. |