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
 

 

LMCOPY to Temporary dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Rohit Sharma

New User


Joined: 28 May 2009
Posts: 5
Location: Hyderabad

PostPosted: Mon Mar 19, 2012 12:41 am    Post subject: LMCOPY to Temporary dataset
Reply with quote

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
View user's profile Send private message

prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Mon Mar 19, 2012 12:47 am    Post subject:
Reply with quote

"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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Mar 19, 2012 1:14 am    Post subject: Reply to: LMCOPY to Temporary dataset
Reply with quote

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 icon_cool.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Mar 19, 2012 1:56 am    Post subject:
Reply with quote

why the resistance to an ISPF Option 3.3 (COPY/MOVE) ?
Back to top
View user's profile Send private message
Rohit Sharma

New User


Joined: 28 May 2009
Posts: 5
Location: Hyderabad

PostPosted: Mon Mar 19, 2012 11:35 am    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Sharma

New User


Joined: 28 May 2009
Posts: 5
Location: Hyderabad

PostPosted: Mon Mar 19, 2012 12:04 pm    Post subject: Re: Reply to: LMCOPY to Temporary dataset
Reply with quote

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 icon_cool.gif



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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Mar 19, 2012 1:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Mar 19, 2012 1:43 pm    Post subject: Reply to: LMCOPY to Temporary dataset
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Mar 19, 2012 1:54 pm    Post subject: Reply to: LMCOPY to Temporary dataset
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Mar 19, 2012 1:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Mar 19, 2012 6:16 pm    Post subject: Reply to: LMCOPY to Temporary dataset
Reply with quote

Use a PDSE instead of a PDS.
Back to top
View user's profile Send private message
Rohit Sharma

New User


Joined: 28 May 2009
Posts: 5
Location: Hyderabad

PostPosted: Tue Mar 20, 2012 2:09 am    Post subject: Re: Reply to: LMCOPY to Temporary dataset
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Mar 20, 2012 2:23 am    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Sharma

New User


Joined: 28 May 2009
Posts: 5
Location: Hyderabad

PostPosted: Tue Mar 20, 2012 2:37 am    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Mar 20, 2012 3:36 am    Post subject: Reply to: LMCOPY to Temporary dataset
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Mar 20, 2012 6:49 pm    Post subject: Reply to: LMCOPY to Temporary dataset
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Mar 20, 2012 6:59 pm    Post subject:
Reply with quote

so, when will the 'extra/unused' space be deleted.
when the first member is closed or the last member is closed?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue Mar 20, 2012 8:50 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Mar 20, 2012 9:21 pm    Post subject: Reply to: LMCOPY to Temporary dataset
Reply with quote

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
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue Mar 20, 2012 9:43 pm    Post subject:
Reply with quote

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
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
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


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