In this screenshot the string cd sales is bookmarked

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: s turn on, the bookmarked selection is enclosed in square brackets, [ ]. In this screenshot, the string ‘CD Sales’ is bookmarked as ‘campaign_name’ and the table itself is bookmarked as ‘general_campaign_info’. Look closely and you can see the square bracket. In a bookmarked table, adding or deleting rows doesn’t affect the bookmark. Deleting the table entirely of course deletes the bookmark too. Display 3. Word Bookmarks in a Requirement Document 2 SAS Global Forum 2013 Foundations and Fundamentals SAS will see a bookmark like ‘Campaign_Name’ as a data set with a single character variable, but a bookmarked sentence or paragraph can be parsed into multiple variables using the SCAN or SUBSTR function. A bookmarked table is read as a tab-delimited file with one observation per row and one variable per column. In the above table, there are eight observations each with two variables. Variable names are assigned by the INPUT statement used to read the data. Here is the FILENAME statement and DATA Step to read the bookmarked table ‘General_campaign_info’. filename campInfo dde "winword|&_document!general_campaign_info"; data campInfo; informat item $35. value $100.; infile campInfo dsd dlm='09'x notab missover; input item value; %** Create macro variables we might need. ; if item='Requestor' then call symput('_projManager',trim(value)); else if item='Line of Business' then call symput('_lob',trim(value)); else if item='Aprimo ID' then call symput('_aprimoID',trim(value)); run; We will cover the FILENAME syntax in the next section. In the DATA Step, the informat statement sets the maximum length to read for the input variables. Values a cell that wrap are still read as a single string, but strings longer than the length specified are truncated. For the INFILE statement, The dsd and dlm= options to tell SAS that the source data is delimited by tabs (hex value '09'x). notab causes SAS to ignore embedded tabs and blanks within the variables, so it will read each value as a character string of words or a number. This is important. missover option prevents the INPUT stateme...
View Full Document

This test prep was uploaded on 03/30/2014 for the course CGS 1000 at Hillsborough.

Ask a homework question - tutors are online