Getting error for "file exists" command of FTP - Qualifier too long. Use MVS naming conventions

Hello, can anyone help-

Directory exists is working but

I am getting this error for file exists activity -

I have replaced it with “FWTPS.UPLOAD.A”, still same error

I am not sure if I passing the remote path in correct format, Did anyone face the same issue?

This error “Qualifier too long. Use MVS naming conventions” usually means while using FTP activities, it typically means that the file path or dataset name you’re trying to access or create on the mainframe via FTP does not conform to the MVS naming conventions.

  • MVS dataset names have strict length restrictions. Each segment (qualifier) of the dataset name should not exceed 8 characters, and the total length of the dataset name should not exceed 44 characters.
  • Each qualifier must start with an alphabetic character (A-Z) or a national character (#, @, $).
  • Each qualifier must be 1 to 8 characters long.
  • Qualifiers are separated by periods (.)
  • The total length of the dataset name, including periods, must not exceed 44 characters.
  • Shorten the name of the dataset or directory you are trying to access to meet these conventions. Ensure that each qualifier in the path is within the allowed length.
  • Double-check the path you are using in the FTP activity and make sure it is correctly formatted according to MVS standards.

Details in the below link relating to the error encountered: Qualifier too long. Use MVS naming conventions

This is encountered while listing, which doesn’t work for z/OS (MVS) datasets.

Though the expected path is provided, the error may encounter due to FluentFTP dependency on the FTP package.

Try using in UiPath Studio the UiPath.FTP.Activities.2.4.0 as it uses now the FluentFTP [51.1.0, )
In the UiPath.FTP.Activities.2.3.0 it uses FluentFTP [34.0.0, )

Based on FluentFTP -501 Qualifier too long when calling UploadAsync in zOS server · Issue #735 · robinrodricks/FluentFTP · GitHub the issue was solved in FluentFTP V39, V40

Kindly confirm whether you are giving full path including extension or not

@Ranveer_S_Thakur

You have to give the path from base to the file you are checking something which looks like relative path

Cheers

Hello Marian,

Thank you for your response, we are still using 2023.4.3 on our DEV machines, I could not find 2.4.0 version of FTP package. We might have to upgrade the studio version, is it?

Best regards,
Ranveer

Hello @sharazkm32, Thank you for your response!
I am giving this in remote path “FWTPS.UPLOAD.JERECS” (without extension) in UiPath activity. I am not sure what to give in extension.

For reference, this is how it looks like in FTP terminal-

Hello @Anil_G, thank you for response.

This is how I am passing in the input parameter- “FWTPS.UPLOAD. JERECS”. is it not from base path? Can you please provide an example?

@Ranveer_S_Thakur

Basically from homedfls\..\file

Cheers

Try to add this package feed source https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json in your Studio and retry.

@Anil_G-
is it for remote path? I also tried this as FWTPS\UPLOAD\JERECS”, it gives error

@marian.platonov thank you!
It is not giving any error now, but I do not get the expected output, do we have to add the extension of file?

This is the documentation Activities - Upload Files but is not specified.

Try and fail and let us know the solution

@Ranveer_S_Thakur

please five the filename and extension you need too

like this FWTPS\UPLOAD\JERECS\abc.pdf

giving fullpath including the required name would work for folder path

cheers

@Anil_G

I tried with "FWTPS\UPLOAD\JERECS.prn” - (Path along with extension)

It gives error - Code: 501 Message: Qualifier too log

Please refer the screenshot-

Sure @marian.platonov, will try.

I am confused because, “Directory Exists” for " FWTPS.UPLOAD" works fine, return true, but the “File Exists” for " FWTPS.UPLOAD.JERECS.prn" (with and without extension) return false

For reference - this is how it looks in FTP

Try using the Enumerate Objects activity for debug and observe how the files are looking.

I got this as Output for Enumerate objects

Hello @marian.platonov ,

I am facing issue while uploading the file , can you please help

Here is the error:
Upload Files: One or more errors occurred. (Error while uploading the file to the server. See InnerException for more info.)

and screenshot with all the (FTP scope properties details and input to upload files):

Can you try to perform a Try Catch for the failed activity
In the Catch for System.Exception as exception
Throw a exception.InnerException

What that exception.InnerException says?

It gives this error:

FluentFTP.Exceptions.FtpException: Error while uploading the file to the server. See InnerException for more info.
—> FluentFTP.Exceptions.FtpCommandException: Code: 501 Message: Invalid data set name “FIWTPS.UPLOAD./JERECS”. Use MVS Dsname conventions.
at FluentFTP.FtpClient.OpenPassiveDataStream(FtpDataConnectionType type, String command, Int64 restart)
at FluentFTP.FtpClient.OpenDataStream(String command, Int64 restart)
at FluentFTP.FtpClient.OpenWriteInternal(String path, FtpDataType type, Int64 fileLen, Boolean ignoreStaleData)
at FluentFTP.FtpClient.UploadFileInternal(Stream fileData, String localPath, String remotePath, Boolean createRemoteDir, FtpRemoteExists existsMode, Boolean fileExists, Boolean fileExistsKnown, Action1 progress, FtpProgress metaProgress) --- End of inner exception stack trace --- at FluentFTP.FtpClient.UploadFileInternal(Stream fileData, String localPath, String remotePath, Boolean createRemoteDir, FtpRemoteExists existsMode, Boolean fileExists, Boolean fileExistsKnown, Action1 progress, FtpProgress metaProgress)
at FluentFTP.FtpClient.UploadFileFromFile(String localPath, String remotePath, Boolean createRemoteDir, FtpRemoteExists existsMode, Boolean fileExists, Boolean fileExistsKnown, FtpVerify verifyOptions, Action1 progress, FtpProgress metaProgress) at FluentFTP.FtpClient.UploadFile(String localPath, String remotePath, FtpRemoteExists existsMode, Boolean createRemoteDir, FtpVerify verifyOptions, Action1 progress)
at UiPath.FTP.FtpSession.<>c__DisplayClass31_0.<UiPath.FTP.IFtpSession.UploadAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
— End of stack trace from previous location —
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
— End of stack trace from previous location —
at UiPath.FTP.FtpSession.UiPath.FTP.IFtpSession.UploadAsync(String localPath, String remotePath, Boolean overwrite, Boolean recursive, CancellationToken cancellationToken)
at UiPath.FTP.Activities.UploadFiles.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)