DELETE
This keyword can be used to delete a file from a specified directory.
DELETE -------- FILE -------- file path -------------------------|
Keywords
FILE |
This keyword is used to define the file name to be deleted. The file path must be included. It is recommended to use the forward slash as the path separator and to avoid the use of the DOS drive designator. The format of the path should be as follows: For Windows you can specify:
For the IBM i you can specify:
This keyword is mandatory. |
Examples
RDML
* Define JSM fields
DEFINE FIELD(#JSMSTS) TYPE(*CHAR) LENGTH(020)
DEFINE FIELD(#JSMMSG) TYPE(*CHAR) LENGTH(256)
DEFINE FIELD(#JSMCMD) TYPE(*CHAR) LENGTH(256)
* Delete
CHANGE FIELD(#JSMCMD) TO('''DELETE FILE(orders/order.json)''')
USE BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG)
RDMLX
* Define the fields used by the JSM Commands
Define Field(#JSMSTS) Type(*CHAR) Length(020)
Define Field(#JSMMSG) Type(*CHAR) Length(256)
Define Field(#JSMCMD) Type(*CHAR) Length(256)
Define Field(#JSMHND) Type(*CHAR) Length(4)
* Delete
Change Field(#JSMCMD) To('''DELETE FILE(orders/order.json)''')
Use Builtin(JSMX_COMMAND) With_Args(#JSMCMD) To_Get(#JSMSTS #JSMMSG #JSMHND)