SAS University Edition – troubleshooting shutdown issue (Resolved)

Desired Outcome:

Resolve issue when I shutdown from within SAS, Where I get this error:

HTTP Status 500 – Internal Server Error

Java.lang.ClassFormatError: Truncated class file

java.lang.ClassFormatError: Truncated class file

Troubleshooting:
-I checked various boards and the resolution appears to be to download 
from SAS the latest version; delete the current instance in VirtualBox; 
and create a new instance.  I'll preserve the /myfolders directory on Mac,
so I shouldn't lose anything.  

-Maybe it was because I had done a save vs an ACPI shutdown recently.  
-VirtualBox was upgraded to 5.2.30
-Following these instructions from SAS.  I want to create a Linux instance.
-The new file from SAS is a bit bigger than prior - at 2.52GB, so I 
deleted the prior file
-Deleted current instance in VirtualBox
-When you remove an instance it asks if you want to delete the files 
containing the virtual machine from your hard disk as well.  I'm 
thinking to just "remove only" and keep everything else as is.  
-Import the appliance - pointing to new file I downloaded
-Got this error - Failed to import appliance <new filename>.  And SAS
University Edition.vbox already exists.  
Note: I probably should have said "Yes" to deleting those other files
-Manually found and deleted "SAS University Edition.vbox"
-Note: There's also SAS_University_Edition_1.vmdk, but not sure if I should 
delete yet.
-Looks like I also have to delete the .vmdk file as well.  The installer
is balking at this install. Deleted the file.
Note: Good thing is that I now know where the logs are kept for SAS VM
-Now it's saying it can't work because a UUID file already exists.  
-A post in SAS says, of course, I should have deleted all files.
-I manually deleted all files in the folder
-I also clicked on "Reinintalize the MAC address of all network cards.
Not sure if that makes a difference.  
-Same issue.  Deleted the folder "SAS University Edition" within VirtualBox VMs"
-That appeared to work.  Installation complete.  Now running the VM
-SAS is saying the files are up-to-date, but there's a message about not
having a shared folder.  I was getting ahead of the installation, because
you set the "/myfolders" within the VirtualBox VM.  I'll be pointing to 
existing folders
-Did an ACPI shutdown to close the VM, so I can set the myfolders
-Configured in VirtualBox for the shared folder to be mounted
-Ran the VM again
-So far so good -- sees my old files I had saved.
-Ran a program - OK
-Ran this to confirm expiration of license (about year from now)
proc setinit; run;
Looks good
-Signed off within SAS and received message "Your SAS Studio session and SAS session have ended. "
This is good and expected.  I'm resolved now.
Posted in Data, SAS | Tagged | Leave a comment

SAS Learning using sascrunch.com

Desired Outcome:

High level introduction to SAS using basic overview from SASCrunch.com with various Lessons Learned:

Accessing data from a file

-Within the code, the first line in tutorial is:

Filename file1 ‘folders/myfolders/file1.csv’

-I was able to easily create the CSV, but within the Mac it was in the myfolders directory, and I didn’t realize that SAS is configured first for ‘folders’

-Within SAS, Code, Server Files and Folders, I first click on select “My Folders”

-Click on the icon above called Folder Properties

-Location: /folders/myfolders

-Note: I was thinking this was just within the tutorial, but this actually is the path

Different formats of files for input

