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
 

 

Can we rename a file using SFTP

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

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Feb 23, 2010 8:50 pm    Post subject: Can we rename a file using SFTP
Reply with quote

Dear Experts,

I use the SFTP to transfer the files from Mainframe to UNIX applicaiton.

My rquirement is to rename an existing file on OMVS with a new name on daily basis.

Is it possible ?
If so, please give me the sample code.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7990
Location: Bellevue, IA

PostPosted: Tue Feb 23, 2010 9:10 pm    Post subject:
Reply with quote

Is the file to be renamed on the remote server or the local machine? That will make a difference, as well.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Feb 23, 2010 9:11 pm    Post subject: SFTP
Reply with quote

Hi Robert,

It is on my local machine (OMVS - Unix Partition of Mainframe Server)
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Feb 24, 2010 11:15 pm    Post subject: SFTP ...
Reply with quote

Hi Robert,
Any help on this ???
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7990
Location: Bellevue, IA

PostPosted: Wed Feb 24, 2010 11:45 pm    Post subject:
Reply with quote

Since the file is on the local machine, not the remote machine, using SFTP to do the rename will not work. SFTP rename is to rename a file on the server, not the client.

You can use the OMVS command mv to change the name of the Unix System Services file on the mainframe.

The syntax of the mv command can easily be found in the Unix System Services Command Reference manual or by using the man command in OMVS or via telnet session. I personally regard providing syntax of commands on a forum like this to be a waste of time -- my time since I already know where to find the syntax if I have questions, as well as the poster's time since if they are not willing to look up the syntax of the command in the manual then there's no motivation for them to learn anything on their own. With Google and IBM's various web sites, there's certainly no excuse for being unable to find command syntax.
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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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