Using sas dataset in datastage job
Moderators: chulett, rschirm, roy
Using sas dataset in datastage job
Hi,
I have a requirement to read a sas file of the format *.sas7badt and load to an oracle table. The file is available in the ETL server itself(FTPed from the SAS server).
We are using datastage8.5 on Linux.
Can someone please explain me
1. what are the prerequisites to use SAS stage in the job
2.How to read the sas file in the job(What details needs to be mentioned in the SAS stage)
Thanks in advance
Bijo
I have a requirement to read a sas file of the format *.sas7badt and load to an oracle table. The file is available in the ETL server itself(FTPed from the SAS server).
We are using datastage8.5 on Linux.
Can someone please explain me
1. what are the prerequisites to use SAS stage in the job
2.How to read the sas file in the job(What details needs to be mentioned in the SAS stage)
Thanks in advance
Bijo
Hi, I used the below code in SAS stage
sas -source 'libname /apps/dtstgdev/datafiles/cpm/SAS_Test/acct_r.sas7bdat';
DATA liborch.out_data;
RUN;
-output 0 out_data
-schemaFile 'sas_schema'
-workingdirectory /apps/dtstgdev/datafiles/cpm/SAS_Test
The error was like this
main_program: Did not have arguments to generate sasout operator correctly on output 0 of APT_FileExportOperator.
A schema must be specified to the -schema option or the -schemaFile option.
Please correct me i went wrong somewhere
Thanks
Bijo
sas -source 'libname /apps/dtstgdev/datafiles/cpm/SAS_Test/acct_r.sas7bdat';
DATA liborch.out_data;
RUN;
-output 0 out_data
-schemaFile 'sas_schema'
-workingdirectory /apps/dtstgdev/datafiles/cpm/SAS_Test
The error was like this
main_program: Did not have arguments to generate sasout operator correctly on output 0 of APT_FileExportOperator.
A schema must be specified to the -schema option or the -schemaFile option.
Please correct me i went wrong somewhere
Thanks
Bijo
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
It's my understanding that in order to use the DataStage SAS stages you need to have SAS software and a SAS license on the DataStage server. Does anyone know if you can open a SAS dataset without a SAS engine present?
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
This is some help I got from IBM a few weeks ago on this same issue:
We interface with SAS by actually executing SAS under the covers. In other words, you need to have SAS installed on the same box because we execute the sas command. To read and write SAS data, we run sas to execute a SAS DATA step. Our SAS stage also can run as PROC execution commands. Our benefit is that we can run the SAS stage in parallel. So we partition the data coming into the SAS stage, and then run the PROC step in parallel. Also, once we have read the data from a sequential sas dataset via a DATA step, we can also read and write to parallel sas datasets which interface nicely with running the PROC steps in parallel. Our strength with integration with SAS is that we can generally parallelize the overall SAS application (obviously depends on application logic, etc) as easily as we can parallelize any other Datastage job.
So a common data flow, along those lines is,
SAS stage (DATA step to read sas) -> partition the data -> SAS stage (parallel PROC step) -> parallel SAS dataset
parallel SAS dataset -> parallel SAS proc step -> parallel SAS dataset
and so on...
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
My doubt here is that we normally install oracle drivers and client in the server to connect to oracle DB. Is this scenario holds the same for SAS connection too.
While we install the SAS stages, will the required executables automatically get installed or do we need to purachase any license and install them later
Please let me know
Thanks
While we install the SAS stages, will the required executables automatically get installed or do we need to purachase any license and install them later
Please let me know
Thanks
For the two questions wrapped around the "or" - no, yes. With the SAS stages in DataStage, just like any other add-on you get the ability to interface with SAS, you don't get SAS itself.bjames wrote:While we install the SAS stages, will the required executables automatically get installed or do we need to purachase any license and install them later
And don't push, people help when and if they can and occassionally sleep as well.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
IIRC, SAS datasets are a proprietary format which require that you use SAS software to read (through the SAS stage in this case).
You may need to request that the supplier export the data as a regular text file if you are unable to have the appropriate SAS software installed on the server. If there is another team/group within your client's organization that regularly receives data from this supplier in a SAS dataset, perhaps they may be of assistance.
Regards,
You may need to request that the supplier export the data as a regular text file if you are unable to have the appropriate SAS software installed on the server. If there is another team/group within your client's organization that regularly receives data from this supplier in a SAS dataset, perhaps they may be of assistance.
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.