- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
2. El contenido parcial de la tabla SASHELP.CARS es el siguiente:
Make Type MSRP
----------------------------
Acura SUV $36,945
Acura Sedan $23,820
Acura Sedan $26,990
Audi Sedan $25,940
Audi Sedan $35,940
Audi Sedan $31,840
Audi Sedan $33,430
BMW SUV $37,000
BMW SUV $52,195
BMW Sedan $28,495
BMW Sedan $30,795
Se ejecuta la siguiente defición y llamado de macro:
%Macro Crear_Cars( Parm_Make );
Data &Parm_Make;
Set SASHelp.Cars;
Select( UpCase(Make) );
When( "&Parm_Make" ) Output &Parm_Make;
Otherwise;
End;
Run;
%Mend Crear_Cars;
%Crear_Cars(Audi)
Y el LOG indica que la tabla final WORK.AUDI "NO TIENE REGISTROS"
7 %Macro Crear_Cars( Parm_Make );
8
9 Data &Parm_Make;
10 Set SASHelp.Cars;
11 Select( UpCase(Make) );
12 When( "&Parm_Make" ) Output &Parm_Make;
13 Otherwise;
14 End;
15 Run;
16
17 %Mend Crear_Cars;
18
19 %Crear_Cars(Audi)
NOTE: There were 428 observations read from the data set SASHELP.CARS.
NOTE: The data set WORK.AUDI has 0 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
Se detecta que el error se corrige colocando una SENTENCIA MACRO que está ausente.
Envíe la definción de la macro corregida.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hola a todos
Espero que se ecuentren muy bien
Confirmando la respuesta correcta de este desafío es la siguiente:
FALTA COLOCAR LA SENTENCIAS %UPCASE()
%Macro Crear_Cars( Parm_Make );
Data &Parm_Make;
Set SASHelp.Cars;
Select( UpCase(Make) );
When( "%UPCASE( &Parm_Make )" ) Output &Parm_Make;
Otherwise;
End;
Run;
%Mend Crear_Cars;
Vamos al resultado de nuestro sorteo. ¿Listos?🏆
Los ganadores del Kit Customer Success son:
Muchas felicidades chicos 🎉
Para esta dinámica vamos a regalar otro obsequio, participantes estén atentos a sus correos electrónicos le llegará al ganador un email sorpresa.
Suerte 🍀
Gracias por confiar en nosotros
Saludos!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
%Macro Crear_Cars( Parm_Make );
Data &Parm_Make;
Set SASHelp.Cars;
Select( %UpCase(Make) );
When( "&Parm_Make" ) Output &Parm_Make; Otherwise; End;
Run; %Mend Crear_Cars; %Crear_Cars(Audi)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Data &Parm_Make;
Set SASHelp.Cars;
Select( %UpCase(Make) );
When( "&Parm_Make" ) Output &Parm_Make;
Otherwise;
End;
Run;
%Mend Crear_Cars;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Data &Parm_Make;
Set SASHelp.Cars;
Select( %UpCase(Make) );
When( "&Parm_Make" ) Output &Parm_Make;
Otherwise;
End;
Run;
%Mend Crear_Cars;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
%Macro Crear_Cars( Parm_Make);
Data &Parm_Make;
Set SASHelp.Cars;
Select( %UpCase(Make));
When("&Parm_Make") Output &Parm_Make;
Otherwise;
End;
Run;
%Mend Crear_Cars;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Data &Parm_Make;
Set SASHelp.Cars;
Select( %UpCase(Make) );
When( "&Parm_Make" ) Output &Parm_Make;
Otherwise;
End;
Run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
%Macro Crear_Cars( Parm_Make );
Data &Parm_Make;
Set SASHelp.Cars;
Select( UpCase(Make) );
When( "%UPCASE( &Parm_Make )" ) Output &Parm_Make;
Otherwise;
End;
Run;
%Mend Crear_Cars;
%Crear_Cars(Audi)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
cambiar
Select( UpCase(Make) );
por
Select( %UpCase(Make) );
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Data &Parm_Make;
Set SASHelp.Cars;
Select( %UpCase(Make) );
When( "&Parm_Make" ) Output &Parm_Make;
Otherwise;
End;
Run;
%Mend Crear_Cars;
%Crear_Cars(Audi)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
poner %UpCase
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Colocando el %upcase en el when, por ejemplo when ("%UPCASE(&Parm_Make)" output &Parm_Make;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
%Macro Crear_Cars( Parm_Make );
Data &Parm_Make;
Set SASHelp.Cars;
Select( UpCase(Make) );
When( "%UPCASE(&Parm_Make)" ) Output &Parm_Make;
Otherwise;
End;
Run;
%Mend Crear_Cars;
%Crear_Cars(Audi)