View previous topic :: View next topic |
Author |
Message |
SMS Beginner
Joined: 16 Oct 2005 Posts: 53 Topics: 24
|
Posted: Mon Oct 17, 2005 11:05 pm Post subject: FTP from UNIX to Mainframe |
|
|
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 |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Tue Oct 18, 2005 2:29 am Post subject: |
|
|
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 |
|
|
SMS Beginner
Joined: 16 Oct 2005 Posts: 53 Topics: 24
|
Posted: Tue Oct 18, 2005 4:46 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Oct 18, 2005 4:47 am Post subject: |
|
|
SMS,
Are you trying to copy to an existing dataset? or a new dataset?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Tue Oct 18, 2005 4:51 am Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Oct 18, 2005 12:22 pm Post subject: |
|
|
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 |
|
|
SMS Beginner
Joined: 16 Oct 2005 Posts: 53 Topics: 24
|
Posted: Tue Oct 18, 2005 11:01 pm Post subject: |
|
|
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 |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Wed Oct 19, 2005 7:24 am Post subject: |
|
|
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 |
|
|
|
|