Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to delete a member in a PDS using REXX
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Thu Jun 19, 2008 2:33 pm    Post subject: How to delete a member in a PDS using REXX
Reply with quote

Hi,

Plz help me how to delete a member in a PDS using REXX.

Thx,
satish
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Jun 19, 2008 2:39 pm    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

there are many alternatives !
but if You post a bit more You might get better answers

quick and dirty "Address TSO DELETE 'pds_name(member)'

but probably thats not what You want
Back to top
View user's profile Send private message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Thu Jun 19, 2008 4:47 pm    Post subject: How to delete a member in a PDS using REXX
Reply with quote

Code for copying from one member to other n deleting the first PDS member :-

/*REXX*/
Z = 1
TRACE R
ADDRESS TSO

SAY 'ENTER THE INPUT PDS NAME'
PULL INPDS
"ALLOC DA('"INPDS"') F(INDD4) SHR REUSE"
"EXECIO * DISKR INDD4 (STEM IFILE."

SAY 'ENTER THE OUTPUT PDS NAME'
PULL OUTPDS
"ALLOC DA('"OUTPDS"') F(OUTDD4) SHR REUSE"
"EXECIO * DISKW OUTDD4 (STEM OUT. FINIS"


DO I = 1 TO IFILE.0
OUT.Z = IFILE.I
Z = Z+1

ADDRESS TSO DELETE INPDS

EXIT

Input and Ouput given as :-
INPDS :- ATID.DSXK.MEM.TEST1(member1)
OUTPDS :- ATID.DSXK.MEM.TEST2(member1)

Error :-

21 *-* ADDRESS TSO DELETE INPDS
>>> "DELETE ATID.DSXK.MEM.TEST1(MEMBER1)"
IDC3901I ERROR QUALIFYING SXK0000.ATID.DSXK.MEM.TEST1
IDC3902I ** DEFAULT SERVICE ROUTINE ERROR CODE 20, LOCATE ERROR CODE 8
IDC0548I ** MEMBER MEMBER1 NOT DELETED
IDC0014I LASTCC=8
+++ RC(8) +++
23 *-* EXIT


The problem here is when deleting its taking my ID as prefix n not able to find the PDS for the same like :- SXK0000.ATID.DSXK.MEM.TEST1

But the actual PDS member name to be deleted is :-

ATID.DSXK.MEM.TEST1 .

Since my id is :- SXK0000

its taking prefix as :- SXK0000.ATID.DSXK.MEM.TEST1

Plz help me out in this.

Thx,
satish
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Jun 19, 2008 5:00 pm    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

sathish,

Quote:
IDC3901I ERROR QUALIFYING SXK0000.ATID.DSXK.MEM.TEST1


One way to fix this is while inputing data, give the input pds name in quotes.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Jun 19, 2008 5:04 pm    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

sathish,

By quotes i meant "single quotes"
Back to top
View user's profile Send private message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Thu Jun 19, 2008 5:22 pm    Post subject: How to delete a member in a PDS using REXX
Reply with quote

Thx Aaru its working,.....

icon_biggrin.gif


Thx,
satish
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Jun 19, 2008 6:40 pm    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

sathish,

You are welcome :D
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Jun 19, 2008 6:42 pm    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

sathish,

What is the need for the below statements when Your reqt is for deleting a member ina PDS

Code:
SAY 'ENTER THE OUTPUT PDS NAME'
PULL OUTPDS
"ALLOC DA('"OUTPDS"') F(OUTDD4) SHR REUSE"
"EXECIO * DISKW OUTDD4 (STEM OUT. FINIS"


DO I = 1 TO IFILE.0
OUT.Z = IFILE.I
Z = Z+1


I don't think it is needed.
Back to top
View user's profile Send private message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Thu Jun 19, 2008 8:38 pm    Post subject: How to delete a member in a PDS using REXX
Reply with quote

its for copying from one member to other n then deleting it....

Thx,
satish
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Thu Jun 19, 2008 9:44 pm    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

FYI. your original program is messed up.

It will notcopy then delete. I believe your OUTPDS will be empty becuase the OUT. stem is no data at the time you do your EXECIO.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jun 20, 2008 12:32 am    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

sathish,

Quote:
its for copying from one member to other n then deleting it....


Nope, you are wrong. You have used the execio write command before populating the stem variable. So your output file would be empty.

For your reqt you can use the TSO copy command.
Back to top
View user's profile Send private message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Fri Jun 20, 2008 12:42 pm    Post subject: How to delete a member in a PDS using REXX
Reply with quote

Thx for the same, i changed it at that time... anyways thx for ur support...

Bye,
satish
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jun 20, 2008 2:58 pm    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

sathish,

Good that you changed it.
Back to top
View user's profile Send private message
nirmalya sengupta

New User


Joined: 28 May 2007
Posts: 5
Location: kolkata

PostPosted: Sat Jun 21, 2008 4:13 pm    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

But if i am not wrong, I think the best way to perform this operation, the best way should be use the same stem variable. That will reduce the requirement of copy the data and will minimize the CPU time.
The code may be like ...
Code:

/**rexx**/
address tso
say 'Enter input dataset'
pull indsn
say 'Enter output dataset'
pull outdsn
 "ALLOC DA('"indsn"') F(INDD) SHR REUSE"
"EXECIO * DISKR INDD (STEM LINE. FINIS"

 "ALLOC DA('"outdsn"') F(OUTDD) SHR REUSE"
"EXECIO * DISKW OUTDD (STEM LINE. FINIS"

ADDRESS TSO DELETE indsn
EXIT


Please correct if i am wrong.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Sun Jun 22, 2008 5:47 am    Post subject: Reply to: How to delete a member in a PDS using REXX
Reply with quote

nirmalya,

As mentioned in my previous post, if TSO COPY command can be used to copy members from one pds to another then there wont be a need to read from input using stem and write to an output.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sun Jun 22, 2008 2:46 pm    Post subject:
Reply with quote

LMCOPY / LMMOVE are good tools for this type of operation
Back to top
View user's profile Send private message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Tue Jun 24, 2008 8:24 pm    Post subject: How to delete a member in a PDS using REXX
Reply with quote

Hi Aaru,

Plz show me with an example of how to use TSO COPY .... to copy from one PDS to another....

Thx,
satish
Back to top
View user's profile Send private message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Tue Jun 24, 2008 8:25 pm    Post subject: How to delete a member in a PDS using REXX
Reply with quote

Plz show me with an example of how to use TSO COPY
Back to top
View user's profile Send private message
satishstar
Currently Banned

New User


Joined: 14 Mar 2005
Posts: 15

PostPosted: Tue Jun 24, 2008 8:27 pm    Post subject: How to delete a member in a PDS using REXX
Reply with quote

Hi expat

plz show me with some examples of how to use LMCOPY and LMMOVE
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 25, 2008 12:59 pm    Post subject: Re: How to delete a member in a PDS using REXX
Reply with quote

satishstar wrote:
Hi expat
plz show me with some examples of how to use LMCOPY and LMMOVE

Unfortunately I do not yet have an email at my new job, so can not cut and paste an example until I can mail it to myself here, so I guess that you will have to do the same thing that I done to get this working, and that is RTFM.
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 -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us