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

Deleting temporary SAS data sets on tape


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Thu Aug 04, 2011 8:39 pm
Reply with quote

I have 20 SAS data sets on tape and I need to sort each one. These data sets are for enrollees in certain programs and each enrollee can have multiple events with the date of the event being recorded on the record. I have the processing set up in a SAS macro and the steps can be delineated as shown below. The "sledgehammer" approach is to allocate 20 temporary data sets on tape but I am looking for a more efficient approach with considerably fewer resources.

1. Sort the data set which I will call &macvar.mydata and output the sorted temporary data which I will call tempdata.mydata to tape

2. Set tempdata.mydata in a data set which I will call &macvar.agg by enrollee ID and event date and construct enrollee-level counts on the basis of the certain event variables.

3. Append the data set &macvar.agg to a base data set using Proc Datasets.

4. Now at this point what I would like to do is use Proc Datasets to delete tempdata.mydata but since this data set is on tape SAS will not let me do this.

Has anybody been confronted with this problem?

Charles Wolters
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Aug 04, 2011 10:34 pm
Reply with quote

Why tapes for temps?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 04, 2011 10:51 pm
Reply with quote

Many sites place restrictions on tapes, such as not allowing the tape to be overwritten (which would be required for SAS to delete a temporary work data set on tape). Contact your site support group to make sure or to clarify what you need to do to allow this.
Back to top
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Thu Aug 04, 2011 11:18 pm
Reply with quote

Robert,

That is a good point. When creating permanent SAS data sets on tape, our tape management system lets one assign a special code to the expiration date which tells the system to keep the data set indefinitely or until the user decides to uncatalog it. When uncataloged my understanding is that you are giving the tape management system the green light to overwrite your data set(s).

It is possible that the tape management system won't let you delete the temporary data sets on tape during the job so I will find this out.

Charles
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top