FTP from unix to mainframe

Hi,

I am trying to FTP a file from a unix server to mainframe. I have no idea how these main frames work
but I have been told to use a specific remote file name for that file which is AAAA.BB.CCCCCCCC.XXXXX.DDD
I used
ftp <remote server>
logged in and I was in
changed the local directory to the desired one where my file file1 is there using lcd
then typed
put file1 AAAA.BB.CCCCCCCC.XXXXX.DDD

I got an error saying
501 Invalid data set name. Use Dsname conventions.

I tried using single quotes and double quotes
put file1 'AAAA.BB.CCCCCCCC.XXXXX.DDD'
put file1 "AAAA.BB.CCCCCCCC.XXXXX.DDD"

But the same error showed up.
Any help is much appreciated.
Thanks





coolhusla1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CassavatechCommented:
Maybe this quote helps you :


When you logged on you
probably saw a message similar to: 230 xxxxxxx is logged on.  Working
directory is "xxxxxxx.".

To FTP the file to dataset xxxx.xxxxxxxx.xxxx.xxx.xxxx on MVS you need three
single quotes (''') on each end of the DSN, as in:
put ourlibrary/ourfile.member '''xxxx.xxxxxxxx.xxxx.xxx.xxxx'''

Scott Ingvaldson
AS/400 System Administrator
GuideOne Insurance Group
0
coolhusla1Author Commented:
Yes , it says that it logged on
230 XXXX is logged on.  Working directory is XXXXX

Now I tried to use
put file1 '''AAAA.BB.CCCCCCCC.XXXXX.DDD'''
It still says
200 Port request OK.
501 Invalid data set name .  Use MVS Dsname conventions.


0
NopiusCommented:
Try to rename local file to AAAA.BB....
then to put it there.
Also possibly remote FS doesn't support such names and uses something like 8+3 naming convention.
Please specify what is remtote mainframe OS/filesystem.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

giltjrCommented:
You need to check with somebody on the MVS side, normally the network system programmers.  A couple of pointers:

     By defualt you need to use a single quote on each end of the mainframe DSN.  'AAAA.BB.CCCCCCC.DDD' anything else will cause problems, not double quotes, not mutliple single quotes.  You company may have exits in place that require you to use something else, but by default it is single quotes.

     None of the levels on the MF name can start with a digit.  The levels are the things inbetween the dots.  That is you can have a name called 'MY.FIRST.DSN', but you can't have a file called 'MY.1ST.DSN'

    It is possible that the names must match a specific convention and you are not using that convention.  Such as the first level (AAAA) must be PROD or TEST and the mainframe people have coded an exit that returns the error you are getting when you use an invalid (based on company standards) DSN.
0
coolhusla1Author Commented:
Thanks giltjr. I will try to find out about it from someone on their side.
As you said one of the levels start with a number in my case. But that is the naming convention they suggested.
I will ask them and let you know what the problem was.
0
giltjrCommented:
Well, numbers don't work.  I just tested to verify:

ftp> put readme.txt 'xxxx.1.try'
200 Port request OK.
501 Invalid data set name "'xxx.1.try'".  Use MVS Dsname conventions.
ftp> put readme.txt 'xxx.readme.txt'
200 Port request OK.
125 Storing data set xxxxG.README.TXT
250 Transfer completed successfully.
ftp: 2426 bytes sent in 0.05Seconds 48.52Kbytes/sec.
ftp>

MVS has had this restriction for a LONG time for files that are catalogs, which have been around and the standard for at least 20 years.  Now MVS has a "split personality".  It has the tradtional MVS type file names, "a.b.c.d", and it also support unix type names, "/a/b/c/d". When using unix type names names it has the same limitation/restrictions as unix, which means part of the name can start with a numeric.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
coolhusla1Author Commented:
NIce one giltjr. Their mistake. there was supposed to be a # before the number in that level. Now it works perfect.
0
giltjrCommented:
Great, yes MVS does allow some special characters in DSN's and they can be the 1st part of a level.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.