View previous topic :: View next topic
|
Author |
Message |
sjothimani
New User
Joined: 04 Apr 2006 Posts: 10
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
sjothimani
New User
Joined: 04 Apr 2006 Posts: 10
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
killms
New User
Joined: 17 Sep 2003 Posts: 16
|
|
|
|
you can use ftp like this:
prompt
mput abc*.cob |
|
Back to top |
|
|
sjothimani
New User
Joined: 04 Apr 2006 Posts: 10
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
|