BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DWhite
Obsidian | Level 7

Hello. I am trying to learn more about how the cre8data.sas works and solve a problem. We have a SAS Studio solution running on our campus and an instructuor is using SAS training materials. The current cre8data.sas includes a setup.sas and p199d00.sas. The setup worked correctly on our system and populated our test user folder just fine in SAS Studio.

 

The instructor has another zip folder "pg194.zip" that has data and sas files but does not include a cre8data.sas or setup file, but does include the p194.sas script.   

 

A couple questions?

1. Can I modify the cre8data.sas and setup.sas files to work with pg194, if so, can you provide a link to documentation?

2. Are the files (cre8data.sas and setup.sas) available for the pg194 and can be shared?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
DWhite
Obsidian | Level 7

Please do not jump to conclusions. I am working with very limited information here.

View solution in original post

19 REPLIES 19
ballardw
Super User

Best would be to provide the code of the PG194.SAS file. Then we can ask intelligent questions about what you already have.

 

Typically I would expect to see something related to 1) assigning SAS library 2) and code to read any input files.

 

There is likely nothing "magic" about either of your Cre8data or Setup SAS program file names, the important part is the content of the code.

 

Did your instructor provide any additional instruction in class or a documentation file in the ZIP archive with what to do?

 

DWhite
Obsidian | Level 7

Attached is the p194.sas file. I believe that it generates data sets. I included only a snippet.

/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 WARNING: STUDENTS, DO NOT EXECUTE THIS PROGRAM! INSTEAD,
          EXIT AND EXECUTE THE CRE8DATA.SAS PROGRAM TO SETUP 
          YOUR COURSE DATA ENVIRONMENT.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 WARNING: DO NOT ALTER CODE BELOW THIS LINE 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

options linesize=256;

data PG1.CLASS_BIRTHDATE;
   attrib Name length=$8;
   attrib Sex length=$1;
   attrib Age length=8;
   attrib Height length=8;
   attrib Weight length=8;
   attrib Birthdate length=8;

   infile datalines dsd;
   input
      Name
      Sex
      Age
      Height
      Weight
      Birthdate
   ;
datalines4;
Alfred,M,14,69,112.5,16370
Alice,F,13,56.5,84,16756
Barbara,F,13,65.3,98,16451
Carol,F,14,62.8,102.5,16256
Henry,M,14,63.5,102.5,16406
James,M,12,57.3,83,16967
Jane,F,12,59.8,84.5,16873
Janet,F,15,62.5,112.5,15797
Jeffrey,M,13,62.5,84,16552
John,M,12,59,99.5,17036
Joyce,F,11,51.3,50.5,17169
Judy,F,14,64.3,90,16410
Louise,F,12,56.3,77,17021
Mary,F,15,66.5,112,15790
Philip,M,16,72,150,15665
Robert,M,12,64.8,128,16958
Ronald,M,15,67,133,15992
Thomas,M,11,57.5,85,17243
William,M,15,66.5,112,16067
;;;;
run;

data PG1.CLASS_TEACHERS;
   attrib Name length=$8;
   attrib Grade length=8;
   attrib Teacher length=$12;

   infile datalines dsd;
   input
      Name
      Grade
      Teacher
   ;
datalines4;
Alfred,8,Thomas
Alice,7,Evans
Barbara,6,Smith
Carol,8,Thomas
Henry,8,Thomas
James,6,Smith
Jane,5,Garcia
Janet,9,Jones
Jeffrey,7,Evans
John,6,Smith
Joyce,5,Garcia
Judy,8,Thomas
Louise,6,Smith
Mary,9,Jones
Philip,10,Williams
Robert,7,Evans
Ronald,10,Williams
Thomas,6,Smith
William,9,Jones
;;;;
run;

data PG1.CLASS_TEST2;
   attrib Name length=$7;
   attrib Subject length=$7;
   attrib TestScore length=8;

   infile datalines dsd;
   input
      Name
      Subject
      TestScore
   ;
