In Data, Titles And/Or Footnotes Using Character and Hexadecimal

Total Page:16

File Type:pdf, Size:1020Kb

In Data, Titles And/Or Footnotes Using Character and Hexadecimal PharmaSUG2010 - Paper CC19 Embedded Special Characters Kiran Karidi, Mahipal Vanam, and Sridhar Dodlapati ABSTRACT When the report generated from the clinical trial data requires to show lot of information in titles and column headers than they can accommodate, then Statisticians / Medical writers use special characters such as subscription, superscription, Greek letters, mathematical symbols, and custom-designed symbols etc to flag, and the complete corresponding information is provided in the footnotes for that flag. There are various techniques available to embed the special characters in the clinical study reports and they will be discussed in this paper. INTRODUCTION Quite often, in clinical trial data analysis reports, we may have to flag the data, titles, footnotes, column headers and graphs (axis labels and/or on the graphical area) with special characters, and give explanation for them in the footnotes. Rationale behind that is, when there is not sufficient space available in the target areas, the need arises to put a flag there and elaborate it later in the footnote. The reason to use the special symbols or characters for this purpose is to distinguish them with other characters and to make them more prominent. SPECIAL CHARACTERS There are different definitions for special characters depending on the encoding system (ASCII, EBCDIC & Unicode are most popular encoding systems), but in common usage, a character is considered as a special character, if that is not readily available on a standard computer keyboard. A special character can either display something or control the display of the characters that follow. Display character examples are: the trademark sign ‘™’, the registered trademark sign ‘®’ and degree ‘°’ as in degree Cels ius (°C) etc. Control character examples are: new l ine/line feed, new page/form feed, horizontal tab, vertical tab etc. However, for the purpose of flagging, it is obvious that we use the display special characters only. The regular SAS output files are plain text files; and we need special techniques to incorporate the special characters into them. Irrespective of the technique we use to embed the special character in the SAS output, they all follow the same process. First they are written to the code through editor, then during the execution time they are processed and finally they will carry out the specific function they were supposed to do i.e. display or control the display. Also, there are some other factors that influence the outcome, which include SAS version, operating system, system settings, font etc. APPROACHES TO EMBED THE SPECIAL CHARACTERS Approach 1: Directly pasting the special character into the SAS code Even though the special characters are not available on the keyboard, we can put them directly in the SAS code by using the Character map utility provided by Windows Operating system. Go to start ► Programs ► Accessories ► System tools ► Character map. By default, Character map will have 'Arial' font as default. Depending on your need change the font from the drop down menu. For example default Character map looks like: 1 Choose the character you want, click on Select ► Copy. Then you can now directly paste this into the SAS windows editor in the required location in the SAS code. Pros: • Very simple method (choose, copy and paste). • No additional encoding or translation needed during SAS execution. Cons: • Only available in Windows operating system. • Location path for this utility might be different in different windows versions. • SAS windows editor may not support all characters in the utility for a particular font chosen. Characters that are not supported will be translated as a question mark (?) during the paste operation. • From the utility, font same as the default font used to viewing the output file needs to be chosen and that too only if available. Approach 2: Using 4 digit Unicode This method is similar to the first approach in terms that character map utility is used to choose the character required. The only difference is, instead of manually copying the character into the SAS code, get the 4 digit unicode for that character and use it in the SAS code as follows: %macro specchar(n=, symbol=); %global &symbol; data _null_; char=input(& n. , $UCS2B4. ); call symput( "&symbol." ,trim(left(char))); run; %put symbol=&&&symbol..; %mend ; %specchar (n= '00AE'x , symbol=registered_trademark); Output from SAS log: symbol=® Pros: • Unlike first approach, this approach works even if editor does not support certain characters. Cons: • Depends on Unicode the SAS format “$UCS2B4.” supports • Certain symbols encoded will cause text display truncation when used to display as rows in the body of the output. This is due to a bug in SAS 9.2. Other target areas such as titles, footnotes, column headers etc will work fine. Approach 3: Using SAS ODS escape character and the Unicode for the special character required 3a: For all Output destinations: SAS 9.2: ods html file ="sample.htm" ; ods escapechar= '^' ; proc print data =sashelp.class( obs =3) label ; label weight= "Weight ^{unicode 03B1}" ; footnote "^{unicode 03B1}Actual Weight may be collected weight ^{unicode 2267} 2 lbs" ; run ; 2 ods _all_ close ; Pros: Easy to use and supports all kinds of output destinations (HTML, RTF, PDF etc.) . Cons: Not reliable across output destinations. 3b: For RTF output destination using ODS RTF and RTF in-line formatting. SAS 8 code: ods rtf file ="sample.rtf" ; ods escapechar= '^' ; proc print data =sashelp.class( obs =3) label ; title1 'this value is superscripted ^{super 2} ' ; title2 'this value is subscripted ^{sub 2} ' ; run ; ods _all_ close ; SAS 9.2 code: ods rtf file ="sample.rtf" ; ods escapechar= '^' ; proc print data =sashelp.class( obs =3) label ; title1 'this value is superscripted ^\super 2 ' ; title2 'this value is subscripted ^\sub 2 ' ; run ; ods _all_ close ; 3 Pros: Many options to customize the special character display using the RTF pass through capability in version 9. Cons: This functionality is limited to RTF outputs. Approach 4: Using byte function One of the most popular ways of doing this is by using the BYTE function in SAS. BYTE(n), where n specifies an integer that represents a specific ASCII or EBCDIC character. The value of n can range from 0 to 255. If the BYTE function returns a value to a variable that has not yet been assigned a length, by default the variable is assigned a length of 1. For EBCDIC collating sequences, n is between 0 and 255. For ASCII collating sequences, the characters that correspond to values between 0 and 127 represent the standard character set. Other ASCII characters that correspond to values between 128 and 255 are available on certain ASCII operating environments, but the information those characters represent varies with the operating environment. Because Windows is an ASCII system, the BYTE function returns the nth character in the ASCII collating sequence. The value of n can range from 0 to 255. In IBM mainframe operating systems and some non-IBM platforms as well, where the EBCDIC encoding system is in effect, the BYTE function return the corresponding EBCDIC character. There are two approaches to get the special character by using the BYTE function: 4a. Direct use of BYTE function. 4b. Creating a macro variable using BYTE function, and then use the macro variable. 4a) DIRECT USE OF BYTE FUNCTION: This method is useful if a character need to be used at only one place or few places. proc print data =sashelp.class( obs =3); title1 "this value is subscripted %sysfunc(byte(178))" ; title2 'this value is subscripted ^{sub 2} ' ; run ; 4b) CREATING A MACRO VARIABLE USING BYTE FUNCTION, AND THEN USE THE MACRO VARIABLE: This method is useful if the same character need to be used in many places. %let special_char= %SYSFUNC (BYTE(n)); 4 Above created macro variable special_char can be used anywhere in the SAS code. To get the complete symbols list in your environment submit the following code, the decimal value and its corresponding character will be displayed in SAS log. data _null_ ; do i= 0 to 255 ; special_char=byte(i); put i + 10 special_char; end ; run ; Partial output from SAS log: REFERENCES http://support.sas.com/documentation/ http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/win-func-byte.htm Shiqun (Stan) Li, Minimax; Creating Special Symbols in SAS® Graphs. www.lexjansen.com/pharmasug/2008/cc/cc28.pdf Dennis Gianneschi; General Methods to Use Special Characters. http://www.wuss.org/proceedings08/08WUSS%20Proceedings/papers/cod/cod07.pdf CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Kiran Karidi ([email protected], [email protected]) Mahipal Vanam ([email protected], [email protected]) Sridhar Dodlapati ([email protected], [email protected]) SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product names are trademarks of their respective companies. 5 .
Recommended publications
  • Working with Ranges and Wildcard
    Using Ranges and Wildcards in Market Insight Text variables can be identified in the System Explorer because they have an ABC icon to the left of the variable name. When searching for a business by name Ranges and Wildcards will be helpful to identify unknown characters or spaces using the wildcards of: * and ?. It is important to use both the business and the tradestyle name when searching for a business. The reason is because the name you are searching for could be in either the business name or the tradestyle. We will use Adobe in our examples and the variables of: Business Name variable ( ) and Tradestyle Name ( ). 1. The following will match business names that are *exactly the same as [each character must be the same as] the search name criteria. Our match string would look as such: =”Adobe” This example will return only businesses with names having the exact same 5 characters will match – i.e. “Adobe”, but not “Adobe Ltd” 1 * Or you can use the Exact Match option in the same drop down and it will return the same results: 2. The asterisk symbol, *, is used to stand for any number of characters [zero or one or multiple]. If we use the root word of Adobe and then an asterik this will return names that *begin with Adobe. The string would as follows: =”Adobe*” 2 This example will match “Adobe” (in this case the * is matching zero characters) and “Adobe Ltd” (in this case the * is matching 4 characters, “ Ltd”) * Or you can use the Begins With option in the same drop down and it will return the same results: 3.
    [Show full text]
  • AIX Globalization
    AIX Version 7.1 AIX globalization IBM Note Before using this information and the product it supports, read the information in “Notices” on page 233 . This edition applies to AIX Version 7.1 and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2010, 2018. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this document............................................................................................vii Highlighting.................................................................................................................................................vii Case-sensitivity in AIX................................................................................................................................vii ISO 9000.....................................................................................................................................................vii AIX globalization...................................................................................................1 What's new...................................................................................................................................................1 Separation of messages from programs..................................................................................................... 1 Conversion between code sets.............................................................................................................
    [Show full text]
  • Supplemental Punctuation Range: 2E00–2E7F
    Supplemental Punctuation Range: 2E00–2E7F This file contains an excerpt from the character code tables and list of character names for The Unicode Standard, Version 14.0 This file may be changed at any time without notice to reflect errata or other updates to the Unicode Standard. See https://www.unicode.org/errata/ for an up-to-date list of errata. See https://www.unicode.org/charts/ for access to a complete list of the latest character code charts. See https://www.unicode.org/charts/PDF/Unicode-14.0/ for charts showing only the characters added in Unicode 14.0. See https://www.unicode.org/Public/14.0.0/charts/ for a complete archived file of character code charts for Unicode 14.0. Disclaimer These charts are provided as the online reference to the character contents of the Unicode Standard, Version 14.0 but do not provide all the information needed to fully support individual scripts using the Unicode Standard. For a complete understanding of the use of the characters contained in this file, please consult the appropriate sections of The Unicode Standard, Version 14.0, online at https://www.unicode.org/versions/Unicode14.0.0/, as well as Unicode Standard Annexes #9, #11, #14, #15, #24, #29, #31, #34, #38, #41, #42, #44, #45, and #50, the other Unicode Technical Reports and Standards, and the Unicode Character Database, which are available online. See https://www.unicode.org/ucd/ and https://www.unicode.org/reports/ A thorough understanding of the information contained in these additional sources is required for a successful implementation.
    [Show full text]
  • List of Approved Special Characters
    List of Approved Special Characters The following list represents the Graduate Division's approved character list for display of dissertation titles in the Hooding Booklet. Please note these characters will not display when your dissertation is published on ProQuest's site. To insert a special character, simply hold the ALT key on your keyboard and enter in the corresponding code. This is only for entering in a special character for your title or your name. The abstract section has different requirements. See abstract for more details. Special Character Alt+ Description 0032 Space ! 0033 Exclamation mark '" 0034 Double quotes (or speech marks) # 0035 Number $ 0036 Dollar % 0037 Procenttecken & 0038 Ampersand '' 0039 Single quote ( 0040 Open parenthesis (or open bracket) ) 0041 Close parenthesis (or close bracket) * 0042 Asterisk + 0043 Plus , 0044 Comma ‐ 0045 Hyphen . 0046 Period, dot or full stop / 0047 Slash or divide 0 0048 Zero 1 0049 One 2 0050 Two 3 0051 Three 4 0052 Four 5 0053 Five 6 0054 Six 7 0055 Seven 8 0056 Eight 9 0057 Nine : 0058 Colon ; 0059 Semicolon < 0060 Less than (or open angled bracket) = 0061 Equals > 0062 Greater than (or close angled bracket) ? 0063 Question mark @ 0064 At symbol A 0065 Uppercase A B 0066 Uppercase B C 0067 Uppercase C D 0068 Uppercase D E 0069 Uppercase E List of Approved Special Characters F 0070 Uppercase F G 0071 Uppercase G H 0072 Uppercase H I 0073 Uppercase I J 0074 Uppercase J K 0075 Uppercase K L 0076 Uppercase L M 0077 Uppercase M N 0078 Uppercase N O 0079 Uppercase O P 0080 Uppercase
    [Show full text]
  • Quotation Marks Are Used to Enclose and Set Off Text That Is Directly Quoted, Titles, Technical Terms, and Words Or Phrases That Carry a Subtext
    PUNCTUATION QUOTATION MARKS ( “…” or ‘…’ ) Quotation marks are used to enclose and set off text that is directly quoted, titles, technical terms, and words or phrases that carry a subtext. USES Use quotation marks to enclose a short direct quote (a quote of no more than 40 words). a title of short works, such as titles of articles, essays, book chapters, songs, films, and poems. a word or short phrase that is meant to express irony or sarcasm. slang that is out of character with the rest of the writing or to enclose a deliberate misspelling. Do not use quotation marks to enclose a colloquial expression. a long direct quote (a quote more than 40 words). o Set apart a long quote by indenting five spaces from both margins and introducing the quote with a colon. an indirect quotation, which is usually introduced by that. e.g., The meteorologist said that it will rain tomorrow. < Correct (indirect quote) The meteorologist said that, “it will rain tomorrow.” < Incorrect (indirect quote) The meteorologist said, “It will rain tomorrow.” < Correct (direct quote) PLACEMENT OF PUNCTUATION WHEN USING QUOTATION MARKS Punctuation placed inside quotation marks Periods, commas, question marks, and exclamation marks are enclosed within quotation marks. o Exception: If the question or exclamation mark punctuates the sentence as a whole, the question mark or exclamation mark falls outside the quotation marks. e.g., Have you heard the proverb, “Do not count your chickens until they hatch”? Punctuation placed outside quotation marks Colons and semi-colons appear outside quotation marks. Parentheses with in-text citation fall outside quotation marks.
    [Show full text]
  • Examples of Sentences Using Quotation Marks
    Examples Of Sentences Using Quotation Marks Biogenous Parrnell misquotes presumingly while Sloane always overprizes his Goidelic interlaid semplice, he unhumanizes so insanely. Brilliant-cut Goose sometimes disafforest his maximum eastward and buss so strategically! Coronary Moises canvasses epigrammatically. This section for direct speech is to forget the quote remain in the proposition that the street in using quotation of examples sentences Either way, they are a very important type of punctuation! Everything else is secondary. Glad the post was helpful. This is a string in Markdown. Maybe a pirate ship. Put question marks and exclamation marks inside the quotation marks if the marks relate directly and only to the text within quotation marks. Jill told her mother. Come get a treat! Inside the US, inside the quotation marks. However, the closing quotation mark is only applied to the paragraph that contains the end of the quote. Why is it such a big deal? On the mysteries of combining quotation marks with other punctuation marks. Quotation marks used around words to give special effect or to indicate irony are usually unnecessary. DOL grammar, spelling and vocabulary lists, and assorted worksheets. The alien spaceship appeared right before my own two eyes. What time is the meeting? Perhaps the price was too high or you decided to go with another company. Nikki: The comma is perfect where it is. Punctuation marks are tools that have set functions. For those of you familiar with British English conventions, this is a change in style. Note first that what is enclosed in quotes must be the exact words of the person being quoted.
    [Show full text]
  • Spanish and UEB
    AUSTRALIAN BRAILLE AUTHORITY A subcommittee of the Round Table on Information Access for People with Print Disabilities Inc. www.brailleaustralia.org email: [email protected] Spanish and UEB Introduction This document should be read in conjunction with the Australian Braille Authority, Guidelines for Foreign Language Material, 2019 which can be found on the brailleaustralia.org website. Follow these guidelines when transcribing Spanish for educational purposes, such as Spanish language textbooks, examination papers, grammar and phrase books, bilingual dictionaries, etc. Spanish within an English context such as a novel should use the guidelines given in 1.1 of the Australian Braille Authority, Guidelines for Foreign Language Material, 2019. A more complete Spanish code may be requested for higher education or by a native reader. This is not covered in detail in this document. Relevant DBT codes are however given in the section on DBT. Kathy Riessen, Editor May 2019 Contractions Transcribe Spanish text uncontracted using the accents as listed below. Punctuation Use UEB punctuation, indicators and numeral conventions except for the exclamation and question marks. Spanish places inverted question and exclamation marks at the beginning of questions and exclamatory sentences and the standard marks at the end of the sentence. The UEB symbols for the inverted question and exclamation marks are 3 cells, so the Spanish conventions are used for these punctuation signs. 1 ABA: Spanish and UEB May 2019 Quotation signs in Spanish may sometimes be shown as the standard quotation signs as used in English and sometimes as guillemets (angled quotation signs). Generally these should be transcribed as the UEB single cell non-specific quotation signs.
    [Show full text]
  • Quoting and In-Text Citation Using MLA Guidelines
    Quoting and In-Text Citation Using MLA Guidelines This handout is designed to help you learn how to quote and cite information properly in your writing. Anytime you use information from an outside source – a book, an essay, an article, an online source, even a YouTube video – you MUST give credit to that source by documenting it in two ways: in an in-text citation and on your works cited page. Documentation styles (MLA, APA, Chicago, etc.) are systems of giving credit to sources in an organized and specifically formatted way so that a reader is able to trace your steps all the way back to the sources that you included in your paper. Documentation clearly indicates to your reader which information you borrowed from sources. Not documenting sources constitutes plagiarism (or academic dishonesty), and offence that can result in a failing grade on an assignment or in the course, or expulsion from the university. The basic rules for documenting sources are: 1. Direct quotes (exact language from a source) must be enclosed in quotation marks (“ ”) and followed by an in-text citation 2. Paraphrases must be carefully constructed and also be documented by in-text citations 3. Page or paragraph numbers (when available) should always be included in in-text citations 4. In-text citations should clearly match the works cited entries at the end of your document 5. Works cited entries should be complete and accurate Basic Rules for In-Text Citation y All in-text citations follow the same pattern: The writer says, “Outside Brown, quitters are no heroes” (Neusner 261).
    [Show full text]
  • End Punctuation
    San José State University Writing Center www.sjsu.edu/writingcenter Written by Michael Panelli End Punctuation End punctuation is the punctuation at the conclusion of a sentence. End punctuation tells the reader how to interpret each sentence. There are three types of end punctuation: periods, question marks, and exclamation points. Periods Periods end complete sentences. Complete sentences are sentences that make simple statements and include a subject and a verb. Examples: Mark bought flowers for his girlfriend. Leena rode her bicycle to school yesterday. A period can also be used to end indirect questions. Indirect questions report questions rather than ask questions. These are questions expressed as statements. Examples: Chandler asked if he could go to the bathroom. I wondered what homework I will have this weekend. Question Marks Questions marks follow a sentence that asks a direct question. These are questions that seek information. Examples: When is the next Presidential Election? Why is the sky blue? Exclamation Points An exclamation point indicates surprise or strong emotion. Exclamation points can also be used with sentences that make sharp commands. Examples: The house is huge! (The speaker in this sentence is indicating surprise or excitement.) Rachel, leave the dog alone! (The speaker in this sentence is making a sharp, direct command.) End Punctuation, Fall 2011. Rev. Summer 2014. 1 of 3 Additional Punctuation Additional punctuation within a sentence is not needed at the end of a sentence or quotation. A comma or period should not directly follow a question mark or exclamation point that ends a quotation. Exclamation points and question marks can be used to express diction.
    [Show full text]
  • Proofreading and Editing Symbols O
    Proofreading and Editing Symbols Proofreading symbols are used to identify mistakes and to state the needed correction, .-sted below are the most common proofreading symbols, along with explanation and examples of each. Explanation of the Symbol Example Begin a new paragraph ^He explained the rules of Capitalize a lowercase letter Henderson middle School Use a lowercase letter great skiing trips in the^)A/fnter Insert a missing word, letter, or My friend Joe![ln^w green car. punctuation mark A Close up space Somebody will help you soon, Delete and close up taught my sister etiq^Qette Delete a word, letter, or punctuation mark Joy gaveiw^loo many reasons. th*iv*ti4 Spell out CSP^the jJO'inches of fabric Change the order of letters or words In the([^h of leaving, he forgot Move the circled words to the place The young boysthre\A^e cows marked by the arrow (write fr in the <6yer the feric^^ome h^ margin.) O Add a period The problem was easily solved^ Add a comma WeH^ril ^e it a chance. Add a space Toni usernhe money to start Add a colon The letter read:] "Dear Mr. Yen" ;/ Add a semicolon I'll help you now^jit's not hard, Add a hyphen lives on Twent^third Street Add an apostrophe Jonathan s new computer Insert quotation marks Sally said, Good morning. The stet in the margin means "stay;" ^w)My father was Fathe^^gry at. let marked text stay as written. Place three dots under original text. Building Proofreading Skills ©1999 by Incentive Publications, Inc.
    [Show full text]
  • Adobe Framemaker 9 Character Sets
    ADOBE®® FRAMEMAKER 9 Character Sets © 2008 Adobe Systems Incorporated. All rights reserved. Adobe® FrameMaker® 9 Character Sets for Windows® If this guide is distributed with software that includes an end-user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or trans- mitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end-user license agreement. The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorpo- rated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide. Please remember that existing artwork or images that you may want to include in your project may be protected under copyright law. The unauthorized incorporation of such material into your new work could be a violation of the rights of the copyright owner. Please be sure to obtain any permission required from the copyright owner. Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization.
    [Show full text]
  • Basic Punctuation Rules
    Basic Punctuation Rules Punctuation can make an enormous difference in the meaning of whatever it is you’re writing. Consider the following classic examples of the change in meaning that punctuation can communicate: eats shoots and leaves Let’s eat, Grandma! Woman, without her man, is nothing. eats, shoots, and leaves Let’s eat Grandma! Woman! Without her, man is nothing. Let’s face it: proper punctuation can make or break the impact of an otherwise well-constructed sentence. These basic rules can strengthen your sentences with the punctuation they deserve, so that the quality of your ideas is communicated with precision and clarity. commas Commas indicate a separation of ideas or elements within the structure of a sentence. For more information on comma usage, see the Writing Center's "Commas" handout. Commas are used to separate three or more The entree includes chips, salsa, and a beverage. words, phrases, or clauses (sentence parts) in a series. Commas are used after an introductory Since we would be returning late anyway, we stayed dependent clause (a group of words before to watch the sunset. the subject of a sentence that do not form a complete sentence). Commas indicate that introductory words and In the light of day, everything looked different. phrases moved from the end of the sentence. Commas are used between independent claus- My family went to see the live taping of Ru Paul's Drag es (complete sentences) joined by a coordinat- Race, but I stayed home with the flu. ing conjunction: for, and, nor, but, or, yet, so.
    [Show full text]