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
 

 

Multiple file FTP from mainframe to desktop

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Wed Apr 10, 2013 12:52 pm    Post subject: Multiple file FTP from mainframe to desktop
Reply with quote

Hi,

I want to FTP multiple PS file to corresponding .txt file. Is there any thing through which i can do so.

I have thought of using mput. But not sure if this would be the correct approach.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Wed Apr 10, 2013 1:03 pm    Post subject: Reply to: Multiple file FTP from mainframe to desktop
Reply with quote

How about giving it a little go and see what happens?

I'm not even sure if you want multiple files on your desktop, or one.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Apr 10, 2013 3:03 pm    Post subject:
Reply with quote

You should be searching this Forum on similar terms, as you put in your question, there are quite a good number of similar topics around here on this Forum.
Back to top
View user's profile Send private message
ezio vin

New User


Joined: 16 Aug 2012
Posts: 44
Location: india

PostPosted: Wed Apr 10, 2013 3:25 pm    Post subject:
Reply with quote

Using SAS mail you can get the mainframe files as notepad file
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Apr 10, 2013 5:07 pm    Post subject:
Reply with quote

connect to MF using windows FTP.... then use Mget command to get multiple files from MF to desktop.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Apr 10, 2013 6:18 pm    Post subject: Reply to: Multiple file FTP from mainframe to desktop
Reply with quote

Quote:
Using SAS mail you can get the mainframe files as notepad file

what if the TS organization does not have SAS

Quote:
connect to MF using windows FTP.... then use Mget command to get multiple files from MF to desktop.


a plain mget/mput command will just transfer the files storing them with the same name

the TS question seems to ask on how to append a .txt extension to each one

read the manuals about the use the nmap ftp command

here is the abstract form the unix man page


Quote:
nmap [inpattern outpattern]
Set or unset the filename mapping mechanism. If no arguments are specified, the filename
mapping mechanism is unset. If arguments are specified, remote filenames are mapped during
mput commands and put commands issued without a specified remote target filename. If argu-
ments are specified, local filenames are mapped during mget commands and get commands
issued without a specified local target filename. This command is useful when connecting
to a non-UNIX remote computer with different file naming conventions or practices. The
mapping follows the pattern set by inpattern and outpattern. [Inpattern] is a template for
incoming filenames (which may have already been processed according to the ntrans and case
settings). Variable templating is accomplished by including the sequences ``$1'', ``$2'',
... ``$9'' in inpattern. Use `\' to prevent this special treatment of the `$' character.
All other characters are treated literally, and are used to determine the nmap [inpattern]
variable values. For example, given inpattern $1.$2 and the remote file name
"mydata.data", $1 would have the value "mydata", and $2 would have the value "data". The
outpattern determines the resulting mapped filename. The sequences ``$1'', ``$2'', ...
``$9'' are replaced by any value resulting from the inpattern template. The sequence
``$0'' is replaced by the original filename. Additionally, the sequence ``[seq1, seq2]''
is replaced by [seq1] if seq1 is not a null string; otherwise it is replaced by seq2. For
example, the command

nmap $1.$2.$3 [$1,$2].[$2,file]

would yield the output filename "myfile.data" for input filenames "myfile.data" and
"myfile.data.old", "myfile.file" for the input filename "myfile", and "myfile.myfile" for
the input filename ".myfile". Spaces may be included in outpattern, as in the example:
nmap $1 sed s/ *$// > $1
Use the `\' character to prevent special treatment of the `$', `[', `]', and `,' charac-
ters.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Apr 10, 2013 7:02 pm    Post subject:
Reply with quote

APPEND...use APPEND instead of PUT.

Make sure to check the file to see if it contains any weird characters between files.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Thu Apr 11, 2013 12:13 am    Post subject: Re: Reply to: Multiple file FTP from mainframe to desktop
Reply with quote

enrico-sorichetti wrote:
Quote:
Using SAS mail you can get the mainframe files as notepad file

what if the TS organization does not have SAS

Quote:
connect to MF using windows FTP.... then use Mget command to get multiple files from MF to desktop.


a plain mget/mput command will just transfer the files storing them with the same name

the TS question seems to ask on how to append a .txt extension to each one

read the manuals about the use the nmap ftp command

here is the abstract form the unix man page


Quote:
nmap [inpattern outpattern]
Set or unset the filename mapping mechanism. If no arguments are specified, the filename
mapping mechanism is unset. If arguments are specified, remote filenames are mapped during
mput commands and put commands issued without a specified remote target filename. If argu-
ments are specified, local filenames are mapped during mget commands and get commands
issued without a specified local target filename. This command is useful when connecting
to a non-UNIX remote computer with different file naming conventions or practices. The
mapping follows the pattern set by inpattern and outpattern. [Inpattern] is a template for
incoming filenames (which may have already been processed according to the ntrans and case
settings). Variable templating is accomplished by including the sequences ``$1'', ``$2'',
... ``$9'' in inpattern. Use `\' to prevent this special treatment of the `$' character.
All other characters are treated literally, and are used to determine the nmap [inpattern]
variable values. For example, given inpattern $1.$2 and the remote file name
"mydata.data", $1 would have the value "mydata", and $2 would have the value "data". The
outpattern determines the resulting mapped filename. The sequences ``$1'', ``$2'', ...
``$9'' are replaced by any value resulting from the inpattern template. The sequence
``$0'' is replaced by the original filename. Additionally, the sequence ``[seq1, seq2]''
is replaced by [seq1] if seq1 is not a null string; otherwise it is replaced by seq2. For
example, the command

nmap $1.$2.$3 [$1,$2].[$2,file]

would yield the output filename "myfile.data" for input filenames "myfile.data" and
"myfile.data.old", "myfile.file" for the input filename "myfile", and "myfile.myfile" for
the input filename ".myfile". Spaces may be included in outpattern, as in the example:
nmap $1 sed s/ *$// > $1
Use the `\' character to prevent special treatment of the `$', `[', `]', and `,' charac-
ters.


Once the files are down loaded to desktop we can run a simple batch command to append .txt to all the files

Example
Code:
for /R %x in (*.*) do ren "%x" *.txt
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Apr 11, 2013 1:03 am    Post subject: Reply to: Multiple file FTP from mainframe to desktop
Reply with quote

Quote:
Once the files are down loaded to desktop we can run a simple batch command to append .txt to all the files


did You read carefully the TS question? looks like not...

Quote:
I have thought of using mput. But not sure if this would be the correct approach.


the windoze machine is the destination of the put, most probably a <server> type of machine,
and it would be contrary to any good sense to have any human interaction on it, just to rename some files

and it would also be a very poor approach to have a FTP server running on a desktop

so it is more appropriate to do it all from the FTP <transmitter> side
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Apr 11, 2013 8:03 pm    Post subject:
Reply with quote

Yeah, I got that wrong. I thought he wanted to put all the mainframe files into a single text 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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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