datalines4;
Judy,Math,97
Judy,Reading,91
Barbara,Math,96
Barbara,Reading,86
Louise,Math,92
Louise,Reading,99
James,Math,90
James,Reading,85
Joyce,Math,88
Joyce,Reading,75
William,Math,87
William,Reading,87
Henry,Math,85
Henry,Reading,86
Jane,Math,84
Jane,Reading,76
Alfred,Math,82
Alfred,Reading,79
Mary,Math,81
Mary,Reading,84
Janet,Math,75
Janet,Reading,71
Philip,Math,73
Philip,Reading,80
Alice,Math,71
Alice,Reading,67
Robert,Math,71
Robert,Reading,72
Thomas,Math,70
Thomas,Reading,68
John,Math,68
John,Reading,73
Ronald,Math,66
Ronald,Reading,62
Carol,Math,61
Carol,Reading,57
Jeffrey,Math,55
Jeffrey,Reading,63
;;;;
run;

data PG1.CLASS_TEST3;
   attrib Name length=$7;
   attrib Subject length=$7;
   attrib TestScore length=8;

   infile datalines dsd;
   input
      Name
      Subject
      TestScore
   ;
datalines4;
Judy,Math,97
Judy,Reading,91
Barbara,Math,96
Barbara,Reading,86
Barbara,Math,96
Louise,Math,92
Louise,Reading,99
James,Math,90
James,Reading,85
Joyce,Math,88
Joyce,Reading,75
William,Math,87
William,Reading,87
Henry,Math,85
Henry,Math,90
Henry,Reading,86
Jane,Math,84
Jane,Reading,76
Alfred,Math,82
Alfred,Reading,79
Mary,Math,81
Mary,Reading,84
Janet,Math,75
Janet,Reading,71
Philip,Math,73
Philip,Reading,80
Alice,Math,71
Alice,Reading,67
Robert,Math,71
Robert,Reading,72
Thomas,Math,70
Thomas,Reading,68
John,Math,68
John,Reading,73
Ronald,Math,66
Ronald,Reading,62
Carol,Math,61
Carol,Reading,57
Jeffrey,Math,55
Jeffrey,Reading,63
;;;;
run;

data PG1.CLASS_UPDATE;
   attrib Name length=$8;
   attrib Sex length=$1;
   attrib Age length=8;
   attrib Height length=8;
   attrib Weight length=8;

   infile datalines dsd;
   input
      Name
      Sex
      Age
      Height
      Weight
   ;
datalines4;
Alfred,M,14,69,112.5
Alice,F,13,56.5,84
Barbara,F,13,65.3,98
David,M,11,55.3,73
Henry,M,14,63.5,102.5
James,M,12,57.3,83
Jane,F,12,59.8,84.5
Janet,F,15,62.5,112.5
Jeffrey,M,13,62.5,84
John,M,12,59,99.5
Joyce,F,11,51.3,50.5
Judy,F,14,64.3,90
Louise,F,12,56.3,77
Mary,F,15,66.5,112
Philip,M,16,72,150
Robert,M,12,64.8,128
Ronald,M,15,67,133
Thomas,M,11,57.5,85
William,M,15,66.5,112
;;;;
run;

data PG1.EU_OCC;
   attrib Geo length=$2 label='Country Code';
   attrib Country length=$40 label='Reporting Country';
   attrib YearMon length=$8 label='Year Month';
   attrib Hotel length=8 label='Nights Spent at Hotels';
   attrib ShortStay length=8 label='Nights Spent at Short Stay Accommodations';
   attrib Camp length=8 label='Nights Spent at Camp Grounds or RV Parks';

   infile datalines dsd;
   input
      Geo
      Country
      YearMon
      Hotel
      ShortStay
      Camp
   ;
datalines4;
AT,Austria,2017M09,7768564,1453530,524121
AT,Austria,2017M08,11353432,3140217,1997801
AT,Austria,2017M07,10124106,2836425,1752605
AT,Austria,2017M06,7391827,1568683,914560

 

 

 

Tom
Super User Tom
Super User

Do you actually want to run that program?  It says on the top not to run it.

 

If you did want to run that program then before running it you will need to define the PG1 libref pointing to some place where you can create files.  Something like:

libname pg1 '/folder/for/class';
%include 'p184.sas' / source2;

If your intent is to run it once and let students access the dataset then point to a directory that the students have readonly access and run it using a userid that has write access.   If the students have write access then one of them is bound to destroy some of all of the datasets or create other datasets in that folder by mistake.

