Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *null;
- data z1;
- set sashelp.electric;
- *where alltip = '';
- *where allpower = .;
- where allpower < -9999999999999;
- run;
- *instrukcja if;
- data z2;
- set sashelp.cars;
- IF MSRP <= 25000 then klasa = 'tani';
- IF MSRP > 25000 and MSRP <= 75000 then klasa = 'sredni';
- IF MSRP > 75000 then klasa = 'drogi';
- run;
- data z3;
- set sashelp.cars;
- IF MSRP <= 25000 then klasa = 'tani';
- ELSE IF <= 75000 then klasa = 'sredni';
- ELSE klasa = 'drogi';
- run;
- data z4;
- set sashelp.cars;
- length klasa $20
- rabat 8;
- IF MSRP <= 25000 then do;
- klasa = 'tani';
- rabat = 0.25;
- end;
- ELSE IF <= 75000 then do;
- klasa = 'sredni';
- end;
- ELSE do;
- klasa = 'drogi';
- end;
- run;
- data z5;
- set sashelp.cars;
- if make = 'Audi' then output;
- run;
- data z6 z7;
- set sashelp.class;
- if sex = 'F' then output z6;
- else output z7;
- run;
- data z8 z9 z10;
- set sashelp.class;
- where weight > 105;
- output z8;
- if sex = 'F' then output z9;
- if sex = 'M' then output z10;
- run;
- proc sort data = sashelp.cars out = audi;
- where make = 'Audi';
- by descending horsepower;
- run;
- proc sort data = sashelp.cars out = audi;
- where make = 'Audi';
- by type descending msrp;
- run;
- data z11;
- set sashelp.cars;
- coll = _N_;
- run;
- *formaty;
- data z12;
- a = 12345.67;
- b = 12345.67;
- c = 0.567;
- d = 12345.678;
- format a commax12.2 b comma12.2 c percent12.2
- d date9. ;
- run;
- *put input
- zmienna_znakowa = put(zmienna, format)
- zmienna_numeryczna = input(zmienna, informat);
- data z13;
- a = 150;
- b = put(a, 6.);
- c = input(b, 8.);
- run;
- libname Z 'C:\Users\student\Desktop\Z';
- data Z.Z1;
- set sashelp.class;
- length plec $20;
- if sex = 'F' then plec = 'Kobieta';
- else if sex = 'M' then plec = 'Mezczyzna';
- run;
- data Z.Z2;
- set sashelp.cars;
- length Class $20;
- if horsepower <= 130 then Class = 'wolny';
- else if horsepower <= 200 then Class = 'normalny';
- else Class = 'szybki';
- roznica = abs(200 - horsepower);
- run;
- data Z.Z3;
- set sashelp.cars;
- if msrp
Add Comment
Please, Sign In to add comment