How to Read a SAS file in Datastage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

How to Read a SAS file in Datastage

Post by sarathchandrakt »

Hi,

I have never worked on SAS and now we have a requirement to read data from SAS dataset. There is not much online that could help. I got access to SAS datasets using the SAS Enterprise Guide. Here are the details I have. When I logged into SAS Enterprise Guide, it asked me to create profile. I gave my server name (let's say ABCD01), port (1234), User ID and Password. Then I saw my Server alias under 'Servers'. When I click on it, I see all the Libraries which have the Datasets. So considering I have Server Name, Port, User ID, Passsword, Library(Lets say 'Maps') and Dataset Names(Lets say 'Country'), how do I call this dataset in Datastage?

Thanks in advance. Any help is appreciated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do you not have the appropriate processing stage(s) installed? From what I recall there should be a SAS Stage and a SAS Enterprise Stage available. Hmmm... or it may have been a SAS Parallel Data Set stage?

Perhaps this might help as well. Looks like it can be a bit more complicated than just simply using a stage... but then I've got zero SAS experience. I'm sure others will pop in with actual helpful comments.
:wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Post by sarathchandrakt »

I do have SAS Stage and SAS Parellel Dataset stage. Though, Looks like Parellel Dataset stage accepts only .ds files.

I downloaded the SAS file and placed it on Datastage server and copied the code from here and tried to read the file using SAS stage. I got an error.

My code:
sas -source 'libname /opt/fitb/ISSuite/IS/Data/SAS_Test/test.sas7bdat';
DATA liborch.out_data;
RUN;
-output 0 out_data
-schemaFile 'sas_schema'
-workingdirectory libname /opt/fitb/ISSuite/IS/Data/SAS_Test/

Error:
Wrapper: Error loading "orchsasop": Could not load "orchsasop": Could not load module .
System error: No such file or directory
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You did see, in the topic that you referenced, that you need SAS installed on the DataStage server for that to work, yes?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Post by sarathchandrakt »

Yes. We were miss communicated that SAS is installed on the DS Server. It was not installed and the Admin's are working on it now.

Also, is there a way/code where we can access the SAS Dataset directly by connecting to server instead of someone else downloading and sending us the dataset?
Post Reply