DWhite
Obsidian | Level 7

No intention to run this as a stand-alone.

Reeza
Super User
Do you know the course he's taken the instructions from? If so, you can always sign up for that and see the full instructions and there's video instructions on the set up that you can link to directly.

However, you could also just populate those folders and files for all students automatically instead of making them each run the set up steps to avoid any issues as well via a batch script that would just copy the files to all the user folders provided.
DWhite
Obsidian | Level 7

Yes. This is what I am leaning towards. We are working in a Linux environment and may just copy all of the needed files over to the user folders.

 

Thanks.

Cynthia_sas
SAS Super FREQ
Hi:
Sometimes instructors can request an Academic Trainer's kit and in that case, there might be a zip file that includes other assets used for the class. Typically we use different zip file names for different types of classes -- so a Live Web class will use one name for a zip file; the Classroom version of the class will use a different name and the e-learning version of the class may use a third name. It really depends on which class. In many of our classroom classes, we use a file called cre8data.sas with some hardcoded locations (for S:\workshop or c:\workshop) because that is the data location on our classroom image.

Without knowing exactly how your instructor got the zip files and from whom, it is hard to comment. If you want to watch the data creation videos for the current version of the Programming 1 e-learning class, you will find those videos here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-access-data-for-SAS-Programming-1-cour... and you will see the names of the zip files and the programs we use for the current e-learning class in the videos. There are several SAS Studio videos and you have to follow the right set of instructions for your method of using SAS.

Since I don't know how your instructor got so many different files for Programming 1 or how old the files are, my recommendation would be that you or the instructor send mail to training@sas.com if the zip files came from taking a SAS Education class or send mail to academics@sas.com if the zip files came from an Academic Trainer's Kit.

We did have an older version of Programming 1 with 12 Lessons (the current version has 7 Lessons), as described here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-data-for-Programming-1-and-Prog... the instructions were different for the older course and used a different zip file than used in the newer course. So going back to the source of the zip files may be the quickest way to find out the answer.

My recommendation is that you do NOT try to mix and match from the zip files. We did not design the programs from different classes and different formats to be interchangeable.

Hope this helps,
Cynthia
DWhite
Obsidian | Level 7

I do not have much information from the instructor. Classes have started, and everybody has limited time. Thanks for the information.

 

D.

 

Cynthia_sas
SAS Super FREQ
Honestly, it looks like someone gave your instructor at least some of the Programming 1 data. When we deliver the data creation program, we do not use the name P194.SAS, which is how I know that he got the file from someone else.

As a workaround, you could activate the free Programming 1 class and use the zip and instructions inside the e-learning class to set up the data -- as you can see from the videos I posted the link to -- that data creation works very well and at least you'd have ALL the EPG194 files. My guess is that your instructor's course uses some, but not all of the data we use in the full course.

Hope this helps,
Cynthia
Reeza
Super User

Also, some of that content is under copyright, you may need to verify with the professor that they have the appropriate licensing for the content they're using.

 


@DWhite wrote:

I do not have much information from the instructor. Classes have started, and everybody has limited time. Thanks for the information.

 

D.

 


 

DWhite
Obsidian | Level 7

How is licensing applied. We have campus-wide licensing for SAS Studio, SAS VA, Enterprise Miner, SAS DIS, and others.

Cynthia_sas
SAS Super FREQ

Hi:

  With a University license, you should be OK using SAS. I am worried about the files that your instructor gave you and where he got them and how they are intended to be used. They seem close to the files we use for our courses, but seem to be modified. This is really not something that anyone here can resolve for you. Your instructor will have to go back to the group/person who gave him the files and ask them to send him working files for the class material he's using.

 

Cynthia

Reeza
Super User
Those are licenses for the applications, not the course and/or training material. That's a discussion you need to have with SAS. SAS does offer two levels of free courses - but I don't think that means you can take that content and create your own course entirely based off it because it's copyrighted material. It's equivalent to someone scraping a course from your University and going off and offering it for sale somewhere else. I'm fairly certain the profs would have something to say about that.
Cynthia_sas
SAS Super FREQ
This course is training for SAS Certification.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 19 replies
  • 3769 views
  • 7 likes
  • 5 in conversation