View previous topic :: View next topic
|
Author |
Message |
Rohit Sharma
New User
Joined: 28 May 2009 Posts: 5 Location: Hyderabad
|
|
|
|
Hi All ,
I need to use LMCOPY command to copy a PDS to Temporary dataset and then using IEBCOPY command i need to again copy Temporary dataset to
Same PDS . This i need to do in Rexx program . I am learning Rexx but i need to perform this copy from real to temporary and temporary to Real PDS to solve space issue urgently ?
Can any one help me with code /examples or any other direction to achieve above task ?
Thanks in advance !!! |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
"Urgently"...
You have time to post here, but cannot be bothered to pick up a manual?
Sheesh, if you really want urgent, I can send you my PayPal account, you can transfer the going rate, eur 500 per day with a minimum of two days, and I can provide you with the code to do this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
how to copy a pds has been discussed quite a few times...
why use a temporary ...
the right process is
allocate new like current ( providing if needed more space )
copy current to new
rename current to old
rename new to current
after having checked that everything is OK ... delete old
why the stupid requirement of doing it with REXX ?
nothing that IEBCOPY and IDCAMS would not do, why the LMCOPY ???
search the forums for examples
and remember Your urgency is just YOURS...
we could not care less |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why the resistance to an ISPF Option 3.3 (COPY/MOVE) ? |
|
Back to top |
|
|
Rohit Sharma
New User
Joined: 28 May 2009 Posts: 5 Location: Hyderabad
|
|
|
|
prino wrote: |
"Urgently"...
You have time to post here, but cannot be bothered to pick up a manual?
Sheesh, if you really want urgent, I can send you my PayPal account, you can transfer the going rate, eur 500 per day with a minimum of two days, and I can provide you with the code to do this. |
Thanks for finding time to comment on one word "urgently" than finding time to comment on real issue ....btw .. i mentioned urgent because i later wrote to provide code/examples if possible .. |
|
Back to top |
|
|
Rohit Sharma
New User
Joined: 28 May 2009 Posts: 5 Location: Hyderabad
|
|
|
|
enrico-sorichetti wrote: |
how to copy a pds has been discussed quite a few times...
why use a temporary ...
the right process is
allocate new like current ( providing if needed more space )
copy current to new
rename current to old
rename new to current
after having checked that everything is OK ... delete old
why the stupid requirement of doing it with REXX ?
nothing that IEBCOPY and IDCAMS would not do, why the LMCOPY ???
search the forums for examples
and remember Your urgency is just YOURS...
we could not care less |
Thanks. It is required in Rexx because there is one dataset which is not freeing up space even after the end of program . Option like Release and
"TSO "FREE F(DNS)" have been tried but it did not work .. so the next option which could be tried ...is what i asked in this post. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
yada, yada, yada,
Rohit Sharma
wrote: |
Thanks. It is required in Rexx because there is one dataset which is not freeing up space even after the end of program |
talk about not having an idea whatsoever about what goes on in a computer!
to find out the requirement is based on this bit of idiocy,
sorta makes you not even want to help people.
obvious why it was urgent.
the TS has their head so far up their ass that they can not breath! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Thanks for finding time to comment on one word "urgently" than finding time to comment on real issue |
since we reply on our own time and free of charge
we are entitled to comment on the stupidity of claiming urgency
and not to reply if we do not like the TS attitude |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
As has been indicated more poetically already, there is no connection between what you have described that you want to do, and a necessity to do it in rexx.
What happens when you follow enrico's suggestion? As I know it works, why do you still have a problem? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
this is a very good example of:
i could not fix your brakes, so i made your horn louder
(thx McMillan)
Rohit Sharma,
why don't you explain what is going on,
and then someone could suggest a cure for your problem,
instead of a bandage for you situation.
you need to determine why the dataset is not being freed properly by the offending program
and fix it. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Use a PDSE instead of a PDS. |
|
Back to top |
|
|
Rohit Sharma
New User
Joined: 28 May 2009 Posts: 5 Location: Hyderabad
|
|
|
|
Pedro wrote: |
Use a PDSE instead of a PDS. |
Thanks Pedro. below is the code which is used for allocation of dataset
Code: |
ADDRESS TSO
"ALLOC F(DNS) DS('"DESTPDS"') SPACE(90,50) TRACKS NEW RELEASE",
"REUSE DSORG(PO) DSNTYPE(LIBRARY) UNIT(SYSDA)",
"RECFM(F,B) LRECL(80) "
IF RC \=0 THEN
DO
SAY "ALLOCATION OF TARGET DATASET '"DESTPDS"' FAILED."
SAY "RC FROM ALLOC: " RC
SAY "PLEASE CONTACT TECHNICAL APPLICAITON SUPPORT."
SAY ".........................................................."
SAY "EXITING...."
ADDRESS DSNREXX "DISCONNECT "SUBSYS
EXIT
END
SAY "CREATED THE TARGET DATASET..." DESTPDS*/
ADDRESS TSO 'FREE F(DNS)' |
But neither Release nor Free command working to free unused space .... complete 90 tracks are allocated and when we manually free space , then finds most of the time very less number (<90) are used .
any way to resolve this issue ? because there is no error as such when program run but issue is lot of wastage of memory as unused space is not getting free .
Again thanks for understanding the problem |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
ok,
neither pds's nor pds-e's are objects of which you can free unused allocated space.
that would defeat the purpose of using a library type of ds organization.
it is incredible that this thread has gone on for so long.
a TSO FREE releases the allocation of the file to the task,
it has nothing to do with the size allocation.
does this REXX Script have anything to do with db2?
YTF are you doing this:
ADDRESS DSNREXX "DISCONNECT "SUBSYS
a qsam file can have unused space released from the allocation,
as part of the disposition parameters,
but you are pissing up a rope trying to pull this crap on a PDS or PDS-E.
for the third time:
what are you doing with this REXX? what is the purpose of the PDS/PDS-E? |
|
Back to top |
|
|
Rohit Sharma
New User
Joined: 28 May 2009 Posts: 5 Location: Hyderabad
|
|
|
|
dbzTHEdinosauer wrote: |
ok,
neither pds's nor pds-e's are objects of which you can free unused allocated space.
that would defeat the purpose of using a library type of ds organization.
it is incredible that this thread has gone on for so long.
a TSO FREE releases the allocation of the file to the task,
it has nothing to do with the size allocation.
does this REXX Script have anything to do with db2?
YTF are you doing this:
ADDRESS DSNREXX "DISCONNECT "SUBSYS
a qsam file can have unused space released from the allocation,
as part of the disposition parameters,
but you are pissing up a rope trying to pull this crap on a PDS or PDS-E.
for the third time:
what are you doing with this REXX? what is the purpos
e of the PDS/PDS-E? |
Yes . This script save information in DB2 table.
this rexx creates a package through Panels and save package inofrmation in Db2 table . and this PDSE is allocated corresponding to package elements i.e. depening on type of elements there are different type of package . So this PDSE contains all those elemets which we enter to include in package .
issue is " unused space is not getting free " for above mentioned PDSE |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Try a little research of your own on PDS/PDSEs and then see if you can understand what dbz has told you.
If you feel the need to free "unused" space from a PDS, or a PDSE for that matter, do it by not allocating so much space in the first place. Or do the allocation once you know the size of the data.
For a PDS you could have loads of space "wating" to be reorged to be able to be used again, but no space at all available to "rlse" (or anything else) from an extent, ie the last extent might be completely used, all the other secondaries up to there, and the primary, but the PDS can still contain a handful of members or fewer. Without the Reorg, go sing for the space.
A PDSE is better at reusing space, but not in a way which you can readily "get back" what you have allocated.
Make them "smaller", with small secondary extents. But then you have to watch them closely. Or
Live with it. OR
Do what enrico suggested much earlier in this thread, and if you are capable, do it with the space they are using at the time. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
I brought up the PDSE issue, thinking it was a compress issue.
But now, I realize it is a RELEASE issue.
Code: |
"ALLOC F(DNS) DS('"DESTPDS"') SPACE(90,50) TRACKS NEW RELEASE",
"REUSE DSORG(PO) DSNTYPE(LIBRARY) UNIT(SYSDA)",
"RECFM(F,B) LRECL(80) " |
From TSO command reference:
Quote: |
RELEASE
specifies unused space is to be deleted when the data set is closed. |
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
so, when will the 'extra/unused' space be deleted.
when the first member is closed or the last member is closed? |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
We are talking just a few tracks here.
90 tracks is just 6 cylinders, which is small in my book.
Why not just alloacte it SPACE(1,3) CYL?
No release on a PDS/PDSE.
Then the most that can be 'wasted' is 3 cylinders.
If 45 cylinders is not enough then up the secondary allocation. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
I agree that 6 cylinders is small and can be ignored. However, it should still work as documented. We should be able to discuss the concept.
The RELEASE operand of ALLOCATE is not documented well. But JCL has a similar capability with the RLSE parameter:
Code: |
SPACE= ({TRK,}(primary-qty[,second-qty][,directory])[,RLSE] |
RLSE is better documented and has some explanations as to why it might not release the space. See the JCL Reference.
Note: I am not recommending that you switch from rexx to JCL. I am only pointing out that the JCL equivalent is better documented and it might explain the situation better, helping you to resolve your problem. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I think it is high time to lock this topic.
The TS is gone, not likely to return.
I think the real problem is the entire process is poorly designed, and described even worse.
The fact that an attempt to copy and re-copy data to 'free' unsused space is a waste of resources.
Our ongoing discussions on the attempt to free unused space in a pds is the most absurd yet.
This is just my opinion.
If the TS wants to contact me on the Binding of Packages using Rexx, I have a great deal of experience doing such.
My services are available on an urgent request (for a fee of course). |
|
Back to top |
|
|
|