Thank you very much for your reply. I also thought of your first solution, but didn't use it because it doesn't run in the middle of the data step or proc sort where the abend happens. When the input file size increases, it seems that the working storage expands exponentially in the merge and sort steps, that makes gestimate of the space usage very hard.
Your second suggestion is very helpful. I'll try that.
> Hi.
>
> There is more than a way of doing this, but I think,
> any of them will rely on reporting of your OS.
>
> The following AIX command will report total,
> available and used storage under a specified /dir
>
> [pre]df -g /dir[/pre]
> the -g modifier is for GB unit
>
> I guess you could pipe the result into SAS and output
> it to the log, something very simple like this:
>
> [pre]%macro df(DIR);
> data _null_;
> infile 'df -g data' pipe;
> input;
> put _infile_;
> run;
> %mend;[/pre]
> Then you just have to call the macro, for example,
> before/after every datasetp/proc submited in your
> program, like this:
>
> [pre]proc sort data=...
> ...
> run;
>
> %df(/home/c085442/data);
>
> data ...
> ...
> run;
>
> %df(/home/c085442/data);[/pre]
> Another way would be to write a shell script that
> using a specified time interval would issue the
> command and then write the result (timestamped) into
> a file.
> From there you could issue some kind of warning or
> even send a mail to a list of specified recipients.
>
> Hope it helps.
>
> Cheers from Portugal
>
> Daniel Santos @
www.cgd.pt