From: sas_9264 on
Hi, can SAS Enterpraise Guide stored process bring a work data(sas
temporary dataset) in or take a output dataset as a work dataset for
other program to use? Could you show me a simple example?


Thanks,

Shiping
From: Patrick on
As work data sets are temporary they are deleted when the SAS
"session" closes.

But you can always store a work dataset as a permanent dataset, it's
just instead of "data have" or "data work.have" something like "data
mylib.have" - where "mylib" is a libref defined in a libname
statement.

HTH
Patrick
From: Lou on

"Patrick" <patrick.matter(a)gmx.ch> wrote in message
news:383c35e5-b20d-408c-a1ec-cceb5b282242(a)40g2000pry.googlegroups.com...
> As work data sets are temporary they are deleted when the SAS
> "session" closes.
>
> But you can always store a work dataset as a permanent dataset, it's
> just instead of "data have" or "data work.have" something like "data
> mylib.have" - where "mylib" is a libref defined in a libname
> statement.
>

Most programmers don't code WORK.HAVE, they just code HAVE. That is, they
use a single level name when creating a dataset in the WORK library. It can
be a pain going through a bunch of programs, changing single level names to
two level names.

The documentation is a little misleading in that it states that single level
name datasets are stored in the WORK library. Actually, they're stored in
the USER library, and the USER library is not automatically cleaned out and
deleted when the session ends. So you can permanently store what would
otherwise be work datasets by defining a USER library at the top of the
program, like so:

LIBNAME USER "the full physical name of the directory you want to use";

All single level named datasets will then be placed in the USER library
until you clear the USER libname, and you don't need to put two level names
in your program. Note that it's only datasets that get rerouted, things
like format libraries still go to the WORK library unless you use a two
level name.