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
 
How to rename a datset using tso rename from mvs uss?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
kc.karthik

New User


Joined: 15 Apr 2007
Posts: 8
Location: Foster City, CA

PostPosted: Thu Jun 14, 2007 5:12 am    Post subject: How to rename a datset using tso rename from mvs uss?
Reply with quote

I have a mainframe dataset @XXXX.YYY.ZZZ and I want to rename this dataset from the mvs uss unix shell using the tso rename command to @XXXX.YYY.WWW. How can I achieve this? Thanks in advance.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 14, 2007 6:33 am    Post subject:
Reply with quote

Hello,

How familiar are you with standard UNIX (i.e. HP-UX, AIX, Sun, etc) commands?

It has been a while, but i believe you can issue the UNIX mv command to rename files in USS. I'd create a test file and test with that before trying to do anything with your "real" file. "mv" is for "move, but it was how we renamed files on UNIX boxes i supported.

Assuming that you have sufficient permissions, you would issue
mv '@XXXX.YYY.ZZZ' '@XXXX.YYY.WWW'
at the unix prompt.

To repeat, i'd surely try it on some file created just for this test before trying the actual file.
Back to top
View user's profile Send private message
kc.karthik

New User


Joined: 15 Apr 2007
Posts: 8
Location: Foster City, CA

PostPosted: Thu Jun 14, 2007 8:25 am    Post subject: Re: How to rename a datset using tso rename from mvs uss?
Reply with quote

No. You cannot rename them like that. In fact you will not be able to list the MVS datasets using the ls command either. You need to use tso listcat command to view cataloged MVS datasets. The only way you can view contents of MVS datasets using cat commands is like this:

cat "//'<dataset>'"

But this notation does not work with ls or mv commands.
Back to top
View user's profile Send private message
kc.karthik

New User


Joined: 15 Apr 2007
Posts: 8
Location: Foster City, CA

PostPosted: Thu Jun 14, 2007 8:28 am    Post subject:
Reply with quote

I tried
mv "<dataset>" "<datasetnew>"

and

mv '<dataset>' '<datasetnew>'

but it did not work. Also I tried the same with tso rename command. That did not work too.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 14, 2007 8:51 am    Post subject:
Reply with quote

Hello,

Please clarify "did not work". Was any error information provided?

I seem to recall actually having done this
Quote:
you will not be able to list the MVS datasets using the ls command
at a prior location. If i've not complete lost track, listing "directories" and changing "directories worked as it had on real UNIX boxes. What kind of error info did you get using ls? Keep in mind that there may be permission issues. I had all of "the keys to the kingdom" on that system.

Might there be differences in the USS implementation from place to place?
Back to top
View user's profile Send private message
kc.karthik

New User


Joined: 15 Apr 2007
Posts: 8
Location: Foster City, CA

PostPosted: Thu Jun 14, 2007 11:40 am    Post subject:
Reply with quote

Hello and sorry.

Actually this thing worked:

mv "//'<dataset>'" "//'<dataset_new>'"

Thanks a lot. Could not have got it w/o your help.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 14, 2007 6:01 pm    Post subject:
Reply with quote

You're welcome icon_smile.gif
Back to top
View user's profile Send private message
kc.karthik

New User


Joined: 15 Apr 2007
Posts: 8
Location: Foster City, CA

PostPosted: Sun Jun 17, 2007 12:59 am    Post subject:
Reply with quote

Hi,

The previous mv command that I used works but the problem is it creates the new dataset with max record length whereas the original dataset that I am renaming is just 450 bytes.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Jun 17, 2007 8:04 am    Post subject:
Reply with quote

Hello,

I have seen something similar when i ftp data from "real" unix or a win-based system to a mainframe. Often, the generated dcb info does not match the data. In those cases, i've found that having the dataset pre-allocated on the mainframe with the desired dcb info gets around the mis-match. There may be a way to set this in the ftp session, but i've not spent time looking for it - mostly my data transfers are from the mainframe, not to it.

How often will you need to rename/mv a uss file for use in mvs?

You might talk with your system support people who deal with uss and ask if there is/are some uss variable(s) that you can assign value(s)s to prior to exdecuting the mv that would control the data length generated.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Generic rename by pattern‏ Steve Coalbran CLIST & REXX 6 Mon May 30, 2016 9:34 pm
No new posts IEHPROGM - HOW TO RENAME A PDS ? WagnerBil IBM Tools 7 Wed Aug 12, 2015 6:08 pm
No new posts How to use REXX to rename list of VSA... jackzhang75 CLIST & REXX 10 Wed Jun 03, 2015 11:25 pm
No new posts Can i user rexx to rename sequential ... jackzhang75 CLIST & REXX 3 Sat Nov 15, 2014 1:11 am

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