NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

data produse;
infile"/home/u34897169/produse11.txt" dlm="*";
input Nume $ Pret Categorie $;
run;



data culori;
infile "/home/u34897169/culori.txt";
input Culoare$;
run;



proc format;
value $culoare "Rosu", "Galben","Albastru"="De baza"
"Alb","Negru","Non-culoare"
other="Derivata";
run;



title "Lista culorilor ca si tip";
proc print data=culori;
format culoare $culoare.;
run;

/*sem2
egal cu -- EQ
dif de --NE
<--LT
<=--LE
>--GT
>=--GE
intr o lista --IN
Op logici: NOT,AND,OR
instructiunea IF !!----doar ca si IF conditie THEN actiune; sau IF conditie THEN actiune1 ELSE actiune2;
*/


data Studenti;
length Sex $ 1;
input Varsta Sex Proiect Activitate Examen;
datalines;
21 M 8 9 8
. F 9 9 9
35 M 8 8 8
48 F . . 7
59 F 9 7 9
15 M 8 . 9
67 F 9 8 9
. M 6 7 6
35 F 7 7 8
49 M 5 5 8
;
title "Date studenti";
proc print data=Studenti noobs;
run;

title "Exemplu de operatori logici";
proc print data=work.studenti;
where Sex eq 'F' and
(Proiect in (9 10) or
examen eq 10);
var Sex Activitate Proiect Examen;
run;



data Femei;
length Sex $ 1;
input Varsta Sex Proiect Activitate Examen;
if Sex eq 'F';
datalines;
21 M 8 9 8
. F 9 9 9
35 M 8 8 8
48 F . . 7
59 F 9 7 9
15 M 8 . 9
67 F 9 8 9
. M 6 7 6
35 F 7 7 8
49 M 5 5 8
;
title "Date studente";
proc print data=Femei;
run;


data proiecte;
length Departament $ 9;
input CodProiect Departament $ Valoare;
datalines;
312 Productie 8720
313 Achizitii 12570
314 Productie 39750
315 Desfacere 7380
316 Desfacere 18390
;
run;

*/fara stabilirea latimii frecventei de raportare;


data proiecte1;
set proiecte;
if Valoare le 10000 then
do;
Raportare="Lunara";
Prezentare='17dec2018'd;
end;
else
do;
Raportare="Bilunara";
Prezentare='20dec2018'd;
end;
run;



*/cu stabilirea latimii frecventei de raportare;



data proiecte2;
set proiecte;
length Raportare $8;
if Valoare le 10000 then
do;
Raportare="Lunara";
Prezentare='17dec2018'd; *constanta de tip data;
end;
else
do;
Raportare="Bilunara";
Prezentare='20dec2018'd;
end;
run;

title "Proiecte companie - fara impunerea latimii coloanei Raportare";
proc print data=proiecte1 noobs;
format Prezentare ddmmyy10.;
format Valoare COMMA8.;
run;
title "Proiecte companie - cu impunerea latimii coloanei Raportare";
proc print data=proiecte2 noobs;
format Prezentare ddmmyy10.;
format Valoare COMMA8.;
run;


data Studenti1;
set Studenti;
where Sex eq 'M';
NotaFinala=SUM(Proiect*0.3+Activitate*0.2+Examen*0.5);
if NotaFinala>7;
run;
Title "Lista studentilor de sex masculin cu nota finala peste 7";
proc print data=Studenti1 noobs;
run;


data Studenti2;
length Sex $ 1;
input Varsta Sex Proiect Activitate Examen;
SELECT;
WHEN (missing(Varsta)) GrupVarsta= . ;
WHEN (Varsta lt 20) GrupVarsta=1;
WHEN (Varsta lt 40) GrupVarsta=2;
WHEN (Varsta lt 60) GrupVarsta=3;
OTHERWISE GrupVarsta=4;
END;
datalines;
21 M 8 9 8
. F 9 9 9
35 M 8 8 8
48 F . . 7
59 F 9 7 9
15 M 8 . 9

67 F 9 8 9
. M 6 7 6
35 F 7 7 8
49 M 5 5 8
;
title "Date studenti introduse cu SELECT";
proc print data=Studenti2;
run;


data Medii;
length Sex $ 1
GrupVarsta $ 13;
infile '/home/nume.prenume/datesas.txt' missover;
input Varsta Sex Proiect Activitate Examen;
if missing(Varsta) then delete;
if Varsta le 39 then
do;
GrupVarsta = 'Grup1';
Medie = .4*Proiect + .6*Examen;
end;
else if Varsta gt 39 then
do;
GrupVarsta = 'Grup2';
medie = (Proiect + Examen)/2;
end;
run;
title "Raportul Mediilor Studentilor";
proc print data=medii noobs;
run;




data Dobanda_Investitie;
Dobanda = .0375;
Total = 100;
do An = 1 to 3;
Total + Dobanda*Total;
output;
end;
format Total dollar10.2;
run;
title "Evoluţie investiţie";
proc print data=Dobanda_Investitie noobs;
run;

DO WHILE;
data Dublare_venit;
Dobanda = 0.0375;
Total = 100;
do until (Total ge 200);
An + 1;
Total = Total + Dobanda*Total;
output;
end;
format Total dollar10.2;
run;
title "Dublare venit";
proc print data=Dublare_venit noobs;
run;

DO UNTIL;
data Dublare_venit;
Dobanda = .0375;
Total = 100;
do while (Total le 200);
An + 1;
Total = Total + Dobanda*Total;
output;
end;
format Total dollar10.2;
run;
proc print data=Dublare_venit noobs;
title "Dublare venit";
run;
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.