Skip to main content

here is the example :

I'm facing problem with the path max length when using (( Call "CBL_COPY_FILE"))

in this example didn't work:

           Call "CBL_COPY_FILE"

                 Using "\\HANA\\ACCTING\\DATA\\VNDR-file.DAT"

                       "\\HANA\\ACCTING\\DATA\\TMP\\VNDR-file.DAT"

                         Returning ws-file-status.

But when I changed the file-name to smaller size it does work:

           Call "CBL_COPY_FILE"

                 Using "\\HANA\\ACCTING\\DATA\\VDR-file.DAT"

                       "\\HANA\\ACCTING\\DATA\\TMP\\VDR-file.DAT"

                         Returning ws-file-status.

here is the example :

I'm facing problem with the path max length when using (( Call "CBL_COPY_FILE"))

in this example didn't work:

           Call "CBL_COPY_FILE"

                 Using "\\HANA\\ACCTING\\DATA\\VNDR-file.DAT"

                       "\\HANA\\ACCTING\\DATA\\TMP\\VNDR-file.DAT"

                         Returning ws-file-status.

But when I changed the file-name to smaller size it does work:

           Call "CBL_COPY_FILE"

                 Using "\\HANA\\ACCTING\\DATA\\VDR-file.DAT"

                       "\\HANA\\ACCTING\\DATA\\TMP\\VDR-file.DAT"

                         Returning ws-file-status.

The API needs a space after the filename:

 

Call "CBL_COPY_FILE"
     
Using "\\HANA\\ACCTING\\DATA\\VNDR-file.DAT "
           
"\\HANA\\ACCTING\\DATA\\TMP\\VNDR-file.DAT "
      Returning ws-file-status.

 

To quote the docs:

On Entry:
filename1 The file to copy. The name can contain a path and is terminated by a space. If no path is given, the current directory is assumed.
filename2 The name of the new file. The name can contain a path and is terminated by a space. If no path is given, the current directory is assumed.

 

You can use the API CBL_FILENAME_MAX_LENGTH to get the max filename length.