View previous topic :: View next topic
|
Author |
Message |
kc.karthik
New User
Joined: 15 Apr 2007 Posts: 8 Location: Foster City, CA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
kc.karthik
New User
Joined: 15 Apr 2007 Posts: 8 Location: Foster City, CA
|
|
|
|
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 |
|
|
kc.karthik
New User
Joined: 15 Apr 2007 Posts: 8 Location: Foster City, CA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
kc.karthik
New User
Joined: 15 Apr 2007 Posts: 8 Location: Foster City, CA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
kc.karthik
New User
Joined: 15 Apr 2007 Posts: 8 Location: Foster City, CA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|