IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Scratch and Rename members


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
PLFaBiaN5

New User


Joined: 18 Apr 2006
Posts: 21

PostPosted: Thu Apr 20, 2006 12:17 am
Reply with quote

this is my code
Code:

//XXXXXL6 JOB , 'XXXX'                                 
//S1 EXEC PGM=IEHPROGM                             
//***  PROJECT6 SCRATCH OR RENAME MEMBERS               
//***                        IN A PDS                   
//SYSPRINT DD SYSOUT=A                                 
//DD1 DD UNIT=SYSDA,VOL=SER=CNY001,DISP=OLD             
//SYSIN DD *                                           
    SCRATCH DSNAME=WYL.NY.XDS.LIB,VOL=SYSDA,MEMBER=TEST1
    RENAME DSNAME=WYL.NY.XDS.LIB,VOL=SYSDA,MEMBER=TEST2
              MEMBER=TEST2,NEWNAME=TEST3               
/*                                                     
//                                                     


can someone tell what i am doing wrong? when i run it i get his error

SYSTEM SUPPORT UTILITIES ---- IEHPROGM

SCRATCH DSNAME=WYL.NY.XDS.LIB,VOL=SYSDA,MEMBER=TEST1
IEH202I INVALID KEYWORD OR CONTROL STATEMENT SYNTAX

RENAME DSNAME=WYL.NY.XDS.LIB,VOL=SYSDA,MEMBER=TEST2
IEH202I INVALID KEYWORD OR CONTROL STATEMENT SYNTAX

MEMBER=TEST2,NEWNAME=TEST3
IEH201I INVALID REQUEST... STATEMENT IGNORED

i don't get this..plz help if you know whats wrong
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 20, 2006 12:47 am
Reply with quote

I've never heard of this utility, much less used it before. However, upon looking up the appropriate syntax, it looks like this is required:

Code:

//DD1 DD UNIT=SYSDA,VOL=SER=CNY001,DISP=OLD             
//SYSIN DD *                                           
    SCRATCH DSNAME=WYL.NY.XDS.LIB,VOL=SYSDA=CNY001,MEMBER=TEST1
Back to top
View user's profile Send private message
pspreddy

New User


Joined: 14 Mar 2006
Posts: 24
Location: Chicago

PostPosted: Thu Apr 20, 2006 12:52 am
Reply with quote

Hi PLFaBiaN5,

In your code I might be seeing two possible errors

1) You mentioned scratch statement as
SCRATCH DSNAME=WYL.NY.XDS.LIB,VOL=SYSDA,MEMBER=TEST1

The probleam might be here when u said VOL=SYSDA where in actually it might be UNIT=SYSDA. Try giving the VOL info here as below and check

SCRATCH DSNAME=WYL.NY.XDS.LIB,MEMBER=TEST1,VOL=SER=CNY001

This VOL info is from the job you posted.
This change should work

2) In the second statement, RENAME, u mentikned the below

RENAME DSNAME=WYL.NY.XDS.LIB,VOL=SYSDA,MEMBER=TEST2
MEMBER=TEST2,NEWNAME=TEST3

Here again try giving the VOL=SER=CNY001 instead of VOL=SYSDA. And u r repeating MEMBER=TEST2. Remove this second occurance and try running the code.
Probably it should go through fine

Thanks
Shiva
Back to top
View user's profile Send private message
pspreddy

New User


Joined: 14 Mar 2006
Posts: 24
Location: Chicago

PostPosted: Thu Apr 20, 2006 1:00 am
Reply with quote

You can also use the RENAME command as below to rename the PDS member

RENAME 'MY.LIBRARY(MEM1)' 'MY.LIBRARY(MEM2)'

Thanks
Shiva
Back to top
View user's profile Send private message
PLFaBiaN5

New User


Joined: 18 Apr 2006
Posts: 21

PostPosted: Thu Apr 20, 2006 1:49 am
Reply with quote

Scratching a member worked fine thx for the help but still having problems
with renaming
thx for the command pspreddy but it has to be a job
thx to superk too yep that was the problem with forgot CNY001
i trying to do same for rename but didn't work
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 20, 2006 2:00 am
Reply with quote

Code:

  RENAME VOL=SYSDA=CNY001,DSNAME=WYL.NY.XDS.LIB,NEWNAME=TEST3,MEMBER=TEST2


Also, I don't understand your comment:

Quote:

thx for the command pspreddy but it has to be a job


RENAME is an IDCAMS parameter as well as a TSO command.
Back to top
View user's profile Send private message
PLFaBiaN5

New User


Joined: 18 Apr 2006
Posts: 21

PostPosted: Thu Apr 20, 2006 10:35 pm
Reply with quote

RENAME VOL=SYSDA=CNY001,DSNAME=WYL.NY.XDS.LIB,NEWNAME=TEST3,MEMBER=TEST3
IEH214I CONTINUATION CARD EXPECTED---REQUESTS CANNOT BE SERVICED

i get this error after i run it

it has to be a parameter superk
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Apr 21, 2006 2:53 am
Reply with quote

PLFaBiaN5,

The command line is to long, it needs to be broken into two lines.


Code:

RENAME VOL=SYSDA=CNY001,DSNAME=WYL.NY.XDS.LIB,                    -
                NEWNAME=TEST3,MEMBER=TEST2


Please note, there needs to be a continuation char in col 72 of the line to be continued, and the start of the second line MUST be in col 16.

Dave
Back to top
View user's profile Send private message
PLFaBiaN5

New User


Joined: 18 Apr 2006
Posts: 21

PostPosted: Fri Apr 21, 2006 8:55 am
Reply with quote

//XDSNYL6 JOB , 'XXXX'
//S1 EXEC PGM=IEHPROGM
//*** PROJECT6 SCRATCH OR RENAME MEMBERS
//*** IN A PDS
//SYSPRINT DD SYSOUT=A
//DD1 DD UNIT=SYSDA,VOL=SER=CNY001,DISP=OLD
//SYSIN DD *
SCRATCH DSNAME=WYL.NY.XDS.LIB,VOL=SYSDA=CNY001,MEMBER=TEST1
RENAME VOL=SYSDA=CNY001,DSNAME=WYL.NY.XDS.LIB, -
NEWNAME=TEST3,MEMBER=TEST2
/*
//

this is my code DavidatK
when i run this is what i get

RENAME VOL=SYSDA=CNY001,DSNAME=WYL.NY.XDS.LIB, -
IEH202I INVALID KEYWORD OR CONTROL STATEMENT SYNTAX

NEWNAME=TEST3,MEMBER=TEST2
IEH201I INVALID REQUEST... STATEMENT IGNORED


what i am doing wrong?
Back to top
View user's profile Send private message
PLFaBiaN5

New User


Joined: 18 Apr 2006
Posts: 21

PostPosted: Fri Apr 21, 2006 8:57 am
Reply with quote

the - char is at col 72
newname does start at col 16

this harder than i though
Back to top
View user's profile Send private message
jangam

New User


Joined: 02 Feb 2006
Posts: 7

PostPosted: Fri Apr 21, 2006 5:59 pm
Reply with quote

hi

I think you are trying to rename a tape dataset, I think that might be impossiable.

correct me if i am wrong...

thanks

Jangam
Back to top
View user's profile Send private message
PLFaBiaN5

New User


Joined: 18 Apr 2006
Posts: 21

PostPosted: Fri Apr 21, 2006 11:28 pm
Reply with quote

i am trying to rename a member in my library
Back to top
View user's profile Send private message
PLFaBiaN5

New User


Joined: 18 Apr 2006
Posts: 21

PostPosted: Wed Apr 26, 2006 11:10 pm
Reply with quote

thx everyone it was my problem my typing i put the new name at colum 17 instead of 16 sorry everyone for the trouble
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Apr 26, 2006 11:14 pm
Reply with quote

PLFaBiaN5,

No problem, It happens to the best. Glad your problem is solved

Dave
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts REXX editmacro to compare two members... CLIST & REXX 7
No new posts Easy way to delete selected members f... IBM Tools 12
No new posts To find an array of words (sys-symbol... JCL & VSAM 9
Search our Forums:

Back to Top