You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requested/suggested by @boemska-nik, and I really like the idea!
Is your feature request related to a problem? Please describe.
No, it would just be a nice additional convenience feature. Rather than having to remember the syntax to reference a file in SAS Content and type a full filename statement, it would be convenient to be able to just drag the file into a SAS program and have the syntax automatically inserted.
Describe the solution you'd like
Similar to the way you can currently drag a table from the Libraries pane into a SAS program and it results in "library.member" text being inserted into the program (to easily reference that table programmatically), it would be nice/convenient to be able to drag any file from the Explorer pane (SAS Content) into a SAS program and for that to result (when dropped) in filename statement code (with FILESRVC access method, since Files Service) being inserted in the SAS program at the spot it was dropped.
To verify:
Run the following SAS code in VS Code to create a sample .csv in your deployment: /* Write SASHELP.CLASS to a .csv in SAS Content */ filename dest filesrvc folderpath='/Public/' filename='blah.csv'; proc export data=sashelp.class dbms=csv file=dest; run;
In the Explorer pane, click the Refresh icon an confirm the file blah.csv appears in the SAS Content\Public folder.
Then, copy this code into a new SAS program: data _null_; infile myfile; input; put _infile_; run;
Drag the blah.csv file from Explorer pane and drop it on the top line of the SAS program in the previous step.
Ensure a filename statement similar to the following is inserted at that spot in the SAS program, where the folderpath corresponds to the folder location of the file and the filename corresponds to the name of the file: filename myfile filesrvc folderpath='/Public/' filename='blah.csv';
Run the program to make sure it runs successfully. (The contents of the .csv should be printed to the log in this case.)
Describe alternatives you've considered
Users can just continue typing the whole thing out themselves and have to remember the syntax.
Additional context
It would be nice for dragging a library from Libraries pane to result in "< library >" being inserted into the code as well, but we can track that separately.
Environment
Anywhere the Explorer pane (SAS Content, aka Files Service) is supported -- currently Viya 4 and Viya 3.5
The text was updated successfully, but these errors were encountered:
**Summary**
This adds the ability to drag sas content into sas programs. See #329 for more details
**Testing**
- [x] Tested dragging a folder into a SAS program (should not provide any code)
- [x] Tested dragging a file into a SAS program from my folder
- [x] Tested dragging a file into a SAS program from my favorites
- [x] Tested dragging files into a SAS program from nested folder paths
- [x] Tested dragging two files from the same folder into a SAS program
Requested/suggested by @boemska-nik, and I really like the idea!
Is your feature request related to a problem? Please describe.
No, it would just be a nice additional convenience feature. Rather than having to remember the syntax to reference a file in SAS Content and type a full filename statement, it would be convenient to be able to just drag the file into a SAS program and have the syntax automatically inserted.
Describe the solution you'd like
Similar to the way you can currently drag a table from the Libraries pane into a SAS program and it results in "library.member" text being inserted into the program (to easily reference that table programmatically), it would be nice/convenient to be able to drag any file from the Explorer pane (SAS Content) into a SAS program and for that to result (when dropped) in filename statement code (with FILESRVC access method, since Files Service) being inserted in the SAS program at the spot it was dropped.
To verify:
/* Write SASHELP.CLASS to a .csv in SAS Content */ filename dest filesrvc folderpath='/Public/' filename='blah.csv'; proc export data=sashelp.class dbms=csv file=dest; run;
data _null_; infile myfile; input; put _infile_; run;
filename myfile filesrvc folderpath='/Public/' filename='blah.csv';
Describe alternatives you've considered
Users can just continue typing the whole thing out themselves and have to remember the syntax.
Additional context
It would be nice for dragging a library from Libraries pane to result in "< library >" being inserted into the code as well, but we can track that separately.
Environment
Anywhere the Explorer pane (SAS Content, aka Files Service) is supported -- currently Viya 4 and Viya 3.5
The text was updated successfully, but these errors were encountered: