IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FTP a PDS from mainframe to mainframe


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MishaJ Mike Johnson

New User


Joined: 10 Jun 2015
Posts: 4
Location: USA

PostPosted: Wed Jun 10, 2015 9:11 pm
Reply with quote

Is it possible to FTP all members of a PDS from one mainframe to another? I have attempted using MPUT and MGET but no luck.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 10, 2015 9:28 pm
Reply with quote

Quote:
I have attempted using MPUT and MGET but no luck.


not much to work on icon_evil.gif
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Wed Jun 10, 2015 11:40 pm
Reply with quote

As Mr. Sorichetti says, there is not much to work with. More recent z/OS releases allow some short cuts, but this will work on all releases.

Step 1 - “Export” the PDS to a “flat” data set using the TSO XMIT command.

XMIT n1.xxx dataset(the source PDS) outdataset(flat data set 1)

Step 2 (optional) – Compress flat data set 1

Code:
//COMPRESS EXEC PGM=TRSMAIN,PARM=PACK
//SYSPRINT DD  SYSOUT=*
//INFILE   DD  DISP=SHR,DSN=flat data set 1
//OUTFILE  DD  DSN=-- flat data set 2 --,
//             DCB=(RECFM=FB,LRECL=1024,DSORG=PS)


Step 3 – FTP flat data set 1 or flat data set 2 as a binary data set

Step 4 (optional) – Expand flat data set 2

Code:
//EXPAND  EXEC PGM=TRSMAIN,PARM=UNPACK
//SYSPRINT DD  SYSOUT=*
//INFILE   DD  DISP=SHR,
//             DSN=data set received by FTP
//OUTFILE  DD  DSN=flat data set 3,
//             DCB=same as flat data set 1 on the sending system


Step 5 – Create the PDS using the TSO RECEIVE command

RECEIVE indataset(flat data set 3)
Back to top
View user's profile Send private message
MishaJ Mike Johnson

New User


Joined: 10 Jun 2015
Posts: 4
Location: USA

PostPosted: Thu Jun 11, 2015 1:15 am
Reply with quote

So in other words there is no provision within FTP for PDS's? You'd think that by now that option would have been included.

Oh, well, we're not called dinosaurs for nothing icon_smile.gif

Thanks for the feedback, folks.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 11, 2015 1:29 am
Reply with quote

my comment
Quote:
there is not much to work with.

was referring to the complete lack of info about the problem encountered
but ...
it works for me

since I do not have two systems available
I tried to ftp from myself
i had to be careful about which was which for cd and lcd

Code:
prompt
 Interactive mode is off

Code:
mput *


copied all the members
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jun 11, 2015 2:42 am
Reply with quote

Yep, I concur. An mput * will work fine for most PDS's.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Thu Jun 11, 2015 4:14 am
Reply with quote

steve-myers wrote:
As Mr. Sorichetti says, there is not much to work with. More recent z/OS releases allow some short cuts ...
Now what does that say? The last phrase implies there is some direct PDS support in FTP in more recent z/OS releases.

If you had bothered to tell us what z/OS release is running on both systems, which you did not tell us, AND tell us the type of data - text, non text, load module or program object, we could tell you a more effective way, or at least a simpler way, to proceed.

Nor can we be expected to research documentation for you. You, not us, should research the contents of Comm Svr: IP User's Guide and Commands for the lowest level of z/OS. This document will tell you the capabilities of z/OS FTP.

Since you did no research, you got the only practical answer you got. Then you complained it was not the answer you wanted.
Back to top
View user's profile Send private message
MishaJ Mike Johnson

New User


Joined: 10 Jun 2015
Posts: 4
Location: USA

PostPosted: Thu Jun 11, 2015 6:35 pm
Reply with quote

Steve,

You are correct; I was not succinct enough in my initial posts. I will review the IP User's Guide & Commands and if needed I will post here again for additional assistance.

I will post here with a solution if I find one.

Regards,

Mike J.
Back to top
View user's profile Send private message
MishaJ Mike Johnson

New User


Joined: 10 Jun 2015
Posts: 4
Location: USA

PostPosted: Sat Jun 20, 2015 12:42 am
Reply with quote

All,

After much searching and trial and error I have the process down to FTP from one mainframe to another.

AMATERSE (TRSMAIN may be an alias) any file (flat or PDS), FTP it over, and unterse.

If you're dealing with a PDSE, first IEBCOPY it to a flat file, then terse/FTP/unterse.

Thanks for all the assistance.

Mike J.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Jun 20, 2015 2:12 am
Reply with quote

Quote:
After much searching and trial and error I have the process down to FTP from one mainframe to another.


frankly I do not see any reason why ...

after the proper lcd
the proper cd

to set the local and the remote PDS

the proper prompt
to avoid the conversational problem

an mput * / mget *

should not work icon_eek.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Jun 20, 2015 2:59 am
Reply with quote

Except for a load library, an FTP from mainframe to mainframe works quite well using the procedure enrico specified. I have used FTP from mainframe to mainframe, LPAR to LPAR while copying PDS members so I know it works.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts How to Reformat a file using File Man... All Other Mainframe Topics 14
No new posts NDM getting stuck - mainframe/JCL All Other Mainframe Topics 13
Search our Forums:

Back to Top