Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL for FTP'ing a PDS completely instead of FTP'ing members

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sjothimani

New User


Joined: 04 Apr 2006
Posts: 10

PostPosted: Mon Apr 17, 2006 7:37 pm    Post subject: JCL for FTP'ing a PDS completely instead of FTP'ing members
Reply with quote

hi........

I need a JCL for FTP'ing a PDS completely instead of FTP'ing members of the PDS seperately. Also i need to specify the extension of the output files in a generic manner......

thanks
ram
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Mon Apr 17, 2006 8:40 pm    Post subject: Re: JCL for FTP'ing a PDS completely instead of FTP'ing memb
Reply with quote

Well, the structure of a PDS is similar to that of a folder, with the PDS being the folder and the members being the files within that folder.

Just make sure that you use the LCD (Local Change Directory) command so that FTP is looking at the PDS as the Local Working Directory. Then, you can use the MPUT * command to copy the entire contents.

For example:

the PDS is HLQ.THE.PDS. The default directory is HLQ.

In the FTP command stream, specify LCD THE.PDS or some equivelant, depending on your default local directory. You can use the PWD command to verify that the PDS is shown correctly. Then, specify the MPUT * command, and all the members of that PDS will be transferred to the remote FTP server.

As far as the second part of your post, I'm not sure what you mean. What you are asking for is mutually exclusive with using the MPUT command, so I need more details on what you are looking to do.
Back to top
View user's profile Send private message
sjothimani

New User


Joined: 04 Apr 2006
Posts: 10

PostPosted: Mon Apr 17, 2006 8:51 pm    Post subject: Re: JCL for FTP'ing a PDS completely instead of FTP'ing memb
Reply with quote

thanks for Ur reply,

in case of the second query i meant that the extensions of the files to be stored inside the folders.

say,
if MAIN.SOURCE.PDS is FTP'd then the members ill simply be flat files in some extensions or in .txt, and i need that extn should be of which i specify explicitely say .COB or .CNT some thing like that. Hope i would have reached you.

thanks
ram
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Mon Apr 17, 2006 9:45 pm    Post subject: Re: JCL for FTP'ing a PDS completely instead of FTP'ing memb
Reply with quote

Looks like you answered your own question:

Quote:

... specify explicitely say .COB or .CNT some thing like that


That's what has to be done. If you want the target files to have extensions, then you need to provide them to your FTP process:

>put DDNAME1 or 'DATASET.NAME1' filename1.ext
>put DDNAME2 or 'DATASET.NAME2' filename2.ext
>...
>put DDNAMEn or 'DATASET.NAMEn' filenamen.ext
Back to top
View user's profile Send private message
killms

New User


Joined: 17 Sep 2003
Posts: 16

PostPosted: Wed Apr 19, 2006 11:15 am    Post subject:
Reply with quote

you can use ftp like this:

prompt
mput abc*.cob
Back to top
View user's profile Send private message
sjothimani

New User


Joined: 04 Apr 2006
Posts: 10

PostPosted: Wed Apr 19, 2006 3:01 pm    Post subject: Re: JCL for FTP'ing a PDS completely instead of FTP'ing memb
Reply with quote

hi..........

can we rename the files in a PDS while we are FTP'ing.
in case of,

I have to FTP a PDS as a batch where I used LCD to do this, but I am unable to change the file extensions. So is there any way that I can do it with rename option with wild cards(*). Help me out in this......

thanks
ram
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Wed Apr 19, 2006 3:53 pm    Post subject: Re: JCL for FTP'ing a PDS completely instead of FTP'ing memb
Reply with quote

FTP file transfer command syntax. Note which commands allow you to specify a target filename and which ones don't:

APpend Append a local data set
>APpend local_data_set destination_file

Get Copy files
>Get foreign_file local_file (REPLACE

MGet Copy multiple files
>MGet foreign_file (REPLACE

MPut Copy multiple data sets to the remote host
>MPut local_data_set

PUt Copy data sets to the remote host
>PUt local_file foreign_file
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts JCL to replace string in all PDS members bhamarekm All Other Mainframe Topics 8 Thu May 28, 2015 8:44 pm
No new posts Issue with copying PDS members to ano... Senthilkumar k CLIST & REXX 13 Mon Apr 20, 2015 1:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us