DATA Step, Macro, Functions and more

The advantage of proc ds2 compared to data step and sas macro

Reply
Super Contributor
Posts: 371

The advantage of proc ds2 compared to data step and sas macro

[ Edited ]

Hello,

Please, I want to know the avantage of proc ds2 compared to to data step and sas macro.

 

Thank you

Super User
Posts: 5,260

Re: The avantage of proc ds2 compared to data step and sas macro

DS2 can run in parallel and offers more flexibility than the traditional data step. Like possibility to define range of different data types, and nest SQL within the data step. DS2 is also used whith SAS in-database technology.
Hard to compare with macro. Perhaps the flexibility in DS2 will make some macro scenarios obsolete.
Like always, it's easier to compare when you have an actual use case.
Meanwhile, search support.sas.com for papers on the subject.
Data never sleeps
Super Contributor
Posts: 371

Re: The avantage of proc ds2 compared to data step and sas macro

Thank you for your answer.

You say " to define range of different data types, and nest SQL within the data step"

Intersting, Could you give some exemples ?

 

Super User
Posts: 5,260

Re: The avantage of proc ds2 compared to data step and sas macro

Please do your own research given the hints in my previous post. It's not hard to find...
Data never sleeps
Contributor
Posts: 20

Re: The avantage of proc ds2 compared to data step and sas macro

You might want to look up "The DS2 Procedure: SAS Programming Methods at Work" by Peter Eberhardt and published by SAS.

 

It's available now on the O'Reilly Safari Books On-line even though the publish date listed there is 18Mar2016.

 

Paul

Super User
Posts: 10,548

Re: The advantage of proc ds2 compared to data step and sas macro

SAS Macro language should not be considered in this comparison. The macro language generates text that is not specific to the data step.

Ask a Question
Discussion stats
  • 5 replies
  • 386 views
  • 3 likes
  • 4 in conversation