View previous topic :: View next topic |
Author |
Message |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Thu Nov 18, 2004 3:59 am Post subject: Rexx renaming rc=8 |
|
|
I have a RExx prog. that renames all the files that starts with the given qualifiers to the given qualifiers. It was working daily till 3 days back. From 3 days it ADDRESS TSO RENAME command is returning RC=8. Files are not getting renamed.
JCL:
S010 EXEC PGM=IKJEFT1B
SYSPROC DD DSN=sourcerexx(REXXTT),DISP=SHR
SYSTSPRT DD SYSOUT=*
SYSTSIN DD *
%REXXTT NAME TSOID.NAME1
************************** Bottom of Data *****************
/*Rexx prog:*/
arg qual1 qual2
qual1 = strip(qual1)
qual2 = strip(qual2)
qual2 = "'" || qual2 || "'"
rnmcnt = 0
emptcnt = 0
x = outtrap(xyz.)
"listcat level ("qual2")"
x = outtrap(off)
total = xyz.0
totf = 0
j = 1
do i = 1 to total
parse var xyz.i var1 var2 var3
var1 = strip(var1)
var3 = strip(var3)
if var1 = 'NONVSAM' then
do
totf = totf + 1
abc.j = var3
j = j + 1
end
end
say 'rename existing datasets' totf
do p = 1 to totf
psn1 = QUAL1||.KRIS.NOTICE.USER||p
psn2 = abc.p
address tso "rename psn2 psn1"
if rc = 0 then
do
say 'OLD FILE:' psn2 '-----> NEW FILE:' psn1
rnmcnt = rnmcnt + 1
end
end
end
Why RC=8, this had been working for the past 2 years, but not from last 3 days. _________________ Thanks |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Nov 18, 2004 4:08 am Post subject: |
|
|
Sarangadhar,
Did u make sure that ur dataset name (passed to the TSO RENAME) is enclosed within single quotes. Check ur profile to see whether u have ur prefix turned on.
On any command line in any ISPF panel type
Three days back ur profile might have NOPREFIX but by mistake u could have turned on the PREFIX parameter which puts ur logon prefix before ur dataset name.
For example:
If ur profile prefix is named as "ABCXXXX" then ur dataset name will become
DSN1 = ABCXXXX.QUAL1.KRIS.NOTICE.USER
To avoid this enclose ur dsn name within single quotes as shown below.
Code: |
do p = 1 to totf
psn1 = "'"||QUAL1||.KRIS.NOTICE.USER||p||"'"
psn2 = "'"||abc.p||"'"
address tso "rename psn2 psn1"
if rc = 0 then
do
say 'OLD FILE:' psn2 '-----> NEW FILE:' psn1
rnmcnt = rnmcnt + 1
end
|
Hope this helps,
Phantom |
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Thu Nov 18, 2004 4:18 am Post subject: |
|
|
Phantom,
My profile has not been changed, I checked.
But this will do nothing with profile, right? (enclosing in quotes)
address tso "rename ' "psn2" ' ' "psn1" ' "--This is also not working(RC=8). _________________ Thanks |
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Thu Nov 18, 2004 4:31 am Post subject: |
|
|
RC is 8, its typing mistake. Quote: |
|
_________________ Thanks |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Nov 18, 2004 5:58 am Post subject: |
|
|
Sarangadhar,
Quote: |
But this will do nothing with profile, right? (enclosing in quotes)
|
It Does. That is the reason I suggested that method. b'cas as I said if u have a prefix set in ur profile it will get automatically prefixed to ur dataset name whenever u create / rename / delete a dataset. If u enclose ur dataset name within single quotes this automatic prefix addition will not happen.
I'm not sure of what could be your problem if not for the profile. But I just wanted u to know that profile does come into picture in these circumstances.
Thanks,
Phantom |
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Thu Nov 18, 2004 7:12 am Post subject: |
|
|
Sorry to bother u Phantom, Thanks for prompt replies:
I asked in previous mail:
But this will do nothing with profile, right?-- after changing into quotes only.
address tso "rename ' "psn2" ' ' "psn1" ' "--This also is not working. (rc=8 is not for file not found I think in this case). _________________ Thanks |
|
Back to top |
|
 |
|
|