Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8165
Location: East Dubuque, Illinois, USA

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: 8165
Location: East Dubuque, Illinois, USA

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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us