MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP from UNIX to Mainframe

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
SMS
Beginner


Joined: 16 Oct 2005
Posts: 53
Topics: 24

PostPosted: Mon Oct 17, 2005 11:05 pm    Post subject: FTP from UNIX to Mainframe Reply with quote

Hi,

My requirement is to transfer a data file from UNIX to mainframe with different name and length.

For this the corresponding FTP JCL as follows:
//MEMARS1 EXEC PGM=FTP,PARM='SERVER NAME'
//INPUT DD *
username pwd
ASCII
LOCSITE LRECL=232
LOCSITE BLKSIZE=2320
LOCSITE RECFM=VB
LCD 'userid.YYY'
MGET /X/Y/FILE.DAT (REPLACE

The dataset is created as 'userid.FILE.DAT'. But I want to
create as 'userid.YYY'. I have tried with GET /X/Y/FILE.DAT 'userid.YYY'.
but it is not working.

Could anyone please let me know how to achieve this ?
_________________
Regards,
SMS
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Tue Oct 18, 2005 2:29 am    Post subject: Reply with quote

What are the error messages you are getting ?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
SMS
Beginner


Joined: 16 Oct 2005
Posts: 53
Topics: 24

PostPosted: Tue Oct 18, 2005 4:46 am    Post subject: Reply with quote

I am not getting any error message, job returns maxcc=0. But the file is not getting copied as required.
_________________
Regards,
SMS
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue Oct 18, 2005 4:47 am    Post subject: Reply with quote

SMS,

Are you trying to copy to an existing dataset? or a new dataset?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Tue Oct 18, 2005 4:51 am    Post subject: Reply with quote

Why not do this?

Code:

//MEMARS1 EXEC PGM=FTP,PARM='SERVER NAME'
//SYSUT1  DD DSN=userid.YYY,DISP=(,CATLG,DELETE),
//        LRECL=232,BLKSIZE=2320,RECFM=VB
//INPUT DD *
username pwd
ASCII
GET /X/Y/FILE.DAT //DD:SYSUT1
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Oct 18, 2005 12:22 pm    Post subject: Reply with quote

Or cd to /x/y and then do an mget
(I haven't tried but in theory it should work because part of the process of get and mget is to determine the name of the output file and if you are in the directory, then the output files will be named the same as the individual files. You may have problems if your unix file names do not match MVS member naming standards such as length <=8, no spaces, etc).
Back to top
View user's profile Send private message Visit poster's website
SMS
Beginner


Joined: 16 Oct 2005
Posts: 53
Topics: 24

PostPosted: Tue Oct 18, 2005 11:01 pm    Post subject: Reply with quote

Superk,

Thanks for your suggestion.
I have tried the following method, but it does not solve my purpose. When I checked in sysout, after the GET command, it shows
Usage: GET foreignfile <localname> <(REPLACE>.

//INPUT DD *
username pwd
ASCII
GET /X/Y/FILE.DAT //DD:SYSUT1

My requirement is to copy an UNIX file in to mainframe with new name,length and record format(FB/VB).
_________________
Regards,
SMS
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Oct 19, 2005 5:02 am    Post subject: Reply with quote

This is the reference to what I posted earlier:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/4.2.4?SHELF=&DT=20050708142126&CASE=
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Oct 19, 2005 7:24 am    Post subject: Reply with quote

I think we need to see what error you get when you specify:

get /x/y/file.dat 'userid.yyy'

or

get /x/y/file.dat 'userid.yyy' (replace
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group