BookmarkSubscribeRSS Feed
KevinC_
Fluorite | Level 6
Hello everyone,

This is my first time posting on this forum. Any input would be greatly appreciated.

I was running a query on a few DB2 tables and writing the result to a sas dataset A. Then I got this error:

ERROR: Write to WORK.A.DATA failed. File is full and may be damaged.

Does this mean the sas dataset A is full?
I ran this on mainframe. Has anyone see this error before? Can I alter the size of a temporary sas dataset?

Thanks alot for your input!!
Kevin
5 REPLIES 5
deleted_user
Not applicable
It generally means that the storage media the dataset is on is full.
On Unix, it's the filesystem.
On Windows, it's the logical drive
On a Mainframe, it's the pre-allocated extents
deleted_user
Not applicable
The allocation of space on a mainframe was one of my earliest challenges. I would estimate the space required, call for a primary that would take 90% of the data set and then call for secondary extents that were 10% of the final size.

If sufficient space is available on the VolSer assigned, then in theory this should give you 90 + ( 15 * 10)% of the required space. The glitch in this estimation is that the primary must be assigned in five or fewer logical extents, or the assignment will fail. The second issue is that sufficient space exists to make the allocation required. In the above calculation, that means up to 240% of the expected file size. These assumptions are often premature as jobs fail reasonably late in the step due to space issues.

Try increasing your primary or secondary allocation sizes, and if your allocations are controlled by SMS, then pick a larger assignment pattern.

It may be that you cannot do either of these things, so a third option is to reduce the space stress by loading your memory a little with a request to compress the output data set. The following untested code will demonstrate the idea.

Data PERIOD( Compress = Yes);
Set DB2.FINANCIALS;
Run;

The Compress option may be added to any output data set statement including those in statistical procedures and the sort procedure.

Kind regards

David
deleted_user
Not applicable
There is a WORK parameter, on the mainframe (z/OS) at least, that denotes the primary and secondary allocations.

If you run SAS in batch, this can be coded on the EXEC statement e.g.
//TEST EXEC SAS913,WORK='500 200'

If you run SAS under TSO, this can be coded as a parameter like:
SAS913 WORK('500 200')

By changing the above default values, you can easily increase the size of your work file.
KevinC_
Fluorite | Level 6
Chuck dkvj & bob,

Thank you all so much. That was some really useful information!

Thank you!!!
Kevin
deleted_user
Not applicable
You have to be careful here.

In Bob's case, there is a SAS proc titled SAS913, that takes a WORK= parameter.
That may or may not be available with your installation.

SAS has a temporary data library called "WORK".
Years ago, when I ran SAS on a mainframe, I had to be able to use more space than a single 3390 could hold, so I spanned WORK across many volumes. Of course, since I not there anymore, and it's been years, I can't give you the nitty gritty details.

What we did at that place, for general SAS use on the mainframe, was to create a named group of 3390-10's = SASDS. SASDS consisted of 10 DASD volumes, and WORK for any job could exist on any one of them. We used a generic specification of (273,273) for primary and secondary extent allocations. This kept all the space in same sized chunks for more efficient usage of storage. 273 was used because 273*16 = 4368 was just less than the maximum allocatable space of the disk (4369?), due to ???? limitations (I don't remember all the exact details). I think we used CYL for the allocation unit.

You can span WORK across at most 6 DASD volumes.
It is accomplished by creating 6 DSN's and then concatenating them together
something like the following.
[pre]
//work1 dsn=work,space=(cyl,4300,rlse),unit=sasds,vol=ser=sasd01
//work2 dsn=work,space=(cyl,4300,rlse),unit=sasds,vol=ser=sasd02
//work3 dsn=work,space=(cyl,4300,rlse),unit=sasds,vol=ser=sasd03
//work4 dsn=work,space=(cyl,4300,rlse),unit=sasds,vol=ser=sasd04
//work5 dsn=work,space=(cyl,4300,rlse),unit=sasds,vol=ser=sasd05
//work6 dsn=work,space=(cyl,4300,rlse),unit=sasds,vol=ser=sasd06
//work dsn=work,unit=sasds,vol=(sasd01,sasd02,sasd03,sasd04,sasd05,sasd06)
[/pre]
I expect I'm missing something somewhere, but this should get you started, if you need it.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1011 views
  • 0 likes
  • 2 in conversation