Questions tagged [sas-ds2]

DS2 is a language in the SAS system which permits data step-like processing within an object oriented framework. It has particular uses in multithreading and large data processing connecting to Teradata warehouses and other similar data warehouses.

DS2 was introduced to the SAS system with Base SAS version 9.4, and is a proprietary SAS language. It is object oriented, has support for all of the ANSI SQL data types, can use embedded FedSQL syntax, and has advanced support for multithreading.

For more information, see the SAS DS2 Documentation.

13 questions
5
votes
1 answer

PROC DS2 performance issues

I was trying to use proc ds2 to try and get some performance increases over the normal data step by using the multithreaded capability. fred.testdata is a SPDE dataset containing 5 million observations. My code is below: proc ds2; thread…
reecec
  • 73
  • 5
3
votes
2 answers

Error using DS2 and JSON package

I'm trying to parse out a JSON file using the JSON package provided for proc ds2 in SAS9.3 Maintenance 3 as per Chris Hemedinger's blog post here: http://blogs.sas.com/content/sasdummy/2015/09/28/parse-json-from-sas/ Everything seemed to be working…
Robert Penridge
  • 8,424
  • 2
  • 34
  • 55
3
votes
1 answer

Send subset of data to SAS DS2 thread

I have a dataset with 5 groups and I want to use the DS2 procedure in SAS to concurrently compute group means. Simulated dataset: data sim; call streaminit(7); do group = 1 to 5; do pt = 1 to 500; x = rand('ERLANG',…
Alex A.
  • 5,466
  • 4
  • 26
  • 56
3
votes
2 answers

SAS proc ds2 YEAR function

I get an odd error code while trying to get a DS2 thread up and running. proc ds2; thread work.th_ieb /overwrite=yes; dcl DOUBLE Beg_Jahr; METHOD RUN(); set {select id, date from DATA }; IF FIRST.id THEN DO; …
user3614882
  • 185
  • 1
  • 1
  • 11
2
votes
1 answer

Parsing a Json file in to a SAS dataset using SAS PROC DS2

I am trying to parse JSON file and store the data in a SAS dataset Here is the sample of JSON file . Right now I'm only trying to parse S array as an initial step. It has 2 objects so the output SAS dataset(Final goal is to create an hash table)…
SAS_learner
  • 521
  • 1
  • 13
  • 30
1
vote
3 answers

Using PCRXFIND with DS2

I want to replicate this using PCRXFIND instead of prxmatch for speed and because prxmatch is not working correctly. I am trying to find text in a data file. Here is a reproducible example. There is one file with the data to search and another…
Harlan Nelson
  • 1,394
  • 1
  • 10
  • 22
1
vote
2 answers

Splitting a SAS dataset into mutual-exclusive by row in parallel?

There is SO question on split a large dataset into smaller one but with the advent of proc ds2 there must a way to do this using threads? I have written the below data step to split a dataset into &chunks. chunks. I tried to write the same in proc…
xiaodai
  • 14,889
  • 18
  • 76
  • 140
1
vote
2 answers

why does scan in DS2 handle backslashes different from old school SAS?

I use the functions to count words words countw and to get words scan a lot to analyse full file names. (For those interested, I typically use FILENAME docDir PIPE "dir ""&docRoot"" /B/S";) With traditional SAS, this works both on UNIX and…
Dirk Horsten
  • 3,753
  • 4
  • 20
  • 37
1
vote
0 answers

Calculate difference in months between dates in SAS DS2

How can I calculate the difference in months between two dates in DS2? In other words, is there and alternative to the classical INTCK?
Dirk Horsten
  • 3,753
  • 4
  • 20
  • 37
0
votes
1 answer

In SAS DS2, how to create a simple program to calculate bmi

I am trying to learn some basic DS2 programming by writing a program that calculates BMI. I have written a program but I am getting 'ERROR: Line 47: Attempt to obtain a value from a void expression.'. What am I doing wrong? Here is my program: …
0
votes
1 answer

SAS error using prxmatch with DS2

It appears to me that there is an error when using prxmatch with SAS DS2. It is also possible my code is in error. I want to know if this problem is because of my code or a compile error with SAS. In the code below I match search terms in one data…
Harlan Nelson
  • 1,394
  • 1
  • 10
  • 22
0
votes
1 answer

Can a SAS DS2 data step create a view?

Proc DS2; data Iris_v / view= Iris_v; method run(); set Iris; end; run; quit; results in ERROR: Compilation error. ERROR: BASE driver, unknown option ERROR: BASE driver, Table IRIS_V does not exist or cannot be accessed or…
Dirk Horsten
  • 3,753
  • 4
  • 20
  • 37
0
votes
0 answers

How to execute .ds2 or binary files generated from SAS enterprise miner models through oozie?

I have some scoring models created in SAS e miner . I need to schedule the .ds2 or binary files generated from eminer through oozie. Is it possible ?? The scoring model Jobs are written in SAS data step. So if the jobs run on SAS environment , not…