There are some common variations on how to create delimited files used by macro software, like Excel and Redshift, that are currently not directly supported by SAS. Of these there are two main ones that I think should be easy to implement and solve the most common problems.
Support for reading and writing files with embedded end-of-line characters.
This is common for CSV files generated by EXCEL. Currently SAS can only handle files where the embedded line break characters do not exactly match the end-of-line characters. So SAS can read a file that uses CR+LF as end of line and has embedded CR or LF characters, but not records that have embedded CR+LF combinations. But when the field is properly quoted this is a format that Excel (and others) do support.
This one is especially annoying since it is difficult to program around this limitation. Currently to read files like this users need to pre-process the whole file to remove or replace the embedded line break characters. And for writing files SAS does not currently automatically add quotes around field values that contain the end-of-line characters. So users might need to use the ~ modify on PUT statements to force SAS to add quotes and end up with files that have more quotes than are really needed.
Support for the use of an escape character
To protect special characters like delimiters, CR, LF, quotes and the escape character itself a lot of databases (and programming languages) use an escape character, typically a backslash. This method of protecting special characters in text is popular with many languages, for example Unix command shells, and has been adopted by major database platforms like Redshift. Typically this is done instead of adding quotes around values that contain special characters. Some even try to add quotes around the values but instead of doubling the quotes that are in the data they add this backslash character.
SAS should be able to read a delimited file that is using an escape character instead of quoting to protect embedded special characters. And it should be able to write files that use escaping instead of quoting to protect special characters.
Add a DESC= to allow user-coded description value to as many "proc-level" (i.e. DATA step, PROC xxxxx, possibly ODS ) statements as possible. Add an option to add this descriptor to some SASLOG messages such as at the end of DATA or PROC when showing CPU use.
z/OS specific, add this value to the SAS SMF record.
The intent is to allow "grouping" of pieces of a program, to easier identify the parts that error messages come from, or analysis of resources used, with a value of meaning to the user. Such as "summarization and redistribution of sales by region" which might consist of many different DATA and PROC actions but be one logical piece to the user.
It would be great to have the option to request diagnostic plots in PROC HPREG, similar to what is available with PLOTS=DIAGNOSTICS in PROC GLM. I like PROC HPREG because it combines many of the features of PROC REG and PROC GLM into one proc but lacks built-in model diagnostics.
It would be nice to have a CAT_() type function that uses the format applied to the variables rather than Best for numeric variables.
For example, I would have preferred if the WANT_STRING was the same as the output from the HAVE_STRING code, since a format is applied to the variables already.
data have; format date1-date20 date9.; format datec1-datec20 $9.; length datec1-datec20 $9. x_string y_string $256.; array _date(*) date1-date20; array _datec(*) $ datec1-datec20; do i=1 to dim(_date); _date(I)=floor(ranuni(25)*365+1); _datec(I)=trim(put(_date(I), date9.)); end; have_string=catx(", ", of _date(*)); want_string=catx(", ", of _datec(*)); run; proc print ; run;
The RENAME statement (and dataset options) can now handle renaming lists of variable if both the SOURCE and TARGET names are simple numerical suffix lists. So I could write statements like these:
rename old1-old5=new1-new5 ; rename old1-old5=new6-new10 ; rename old1-old5=old2-old6;
But frequently we have other lists of variable names, including just simple space delimited names like you would use in any SAS statement. I would request that we enhance the RENAME statement to allow the addition of extra parenthesis to rename lists of variables. So things like this:
rename (a b c d e)=(name age sex height weight); rename old1-old5=(a b c d e); rename a--e=var1-var5 ; rename (name age sex height weight)=var1-var5 ; rename new:=var1-var5;
Add option(s) to disable EG from interjecting the code which sets certain macro variables , i.e. _CLIENT* and _SASPROG*. Allow the particular project loaded in memory to have this option disabled by accessing it(them) from the menu under File > Project Properties.
By "code which sets certain macro variables" I'm referring strictly to the LET statements that EG adds to each program node which effectively augment the SAS environment with values generated by EG.
Also wanting that when one is using File > Export > "Export all Code in Project", that the generated macro variables would also be excluded.
It would be great if there was a function similar to N() that counted the number of non-missing character values. Currently SAS has functions for counting missing character (CMISS) and numeric (NMISS) variables, and nonmissing numeric variables (N). So this seems like a logical hole to fill.
This article suggests development is investigating the possiblity but I wanted to emphasize my interest and hopefull others will as well.
We have noticed that in SAS Studio web page we can access any file with the help of file shortcut function.
We have already disabled folder shortcut webdms.allowFolderShortcuts to "false" on the recommendation of SAS Technical team. But here I wanted to block the ''file shortcuts''.
This file shortcut is allowing me to access any file which is there in Disk.
Please refer the screenshot and help us with your suggestions. \
And let us know if this idea can be consider.
Thanks in advance,
To show missing values as NA, it would be nice if we could do the following. It's easy to workaround this, but given that NA is common in other packages this would be a useful addition.
options missing='NA'; data class; set sashelp.class; if age=12 then call missing(age, weight); if age=13 then call missing(height); run; proc print data=class; run;
There are Linux PAM modules like pam_oddjob_mkhomedir and the older pam_mkhomedir that do the job of automatically creating a home directory for a user that has not logged in before. This removes the requirement for administrators to manually create home directories for new Linux platform users. Unfortunately this does not work as expected with the SAS Object Spawner as it seems that the sasauth module does not trigger PAM session handling. There is a comment in the sasauth.conf file that confirms this (with respect to the use of Centrify): "Centrify requires that pam_setcred be called. sasauth traditionally has not done this, since there's no "session" like an interactive login." The Configuration Guide for SAS 9.4 Foundation for UNIX Environments also states that “Session and password modules are not supported”. In addition to SAS 9.2, 9.3, and 9.4, this also applies to the SAS Object Spawner used by SAS Studio 4.2 with SAS Viya 3.2
Whilst this no-session would be true for SAS Metadata Server authentication, it doesn't seem correct for the SAS Object Spawner, when launching standard SAS Workspace Servers as the requesting user, since that launch will fail if the user has no home directory.
Can we get the sasauth module enhanced to trigger PAM session handling and avoid the need for workarounds?
See the blog post and comments at https://platformadmin.com/blogs/paul/2017/04/sas-user-linux-home-dir-auto-creation/ for a discussion of why a workaround is necessary because of this.
All the major SAS string handling functions have a macro equivalent:
Especially when using %scan, one often has to use %sysfunc(countw()) to initialize a macro loop.
So I propose to create a macro equivalent of countw, namely %countw, similar in function to %scan with regards to delimiters and modifiers.
We currently face the problem that when we query SQL Server via Enterprise Guide 7.1 Query Designer, if we design a query that calculates the mean of an int column, the result is also an int. For a non-IT user who does not know how SQL works this is a plainly wrong result and leads to errors in the resulting data analysis.
SAS Support (call [SAS 7612275697]) said the only workaround for this issue is to switch off pass-through of SQL code to the database in the libname statement using "direct_sql = none". This results in a correctly calculated mean, but decreases performance of many queries unbearably.
I hereby suggest to include a checkbox "disable implicit SQL passthrough" in SAS Enterprise Guide Query Designer. If checked, the proc sql option "NoIPassThru" is set in the proc sql code generated by query designer. This creates correct results with the price of sometimes extreme loss of performance.
Alternatively, and even better, Enterprise Guide could be extended so that it 'understands' the problems of calculating the mean of an int column in SQL and automagically casts the int value to e.g. float (see e.g. https://stackoverflow.com/a/11106209) before applying the mean function, so that we get both fast execution (by the database) and correct results. SAS Support, however, mentioned that this is probably not doable for unstated reasons.
Thank you for looking into this problem!
When I run a program in EG, the log summary shows all notes/warnings/errors, with tabs for each, which I like.
If I have errors, I often want to start by looking at the error messages. So I click the ERROR tab. But instead of filtering to show just the errors, this turns OFF display of the errors. So I have to click it again to toggle it to show the errors, then click the notes tab to turn them off, and click the warnings tab to turn them off.
This always feels backwards to my mind. I would like it better if when I click on a tab, it selects just those lines. Even at the cost of needing a separate button for "show all". I'm sure there's a better way to do it than that. But the current feature always surprises me.
I'm looking at a long list of log messages with errors buried somewhere within them. When I click "ERRORS" I'm trying to select those lines, not hide them.
The standalone install of Eg and AMO should be easier to download, each site have to be license to use it by the SAS installation, so there is no problem with hacking the apps. I don't understand why they have to be buried in a software order.
Using EG is like walking on glass shards, so I will not attempt to list all the deep cuts and all the paper cuts one has to continuously deal with. Still, one is annoying and repetitive enough that I must take the time to raise it here:
When deleting a table, one is sometimes told that the table is locked, as seen above.
The table is not visible in the process tree even though it is opened (without being identified) by one of the programs, and the easiest way is then to go back to the process flow view, search for the table somewhere in the flow, delete its shortcut there, and then one can delete the table proper.
Please provide a prompt instead of this ludicrous "unexpected error".
Or allow the following that might do a similar thing.
proc printto print=log; run;
The idea is that some procedure output that you make in SAS is "administrative". Like output to the log, a proc print can create information dealing with the SAS environment or files sizes and file dates, for example. This can inform users for debugging purposes or for showing the state of the SAS system at the time of running just like log output. If this information works like log information why not allowed users to send the text stream to the log.
This can be done in batch mode,
We have thousands of Statistical Process Control charts in SAS Visual Analytics that are controlled by many different controls. Many of our business partners that consume these charts often save the chart and add it to an executive summary in PowerPoint. We would really like to be able to pass categories and dates into the title of the chart itself. For example: Chart Title = "p Chart - [dynamic category value] - Baseline set to [Dynamic start date values] to [Dynamic end date values]". These dynamic values could come from a Calculated item or variable in the dataset. The values should be controlled by the controls and interactions.
Please add an autosave feature in SAS Visual Analytics while you are in Report Designer. If your session times-out while you are creating the report, you lose all of your work that hasn't been saved.
Recently it has come to my attention that the SAS UE VM can run out of space in /tmp permanently, as revealed here: https://communities.sas.com/t5/SAS-Analytics-U/How-to-clear-up-space-in-WORK-folder/m-p/337139/highl...
I am really surprised that SAS has not implemented a mechanism that cleans up any remnants of crashed previous workspace server sessions when the VM starts (which is basically a system boot, I think).
So I suggest that at least running the cleanwork utility is implemented at startup of the SA UE VM.