When utilizing the File Service, prioritize the UUID over the filename for programmatic access. Because the service allows non-unique names, relying on filenames can lead to retrieval errors in automated workflows.
To maintain organization without a traditional folder structure, use the PARENTURI= option to logically group files under a specific object, such as a Job Execution. This ensures your outputs remain contextually linked to their source and are easily retrievable within the SAS Viya ecosystem.
Type : CREATION_INTERNE
Examples use SASHELP data (sashelp.class) for file creation.
| 1 | filename jobout filesrvc |
| 2 | parenturi='/jobExecution/jobs/5a308aa7-1c3a-4465-a14c-fd69a9091926'; |
| 3 | DATA _null_; |
| 4 | SET sashelp.class; |
| 5 | file jobout('class.csv'); |
| 6 | put name "," sex "," age "," height "," weight; |
| 7 | RUN; |