SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

How to solve interupting in middle of data importing on sas

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

How to solve interupting in middle of data importing on sas

Hi i am fresher to sas projects.but i have done crs.so i want to learn new things real time oriented.so pls help me.

for example if i import 5 milion records to import on sas.what can i do have get back up and what is the diffrence between proc sql and merge.which is best for real time secnario.


Accepted Solutions
Solution
‎04-07-2016 03:17 AM
Super User
Posts: 7,762

Re: How to solve interupting in middle of data importing on sas

When SAS creates a table (dataset), it writes to a file named tablename.sas7bdat.lck, which is renamed to tablename.sas7bdat when the step is finished (the original tablename.sas7bdat is deleted, if it existed). If the step fails, the replacement is not done, so the previous data is preserved.

Keep in mind that SAS in itself is not a database management system, so don't expect it to have the same support for transactions and rollbacks like a full-fledged DBMS does. (Advanced SQL features were introduced in 9.4 with the FEDSQL procedure)

 

When working with large data, a combination of SORT and DATA steps may prove to be more efficient than doing the same join in SQL.

OTOH, SQL can do some things that are not possible (or very difficult to achieve) with a DATA step (cartesian products, eg).

It comes down to what exactly needs to be done, and simply testing which is better.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Super User
Posts: 7,762

Re: How to solve interupting in middle of data importing on sas

"what can i do have get back up"

 

????

 

Regarding the difference between SQL and combinations of PROC SORT and DATA steps with MERGE, there are conditions where the latter can be much more performant.

 

Please try to be more comprehensible. A large part of the contributors here are not native English speakers and will have a hard time deciphering your posts. If necessary, write your posts in a word processor first and use the spellchecker.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
New Contributor
Posts: 2

Re: How to solve interupting in middle of data importing on sas

Posted in reply to KurtBremser

Sorry but thanks for your advice.next time let me do.

 

My question is when it is coming joining the tables which is best PROC SQL or Merge Statement?

 

And How can I take back up from SAS when it is interrupted in the middle of the process?

Solution
‎04-07-2016 03:17 AM
Super User
Posts: 7,762

Re: How to solve interupting in middle of data importing on sas

When SAS creates a table (dataset), it writes to a file named tablename.sas7bdat.lck, which is renamed to tablename.sas7bdat when the step is finished (the original tablename.sas7bdat is deleted, if it existed). If the step fails, the replacement is not done, so the previous data is preserved.

Keep in mind that SAS in itself is not a database management system, so don't expect it to have the same support for transactions and rollbacks like a full-fledged DBMS does. (Advanced SQL features were introduced in 9.4 with the FEDSQL procedure)

 

When working with large data, a combination of SORT and DATA steps may prove to be more efficient than doing the same join in SQL.

OTOH, SQL can do some things that are not possible (or very difficult to achieve) with a DATA step (cartesian products, eg).

It comes down to what exactly needs to be done, and simply testing which is better.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 5,424

Re: How to solve interupting in middle of data importing on sas

For over 20 years, this has been of the most frequent question within the SAS community.

A simple search would give tons of papers and posts. Please study them, and please return with a more specific matter.

Good luck!

Data never sleeps
Super User
Posts: 5,424

Re: How to solve interupting in middle of data importing on sas

Well, we could give bit and pieces, but when I don't see the full picture, the suggestion may not be appropriate.

First of all, loading 5'' records (in one instance) doesn't sound like real time to me, rather batch oriented. Perhaps near real time - whet is the applications?

If you want to do real real time with SAS, I thin the Event Stream Processing the the appropriate product to use. It desn't use Base SAS (at least not in the stream part).

 

Also, please define "in the middle of the process". What is the process? A whole ETL job, or a single SQL statement? And what is the requirement?

Data never sleeps
Super User
Posts: 19,770

Re: How to solve interupting in middle of data importing on sas

SAS isn't really designed for real time reporting.  

 

Re merges it also depends on where your data is stored. For example if it's stored on a server SAS can pass tasks to the server which are usually faster than your desktop. 

 

So Merge in certain cases and joins in other cases. And if it's a many to many merge that requires a cross join you have to use SQL. 

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 314 views
  • 1 like
  • 4 in conversation