The example uses internal data from the SASHELP library (sashelp.class).
1 Code Block
DATA STEP
Explanation : This example shows how to create a file named 'class.csv' using the DATA step and store it in the SAS Viya file service. The file is attached to a specific job execution, identified by its 'parenturi'. The file content is generated from the 'sashelp.class' table, with 'name', 'sex', 'age', 'height', and 'weight' variables exported in CSV format. The FILENAME statement with FILESRVC access is used to interact with the file service.
Copied!
filename jobout filesrvc
parenturi='/jobExecution/jobs/5a308aa7-1c3a-4465-a14c-fd69a9091926';
data _null_;
set sashelp.class;
file jobout('class.csv');
put name "," sex "," age "," height "," weight;
run;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.