Skip to Content
author's profile photo Former Member
Former Member

file_move function input parameter lengths

Hi all,

It's marvelous that we, finally ⚠️, have some ready made functions for file copying and file moving, etc.

However, the DS 4.2 SP07 technical manual / reference guide does not describe the maximum input length for the source and target parameters.

I am now running into an issue with the file_move function and it seems that for certain file masks, DS is dropping parts of the filename/location name.

Due to circumstances outside of our control, the file location and file names are very long and it appears that the file_move function drops everything over 100 characters - resulting in failures.

Could someone please confirm what the max lengths are for the input parameters so that I determine if this is the actual cause of the problem?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jun 17, 2016 at 07:32 AM

    Hello Erik,

    Please check lenght of the global variables if you are using global variables for storing filenames and using them in file_move() function.

    Thanks,

    Ravi kiran.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 17, 2016 at 07:33 AM

    SAP Support.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 28, 2016 at 11:40 PM

    After a lot of wrestling with this function, including indeed the fact that one of the source global variables was a bit too short ( woops) - it seemed that we only can get this function to work with a local path, rather than an UNC path. Is that really the case? Has someone been able to use the file_move() function using UNC paths rather than local directory paths?
    (Our requirement is to move files from one server to another.)

    We have resolved this problem by writing a custom function with shell commands, the good old fashioned way of doing these things in Data Integrator/Data Services.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2016 at 02:58 AM

    Hi Ravi,

    Since we're pulling data to the DS environment, the appropriate function would be "copy_from_remote_system". However, these functions rely on the file location object.

    While the file location object is a nice feature, it is half complete - because we cannot reference it in scripting, it is a completely static path. In our particular use case, the remote system generates dynamic folder structures based on date and time. So we need to use programming logic to determine which files we need and where they are located. Using a static file location object just isn't an option for us.

    Regards,


    Erik

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.