FTP to Mainframe-Invalid Dataset Error-FTP Enterprise Stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
suja.somu
Participant
Posts: 79
Joined: Thu Feb 07, 2013 10:51 pm

FTP to Mainframe-Invalid Dataset Error-FTP Enterprise Stage

Post 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 ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post 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.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
suja.somu
Participant
Posts: 79
Joined: Thu Feb 07, 2013 10:51 pm

Post 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.
Post Reply