Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

FTP from unix to mainframe

Posted on 2006-04-22
8
Medium Priority
?
3,334 Views
Last Modified: 2008-01-09
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





0
Comment
Question by:coolhusla1
8 Comments
 
LVL 2

Expert Comment

by:Cassavatech
ID: 16517145
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
 

Author Comment

by:coolhusla1
ID: 16517292
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
 
LVL 27

Expert Comment

by:Nopius
ID: 16517718
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 57

Expert Comment

by:giltjr
ID: 16519347
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
 

Author Comment

by:coolhusla1
ID: 16519977
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
 
LVL 57

Accepted Solution

by:
giltjr earned 2000 total points
ID: 16520110
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
 

Author Comment

by:coolhusla1
ID: 16528394
NIce one giltjr. Their mistake. there was supposed to be a # before the number in that level. Now it works perfect.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 16530029
Great, yes MVS does allow some special characters in DSN's and they can be the 1st part of a level.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question