SAS is statistical analysis software/system and is one of the integrated systems of software products provided by the Northern Carolina State University. SAS enables programmers to perform various tasks like Storage, Retrieval, Management and Mining of clinical data. Programmers can also perform Report writing, statistical analysis and represent the data in a graphical way that clearly demonstrates its significance. SAS Environment has many windows to perform different tasks on the SAS Environment, editor window, log window, output window, explorer window and result window. Log window is one of the windows which is specially designed to identify errors that are generated during programme coding part and it also keeps a record of everything that has been done within the programming part. These programming statements are identified by line numbers, interspersed with SAS statements are messaged from SAS in to log window. These messages might begin with the words NOTE, INFO, WARNING, ERROR or an error number and they might refer to a SAS statement by its line number in the log. Instructing SAS Log: Programmers can instruct SAS output to write additional information to the log by using the following statements: PUT statement: Writes selected lines (including text strings and DATA step variable values) to the SAS log in the current iteration of a DATA step. %PUT statement: Enables to write a text string or macro variable values to the SAS log. %PUT is a SAS macro program statement. PUTLOG statement: Writes a user-specified message to the SAS log. LIST statement: Writes to the SAS log the input data records for the data line that is being processed. The LIST statement operates only on data that are read with an INPUT statement. It has no effect on data that are read with a SET, MERGE, MODIFY or UPDATE statement. DATA statement with nesting option: Writes to the SAS log a note for the beginning and end for each nesting level of DO-END and SELECT-END statements. ERROR statement: Sets the automatic _ERROR_ variable message on to the log window. Customizing SAS Log window: Programmers can also customize their log window by using some statements. When there are large SAS production programs or an application that has to run on a regular basis without changes and might want to suppress part of the log of the programs that are generated by default. A SAS system option enables to suppress SAS statements and system messages, as well as to limit the number of error messages. Some of the SAS system options that can be used to alter the contents of the log are as follows: CPUID / NOCPUID: This option specifies whether hardware information is written to the SAS log. ECHO: Specifies a message to be written to the SAS log while SAS system is initialized. MLOGIC: This option writes macro execution trace information to the SAS log. MLOGICNEST: This option writes macro nesting execution trace information to the SAS log. MPRINT / NOMPRINT: specifies whether SAS statements that are generated by macro execution are written to the SAS log. NOTES / NONOTES: specifies whether notes (messages beginning with NOTE) are written to the SAS log. NONOTES does not suppress error or warning messages. SOURCE / NOSOURCE: specifies whether SAS writes source statements to the SAS log. SYMBOLGEN / NOSYMBOLGEN: Specifies whether the results of resolving macro variable references are written to the SAS log. How Errors are shown in Log window: Errors are also known as bugs. These errors in a SAS programming languages are the ones that cause an undesirable, usually unexpected result. One way of classifying bugs/errors in SAS is to divide them into three types of errors: syntax errors, data errors and logic errors. Syntax errors: result from failing to follow SAS rules about the way keywords are put together to make statements. Examples: missing semicolon, uninitialized variable and missing variable. Data errors: have a program that is syntactically sound but fails because of data values that do not fit the program as it was written. Examples: missing values were generated, invalid data, character field is truncated etc. Logic errors: have a program that runs and data that fits, but the result/reports that it has to generate is wrong because the program does something different than it is intended to do. Examples: DATA step produces wrong results but no error message. Conclusion: SAS log window is majorly used to check the successful running of the programs and to debug and avoid the errors that occur during the SAS programming. Clinnovo is a clinical innovation company. It is pioneer CRO industry in India. Clinnovo offers professional clinical research course , clinical data management course ,SAS Training and imaging training. Clinnovo has been serving different bio-pharma industries across the world with excellence and high quality. For more information contact at +91 9912868928, 040 64635501
Related Articles -
statistical, analysis, software, system, integrated, systems, software, Storage, Retrieval, Management, Mining, clinical data, SAS, statements, data,
|