SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
File size limitation with JAL filecopy?

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
File size limitation with JAL filecopy?
Author Message
DLUTER



Joined: 16 Mar 2007
Posts: 44
Country: United States

Post File size limitation with JAL filecopy? Reply with quote
I'm moving backup files that are 15+ gb in size and i'm getting the following error.

"An error occurred while executing 24x7 script: Line 73: Error copying file "\\**SERVER**\Directory\SubDirectory\SERVER_2_3.tvzc". Error: 0 - The operation completed successfully."

The file is copied correctly but I'm wondering if this is a timeout issue or a filesize issue? I'm using the Filecopy command within 24x7.

Thanks for any help
David
Fri Oct 24, 2008 2:18 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Reply with quote
FileCopy internally calls Windows system function CopyFile and according to Microsoft documentation

-------------
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
-------------

24x7 senses zero return value and reports this as an error.

Here is my guess, which I cannot completely verify. the system CopyFile is a 32-bit function, meaning that the maximum number that can fit into an integer value for any parameter or return value is 4 GB. It likely returns some non-zero code indicating how many bytes have been copied or something like that. When copying files over 4 GB in size, something doesn't work internally and it is unable to report the correct return value, returning 0 instead. So while the file is copied correctly, the return code is not reliable, leading to a side effect in 24x7 reporting it as an error.

To remedy this issue, I suggest the following workaround

Code:
// copy file using custom error handling
OnErrorResumeNext
FileCopy . . .the same code that you have now. . .
GetLastError( error_message )
OnErrorStop

// now check error message for "completed successfully" sub-string, if present, jump to the end of job, else raise error
Pos( error_message, "completed successfully", 1, ok )
IfThen( ok, DONE )

// raise error
RaiseError( error_message )

DONE:

Fri Oct 24, 2008 2:59 pm View user's profile Send private message
DLUTER



Joined: 16 Mar 2007
Posts: 44
Country: United States

Post Reply with quote
Thanks, i'll give that a shot.
Fri Oct 24, 2008 4:54 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.