Note: This was an issue because I was getting ahead of the documentation, and didn’t realize that there are different kinds of input file formats (space-delimited, comma-delimited, aligned by columns.  I was creating the file in Mac MS-Excel and saving in comma separated values (.CSV), but there are different forms of that within Save-As, and I’m choosing what’s specifically name “comma separated values (CSV)”.

-Because I’m saving as comma delimited, I’ll try:

Data DS;

Infile file1 firstobs=2 dlm=’,’;

Input ID $ Age;

Run;

Issue: Within Output Data, there is only data in first row, ID of: ID0001,2

Note: Properties of the .csv file is that it’s opened within MS-Excel.  Maybe the raw .CSV file needs to be saved differently.

Note: Now I’m finding myriad ways of doing this, including right-clicking on the file1.csv (in SAS Studio), selecting “Import Data”, and accepting all the defaults – does everything for me.

Note: I need to dig deeper into differences between file formats, exporting, importing.  Will probably be a different blog post.

-This is the code that was auto-generated when I right-clicked on the data file and chose to “Import Data”:

/* Generated Code (IMPORT) */
/* Source File: file1.csv */
/* Source Path: /folders/myfolders */
/* Code generated on: 6/9/19, 9:01 AM */

%web_drop_table(WORK.IMPORT);

FILENAME REFFILE ‘/folders/myfolders/file1.csv’;

PROC IMPORT DATAFILE=REFFILE
DBMS=CSV
OUT=WORK.IMPORT;
GETNAMES=YES;
RUN;

PROC CONTENTS DATA=WORK.IMPORT; RUN;

%web_open_table(WORK.IMPORT);

Note: SAS is using various variables like “DBMS”.  This gives me some clues on what’s really required for importing files.

Sorting

Note: This one didn’t quite work as planned.  I didn’t see the “flag” after running it.  Need to work on this one.

proc sort data=sashelp.class out=class;
by sex height;
run;

data class2;
set class;
by sex height;
if first.sex then flag = “Shortest”;
else if last.sex then flag = “Tallest”;
run;

Statistical Variables

-SAS has a forte, of course, of statistics.  Appears easy to run a program to request a bunch of data.  The sashelp.cars data set is something that comes with SAS University Edition.

Proc univariate data=sashelp.cars;
Var MSRP;
Run;

-This gives results of mean and standard deviation (stdev)

Proc means data=sashelp.cars;
Var MSRP;
Run;

-This gives results of frequencies, with various tables

Proc Freq data=sashelp.cars;
Table Make * DriveTrain;
Run;

Proc SQL – Retrieving data from dataset and manipulating it

-This is the primary reason I’m working with SAS University Edition – to learn and practice SQL with various relational databases.

-Example of some code is:

Proc sql;            (SQL commands to retrieve data from data set and do things like sorting)
select make, model, msrp     (focus on specific variables)
from sashelp.cars      (location of the dataset)
where make = “Audi”   (subsetting within a variable for a specific field)
order by msrp;    (sorting the results by a specific field)
Quit;

Proc SQL – Summarizing Data

Proc sql;   (Using SQL commands within SAS)
select make,   (Select a specific field within dataset)
count(make) as n,   (Count up the number of entries by make, and return the count)
mean(msrp) as mean_msrp   (find the mean within each grouping of make)
from sashelp.cars   (pull data from this dataset)
group by make;   (group together by make)
Quit;

Proc SQL – Creating table (data set)

Proc sql;  (SQL commands within SQL)
create table bigfish as  (will create a table and call it bigfish)
select *  (go into dataset and select all fields within the dataset)
from sashelp.fish  (specific dataset)
where weight >1000;   (only pull data over a certain weight)
Quit;

SAS Macro

-I’m going to hold off on this for the moment.  Need to get more comfortable with the manual stuff before automating with scripts.

Posted in Data, SAS | Tagged | Leave a comment

SAS – Exporting from Excel to CSV; Importing CSV to SAS

Desired Outcome:

Understanding various file formats, how to export, how to import to SAS

https://www.sascrunch.com/how-to-learn-sas-fast.html#step7

Step7: Learn Data Import

Comma-delimited file

 

Spaced-delimited file

 

Column aligned file

 

Posted in Data, SAS | Tagged | Leave a comment

SAS University Edition – updating and verifying license

Overview

I had installed the SAS University Edition a while back, within a VirtualBox VM, on my Mac.  Didn’t play with it too much, but knew that I needed to install an upgrade at some point in order to maintain the license.

Upgrading (and extending license)

The key is to upgrade before July 31, so that it not only gives you the current edition, but it also installs a license key for another year.  There was one year where I had missed the deadline, and needed to do a fresh install to create the new license key.

Accept the Terms and Conditions, renew your license, and open SAS Studio.

I was able to go into the VM, load SAS University, click on upgrade, do the installation, and didn’t get anything about stuff being expired.  The response then was, “SAS University Edition is up-to-date”.

Verifying license

This is overkill, but I would like to now know what version of SAS University Edition I have, to confirm that it did actually extend the license, and to what expiration date.  There wasn’t anything really obvious within the application, so I found this command line to enter within SAS editor window:

proc setinit; run;

When I entered that it came back with:

Original site validation data
Current version: 9.04.01M6P110718
Site name: ‘UNIVERSITY EDITION 2.8 9.4 M6’.
Site number: 70245736.
CPU A: Model name=” model number=” serial=’+2′.
Expiration: 16JUN2020.
Grace Period: 0 days (ending 16JUN2020).
Warning Period: 47 days (ending 02AUG2020).
System birthday: 14NOV2018.
Operating System: LIN X64 .
Product expiration dates:
—Base SAS Software 16JUN2020 (CPU A)
—SAS/STAT 16JUN2020 (CPU A)
—SAS/ETS 16JUN2020 (CPU A)
—SAS/IML 16JUN2020 (CPU A)
—SAS/ACCESS Interface to PC Files 16JUN2020 (CPU A)
—SAS/IML Studio 16JUN2020 (CPU A)
—SAS Workspace Server for Local Access 16JUN2020 (CPU A)
—SAS Workspace Server for Enterprise Access 16JUN2020 (CPU A)
—High Performance Suite
Looks like I’m good (with current version) through June 16th, 2020 with a grace period toward August 2nd, 2020.

Using

Now that I know I’m upgrade, licensed, and good to go — I have to work more with SQL.

Posted in Data, SAS | Tagged | Leave a comment

Graduation from USC with an MSW

Time flew really fast.

On May 10th, 2019 I graduated from USC with an MSW degree.  I also made Dean’s List Honorable mention with GPA of 3.978 – how’s that for accuracy!  My best friend from New York (George) especially came out to hang out with me during graduation, which made it really fun.

Now the next step is to engage with people I know, and find an opportunity within San Luis Obispo County.  Working remotely could also work, as this is now feasible with high-speed internet, video-conference, etc.

Posted in Graduation, MSW | Leave a comment

Medi-Cal Coverage of the Diabetes Prevention Program (DPP)

The Diabetes Prevention Program (DPP) is an evidence-based, lifestyle change program designed to assist Medi-Cal beneficiaries diagnosed with prediabetes in preventing or delaying the onset of type 2 diabetes. Effective for dates of service on or after January 1, 2019, the Diabetes Prevention Program (DPP) will be a Medi-Cal covered benefit.

More info is here DPP

Posted in Health Insurance, Medi-Cal | Leave a comment

Fraud Prevention

Fraud Prevention is a large topic, that is popular with a focus on the Gerontology community.

Here’s a link to the FTC site which has some example videos of things to look out for:

-Gift Cards

-Cybersecurity

-Online Romance Imposter

-Family Emergency Imposter scams

-and others…

Posted in Fraud | Leave a comment

Daily File (California State Legislation)

Posted in LobbyDays2019 | Leave a comment