Page 1 of 1

FTP to Mainframe-Invalid Dataset Error-FTP Enterprise Stage

Posted: Wed Mar 20, 2013 4:11 pm
by suja.somu
I have to FTP a fixed width file from Datastage( windows server) to the Mainframe system.
The file is GDG based in mainframes.

Job design:
Seq file ( fixed width file) ---> FTP enterprise stage

Fixed file name : B190S.PBAS.CPEAR.P(+1).txt
Dataset created in mainframe: TB190S.MAIN


Properties set in FTP enterprise stage
URI = ftp://10.251.245.1/\'TB190S.MAIN.CPEAR\'
ftp command = ftp
Password = *****
User name = MAIN
Transfer mode = FTP
Transfer type = ASCII

Left the format tab with default properties.


The job is giving an error

FTP_Enterprise_0,0: error: ftp returned 501
ftp msg: 501 Invalid data set name "'TB190S.MAIN.CPEAR'". Use MVS Dsname conventions.

Where is the problem here ?

Posted: Wed Mar 20, 2013 4:44 pm
by chulett
Seems to me the problem is clearly stated in the error message. If you don't know what the "MVS Dsname conventions" are I'd suggest you check with someone on the other end of the transfer.

Posted: Thu Mar 21, 2013 7:37 am
by FranklinE
A general FAQ is available at viewtopic.php?t=143596

Naming the mainframe dataset is a precise requirement. From the code and messaging you posted, you have clear inconsistencies.

1) You must logon to the mainframe and see the exact name of (in this case) the GDG base.

2) You must have no slashes of any kind in the dataset name in your stage.

3) The entire dataset name, from first character to (in this case) the final parenthesis enclosing the GDG generation number must be enclosed with single quotes.

Sample uri (using environment, job and stage parameters):

Code: Select all

ftp://#$pftpserver#/'#$pMVShlq#.#pREGN#.#pDataset_name#(#pGDG#)'
The syntax is also precise. You cannot have any extra spaces or other characters. The ftp host server is as seen, ending with a slash. From the open single quote to the closing single quote is the exact dataset name. In most MVS systems, the first qualifier (delimited by period) and second qualifier are standardized for the environment in which you are processing (production, test, etc.). The value of pDataset_name will contain the rest of the name with periods delimiting it as required.

Posted: Mon Apr 01, 2013 3:52 pm
by suja.somu
Thanks Frank.

I corrected the syntax error in the URI

from
URI = ftp://10.251.245.1/\'TB190S.MAIN.CPEAR\'

to
URI = ftp://10.251.245.1/'TB190S.MAIN.CPEAR'

and this solved the problem.