La macro no manipula directamente conjuntos de datos SAS. Procesa cadenas de caracteres (nombre del registrador y mensaje) que se proporcionan como parámetros. Estas cadenas se transmiten luego a la función `log4sas_logevent` para el registro. No hay dependencia de datos externos o de bibliotecas SAS estándar como SASHELP para su funcionamiento intrínseco.
1 Bloque de código
MACRO
Explicación : Este bloque contiene la definición de la macro `_issueDebugMessage`. Comienza con verificaciones de la presencia de los parámetros `loggername` y `message`. Si falta un parámetro, se emite una advertencia `%put` y la macro finaliza. Si los parámetros son válidos, se llama a la función `%sysfunc(log4sas_logevent(...))` para escribir el mensaje de depuración en el registrador especificado. El código de retorno de esta función se almacena en `_rc` y se verifica para detectar posibles errores de registro.
¡Copiado!
/**
\file
\ingroup SASUNIT_LOG4SAS
\brief Issues an debug message to a logger
\version \$Revision$
\author \$Author$
\date \$Date$
\copyright Copyright 2010-2023 HMS Analytical Software GmbH, http://www.analytical-software.de
This file is part of SASUnit, the Unit testing framework for SAS(R) programs.
For copyright information and terms of usage under the GNU Lesser General Public License see included file README.md
or https://github.com/HMS-Analytical-Software/SASUnit/wiki/readme/.
\param loggername Name of the logger to capture the message
\param message Message to be captured by the logger
\return message Message in the associated appender
*//** \cond */
%macro _issueDebugMessage(loggername, message);
%if (%length(&loggername.)=0) %then %do;
%put WARNING: loggername is null;
%return;
%end;
%if (%length(&message.)=0) %then %do;
%put WARNING: message is null;
%return;
%end;
%let _rc = %sysfunc(log4sas_logevent(&loggername., Debug, DEBUG: &message.));
%if (&_rc ne 0) %then %do;
%put ERROR: _rc is NOT null: &_rc.;
%end;
%mend _issueDebugMessage;
/** \endcond */
1
/**
2
\file
3
\ingroup SASUNIT_LOG4SAS
4
5
\brief Issues an debug message to a logger
6
7
\version \$Revision$
8
\author \$Author$
9
\date \$Date$
10
11
\copyright Copyright 2010-2023 HMS Analytical Software GmbH, http://www.analytical-software.de
12
This file is part of SASUnit, the Unit testing framework for SAS(R) programs.
13
For copyright information and terms of usage under the GNU Lesser General Public License see included file README.md
14
or https://github.com/HMS-Analytical-Software/SASUnit/wiki/readme/.
15
16
\param loggername Name of the logger to capture the message
17
\param message Message to be captured by the logger
Este material se proporciona "tal cual" por We Are Cas. No hay garantías, expresas o implícitas, en cuanto a la comerciabilidad o idoneidad para un propósito particular con respecto a los materiales o el código contenidos en este documento. We Are Cas no es responsable de los errores en este material tal como existe ahora o existirá, ni We Are Cas proporciona soporte técnico para el mismo.
Información de copyright : Copyright 2010-2023 HMS Analytical Software GmbH, http://www.analytical-software.de This file is part of SASUnit, the Unit testing framework for SAS(R) programs. For copyright information and terms of usage under the GNU Lesser General Public License see included file README.md or https://github.com/HMS-Analytical-Software/SASUnit/wiki/readme/.
SAS y todos los demás nombres de productos o servicios de SAS Institute Inc. son marcas registradas o marcas comerciales de SAS Institute Inc. en los EE. UU. y otros países. ® indica registro en los EE. UU. WeAreCAS es un sitio comunitario independiente y no está afiliado a SAS Institute Inc.
Este sitio utiliza cookies técnicas y analíticas para mejorar su experiencia.
Saber más.