g4msod_upload
*//////////////////////////////////////////////////////////////*
* g4msod_upload - Upload File *
* *
* Output: *
* out_errMsg - The error message (if error exists). *
* If no error exists this will contain the *
* name of the file that is uploaded. *
* *
* Returns: *
* -1 for error, 1 for success *
* -2 token is expired * * *
* Settable Variables ([r]=required) *
* id - MS ID [r] *
* upload_file - The fully qualified path of the file in the *
* IFS to upload. [r] *
* upload_file_name - The name of the file as it will exist *
* in the OneDrive. Blank or *DFT will use the name *
* of the file in the upload_file parameter *
* upload_file_content_type - Specify the content type of *
* the file to upload. Blank or *DFT will use the content *
* type of the file name used. *
* upload_to_folder - Specify the fully qualified path of *
* the folder on the OneDrive to upload the file to *
* (case sensitive). The value of Blank or *ROOT will *
* upload the file to the root folder. *
* replace_file - Specify *YES to replace the file if it *
* exists or *NO to add another file with the same name. *
* The default is *YES. *
* choose_new_name - Specify if you want OneDrive to rename *
* the file if one with the same name already exists. *
* The default is *NO. *
* group_id - Specify the group ID to upload to. *
* group_name - Specify the group Name to upload to. *
* ccsid - The CCSID to use (1252) *
* debug - Turn on Debug (*NO, *YES) *
* debug_file - The debug file name. *
* (/tmp/g4ms_[id]_upload.txt) *
* *
*//////////////////////////////////////////////////////////////*
D g4msod_upload...
D PR 10i 0
D out_errMsg 256 Options(*NOPASS)
g4msod_upload will upload a file from your IFS to your Microsoft OneDrive.
Returns: 1 for successful upload, -1 for error, -2 for expired token.
Optional Parameters:
Error Message (output) - If there is an error, this will contain the Error message. If the upload is successful, this will contain the name of the file after it is uploaded.
Settable Variables (use #g4msod_setValue):
id (required) - Your Microsoft ID.
upload_file - The fully qualified path to the file you wish to upload.
upload_file_name - The name of the file as it will appear in your OneDrive.
upload_file_content_type - The Content Type of the file you are uploading.
upload_to_folder - The OneDrive you wish to upload the file to. *ROOT can be used as a special value to designate the "root" directory
replace_file - Specify *YES (default) to replace a file if it exists when uploading it or *NO to add another file with the same name if the file already exists.
choose_new_name - Specify *YES to tell OneDrive to choose a new filename if the file already exists.
group_id - Specify the group ID to upload to.
group_name - Specify the group name to upload to. 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.