View previous topic :: View next topic
|
Author |
Message |
notonly4u
New User
Joined: 26 Apr 2005 Posts: 87 Location: Hyderabad
|
|
|
|
Dear Friends,
Can anyone let me know about SAS datasets?
Is SAS dataset is different from our normal mainframe datasets?
Any information on this would really help.
Regards
Tanden |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Visit the SAS site.
In short : SAS libraries are mainframe datasets containing SAS datasets. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
How do you mean different |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
A SAS dataset is stored in a "normal mainframe dataset" you know. SAS maintains a SAS dataset itself as there is data about variable attributes as well as data values stored in the SAS dataset. |
|
Back to top |
|
|
notonly4u
New User
Joined: 26 Apr 2005 Posts: 87 Location: Hyderabad
|
|
|
|
Hi Robert,
Thanks for the posting.
Is there anyway that we could write the data values stored in the SAS dataset into our normal mainframe dataset?
I read through the manuals, but was unsuccessful in finding one.
Thanks much for your time.
Regards
Tanden. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
DATA _NULL_;
SET SAS.DATASET;
FILE OUTFILE;
PUT ... |
where the PUT statement outputs each variable you want in the output dataset pointed to by OUTFILE DD name. DATA _NULL_ saves the overhead of creating a WORK. version of the SAS dataset. You may want to use formats in your PUT statement, depending upon the variables. You may also want subsetting IF logic to restrict which observations you output -- it all depends. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Write a SAS program, run it in SAS.
The program will input the SAS dataset (usually in a DATA step via a SET statement), and then write the data in display mode (in the same DATA step) via a PUT statement, to a file identified in a FILE statement.
For more info, you'll obviously need to know some SAS, or else contract with someone to srite a program for you. |
|
Back to top |
|
|
notonly4u
New User
Joined: 26 Apr 2005 Posts: 87 Location: Hyderabad
|
|
|
|
Dear All,
Thank you all for your time.
I came to know that we can write the SAS dataset using Libname statement in SAS program.
Code: |
LIBNAME NEWLIB "HLQ.TST.DATA"
DISP=(NEW,CATLG)
UNIT=SYSDA SPACE=(27998,(15000,1500),RLSE)
BLKSIZE=23040; |
and
Code: |
PROC PRINT DATA=NEWLIB.MEMBER1;
RUN; |
This helped me to create SAS dataset.
Regards
Tanden |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
notonly4u wrote: |
This helped me to create SAS dataset.
|
Which is not the question you asked. If you had then some of the other answers may have been irrelevant to your requirements. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
It also did not create a SAS dataset.
It printed it.
This is a pretty elementary distinction in any programming environment - create a file vs. print a file.
Perhaps you need a basic IT primer. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
It allocated a SAS library. And maybe in between the creation and the print, a MEMBER1 SAS dataset was created in THE library. But then the TS
is letting us guessing about what he did.
What i really find is disgusting that this kind of topic starters is/are most of the time using pics of holy minds or matrix stuff, meaning they are on a high mental level. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Quote: |
using pics of holy minds or matrix stuff, meaning they are on a high mental level. |
I second this statement |
|
Back to top |
|
|
|