FTP from UNIX to Mainframe
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Job Control Language(JCL)

#1: FTP from UNIX to Mainframe Author: SMS PostPosted: Mon Oct 17, 2005 11:05 pm
    —
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 ?

#2:  Author: Cogito-Ergo-SumLocation: Bengaluru, INDIA PostPosted: Tue Oct 18, 2005 2:29 am
    —
What are the error messages you are getting ?

#3:  Author: SMS PostPosted: Tue Oct 18, 2005 4:46 am
    —
I am not getting any error message, job returns maxcc=0. But the file is not getting copied as required.

#4:  Author: kolusuLocation: San Jose PostPosted: Tue Oct 18, 2005 4:47 am
    —
SMS,

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

Kolusu

#5:  Author: superk PostPosted: Tue Oct 18, 2005 4:51 am
    —
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

#6:  Author: semigeezerLocation: Atlantis PostPosted: Tue Oct 18, 2005 12:22 pm
    —
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).

#7:  Author: SMS PostPosted: Tue Oct 18, 2005 11:01 pm
    —
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).

#8:  Author: superk PostPosted: Wed Oct 19, 2005 5:02 am
    —
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=

#9:  Author: superk PostPosted: Wed Oct 19, 2005 7:24 am
    —
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



MVSFORUMS.com -> Job Control Language(JCL)


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group