#g4msod_downloadItem
*//////////////////////////////////////////////////////////////*
* g4msod_downloadItem - Download an Item *
* *
* Output: *
* out_errMsg - The error message (if error exists). *
* *
* Returns: *
* -1 for error, number of bytes for success *
* *
* Settable Variables ([r]=required) *
* id - MS ID [r] *
* item_id - The ID of the item to delete. Either this or *
* path is required. [r] *
* path - The fully qualified name of the file or folder to *
* delete. Either this or item_id is requred. [r] *
* download_to_filename - The fully qualified path of the *
* file that is downloaded. [r] *
* replace_file - Specify if the file exists to replace it. *
* (*YES, NO). *YES is the default. *
* group_id - Specify the group ID to download files from. *
* group_name - Specify the group Name to download files from.*
* ccsid - The CCSID to use (1252) *
* debug - Turn on Debug (*NO, *YES) *
* debug_file - The debug file name. *
* (/tmp/g4ms_[id]_downloadItemDebug.txt) *
* *
*//////////////////////////////////////////////////////////////*
D g4msod_downloadItem...
D PR 20i 0
D out_errMsg 256 Options(*NOPASS)
g4msod_downloadItem will download the specified file to the IFS on your IBM i.
Returns: -1 for error, number of bytes downloaded for success.
Optional Parameters:
Error Message (output) - Error message
Settable Variables (use #g4msod_setValue):
id (required) - Your Microsoft ID
item_id - The id of the item. Either the item_id or path must be used. Using the item_id will result in faster execution.
ORpath - The fully qualified path to the item you wish to delete.
ie: /my Documents/Files/test.pdf
This parameter IS case sensitive.
download_to_filename - The fully qualified path to dowload the file to on your IFS.
ie: /myfiles/download.pdf
replace_file - Specify *YES to replace the file in the IFS if it already exists. *YES is the default.
group_id - Specify the group ID to download files from.
group_name - Specify the group name to download files from. This will be ignored if the group_id is specified.
ccsid - The CCSID to use. The default is 1252.
debug - Specify *YES to turn on debug, or *NO to turn off debug. The default is *NO.
debug_file - Specify the fully qualified file name for the main debug file. The default is /tmp/g4ms_[id]_downloadItemDebug.txt.[n] where [id] is the Microsoft ID and [n] is the request index.