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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Mon Apr 17, 2006 8:40 pm
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
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

Global Moderator


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

PostPosted: Mon Apr 17, 2006 9:45 pm
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
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
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

Global Moderator


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

PostPosted: Wed Apr 19, 2006 3:53 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts REXX editmacro to compare two members... CLIST & REXX 7
No new posts Easy way to delete selected members f... IBM Tools 12
No new posts To find an array of words (sys-symbol... JCL & VSAM 9
Search our Forums:

Back to Top