Page History
...
The service determines the encoding to apply to the Unicode content to convert it to byte content and determines if the Unicode data needs to be archived.
Syntax:
Command | Keyword | Value | Developer notes |
|---|---|---|---|
WRITE | FILE | value | Required. File path. |
HOST | host:port | Conditional. Only required when writing to an FTP server. | |
USER | value | Conditional. Only required when writing to an FTP server. | |
PASSWORD | value | Conditional. Only required when writing to an FTP server. | |
NAMEFMT | 0 | Conditional. Only required when reading from an FTP server. 0 indicates an IBM i path name format library/file.member is to be used. Note: no default value. | |
1 | 1 indicates a Windows path name format /directory/directory/file is to be used. | ||
DATALINK | *PORT | Conditional. Only required when writing to an FTP server. | |
*PASV | Default. | ||
MODE | *ASCII | Conditional. Only required when writing to an FTP server. | |
*BINARY | Default. | ||
CONTENT | *CSV | Default. Write content as CSV data. | |
*TSV | Write content as TSV data. | ||
*SV | Write content as separated by a value as specified in the SEPARATOR keyword. | ||
SEPARATOR | Optional. See SEPARATOR. | ||
ENCODING | Optional. See ENCODING. | ||
SVQUOTE | Optional. See SVQUOTE. | ||
SVHEAD | Optional. See SVHEAD. | ||
SVEXCLUDE | Optional. See SVEXCLUDE. | ||
SVLABEL | Optional. See SVLABEL. | ||
SVTABLE | Optional. See SVTABLE. | ||
SVCOLUMN | Optional. See SVCOLUMN. | ||
APPEND | *YES | Optional. Append to existing file. | |
*NO | Default. | ||
NUMBERFORMAT | Optional. See NUMBERFORMAT. | ||
ARCHIVE | Optional. See ARCHIVE. |
Example
WRITE FILE(/folder/file.csv) #WRKLST(field,field,field)
WRITE FILE(/folder/file.csv) SVTABLE(TBLORDER) SVCOLUMN(TBLORDER) SVLABEL(23) SVHEAD(ORDER)