Of all the different ways in which the SAS System allows data export into a Microsoft Excel sprea... more Of all the different ways in which the SAS System allows data export into a Microsoft Excel spreadsheet, Dynamic Data Exchange (DDE) is the only technique providing total control over the Excel output. As is often the case however, this high level of control comes at a price ... The DDE formalism can appear quite daunting at times, even downright
In SAS® Version 9.1, the hash table -the very first object introduced via the Data Step Component... more In SAS® Version 9.1, the hash table -the very first object introduced via the Data Step Component Interface in Version 9.0 -has become robust and syntactically stable. The philosophy and application style of the hash objects differs quite radically from any other structure ever used in the Data step previously. The most notable departure from the tradition is their run-time nature. The hash objects are instantiated and/or deleted and acquire memory, if necessary, at the run-time. It is intuitively clear that such traits should make for very interesting and flexible programming having not seen in the Data step code of yore.
The creation of PowerPoint slides with SAS content using DDE in a Base SAS environment has long b... more The creation of PowerPoint slides with SAS content using DDE in a Base SAS environment has long been considered impossible. Unlike MS Word and MS Excel, the PowerPoint application does not come with a scripting language like WordBasic or the Excel 4 macro language that would allow DDE to talk to it in a client/server fashion. The job can be done, though, by using DDE to Excel as an intermediate agent to pull the strings of PowerPoint. A set of easy SAS macros is introduced to perform a number of basic PowerPoint operations. As a sample application, a SAS catalog of graphs is exported to a stand-alone PowerPoint presentation. No specific technical knowledge is required from the reader, at least not beyond a basic understanding of the SAS macro language. A slight degree of familiarity with DDE to Excel concepts should prove enlightening, though.
Dynamic Data Exchange (DDE) can be used on the Windows platform to create fully customized MS Exc... more Dynamic Data Exchange (DDE) can be used on the Windows platform to create fully customized MS Excel and MS Word files, all from within a Base SAS program. But it also comes in handy for gathering useful metadata about your Excel files! When automating the reading from, or writing to an Excel workbook, life becomes a lot easier if you have access to certain facts about the workbook you're manipulating. Such as the names of the worksheets it comprises; the type of each worksheet — data, graphics, or macros; the number of rows and columns that are in use on each data-sheet; whether a given column contains numerical, character, or mixed type values; and so forth. In this tutorial we will go through the necessary DDE-movements that allow the extraction of such Excel workbook metadata. Wrapping up, a SAS macro is shown to load these metadata into a SAS data set for easy reference in the manner of a dictionary table. 0 What's Up? The dictionary tables — or rather, views — that co...
In SAS® Version 9.1, the hash table - the very first object introduced via the DATA Step Componen... more In SAS® Version 9.1, the hash table - the very first object introduced via the DATA Step Component Interface in Version 9.0 - has finally become robust and syntactically stable. The philosophy and application style of the hash objects is quite different from any other structure ever used in the DATA step before. The most notable departure from the tradition is their run-time nature. Hash objects are instantiated, deleted, allocate memory, and get updated all at the run-time. Intuitively, it is clear that such traits should make for very inventive and flexible programming unseen in the DATA step of yore. Still better, Version 9.2 has added new methods, attributes, and parameters. This paper includes both hash propaedeutics and material intended for programmers already familiar with SAS hashigana at basic to very advanced levels. A number of truly dynamic programming techniques utterly unthinkable before the advent of the canned hash objects in SAS are explored and explained using liv...
In SAS® Version 9.1, the hash table -the very first object introduced via the DATA Step Component... more In SAS® Version 9.1, the hash table -the very first object introduced via the DATA Step Component Interface in Version 9.0 -has finally become robust and syntactically stable. The philosophy and application style of the hash objects is quite different from any other structure ever used in the DATA step before. The most notable departure from the tradition is their run-time nature. Hash objects are instantiated, deleted, allocate memory, and get updated all at the run-time. Intuitively, it is clear that such traits should make for very inventive and flexible programming unseen in the DATA step of yore. Still better, Version 9.2 has added new methods, attributes, and parameters. This paper includes both hash propaedeutics and material intended for programmers already familiar with SAS hashigana at basic to very advanced levels. A number of truly dynamic programming techniques utterly unthinkable before the advent of the canned hash objects in SAS are explored and explained using live SAS code samples. Example 1: File Matching (Lookup file loaded in a loop) data match ( drop = rc ) ; length key $9 s_sat 8 ; declare AssociativeArray hh () ; rc = hh.DefineKey ( 'key' ) ; rc = hh.DefineData ( 's_sat' ) ; rc = hh.DefineDone () ; If you think it is prorsus admirabile, then the following step does the same with even less coding: Example 2: File Matching (Lookup file is loaded via the DATASET: parameter) data match ; set small point = _n_ ; * get key/data attributes for parameter type matching ; * set small (obs = 1) ; * this will work, too :-)! ; * if 0 then set small ; * and so will this :-)! ; * set small (obs = 0) ; * but for some reason, this will not :-( ; dcl hash hh (dataset: 'work.small', hashexp: 10) ; hh.DefineKey ( 'key' ) ; hh.DefineData ( 's_sat' ) ; hh.DefineDone () ; do until ( eof2 ) ; set large end = eof2 ; if hh.find () = 0 then output ; end ; stop ; run ;
Of all the different ways in which the SAS System allows data export into a Microsoft Excel sprea... more Of all the different ways in which the SAS System allows data export into a Microsoft Excel spreadsheet, Dynamic Data Exchange (DDE) is the only technique providing total control over the Excel output. As is often the case however, this high level of control comes at a price ... The DDE formalism can appear quite daunting at times, even downright
In SAS® Version 9.1, the hash table -the very first object introduced via the Data Step Component... more In SAS® Version 9.1, the hash table -the very first object introduced via the Data Step Component Interface in Version 9.0 -has become robust and syntactically stable. The philosophy and application style of the hash objects differs quite radically from any other structure ever used in the Data step previously. The most notable departure from the tradition is their run-time nature. The hash objects are instantiated and/or deleted and acquire memory, if necessary, at the run-time. It is intuitively clear that such traits should make for very interesting and flexible programming having not seen in the Data step code of yore.
The creation of PowerPoint slides with SAS content using DDE in a Base SAS environment has long b... more The creation of PowerPoint slides with SAS content using DDE in a Base SAS environment has long been considered impossible. Unlike MS Word and MS Excel, the PowerPoint application does not come with a scripting language like WordBasic or the Excel 4 macro language that would allow DDE to talk to it in a client/server fashion. The job can be done, though, by using DDE to Excel as an intermediate agent to pull the strings of PowerPoint. A set of easy SAS macros is introduced to perform a number of basic PowerPoint operations. As a sample application, a SAS catalog of graphs is exported to a stand-alone PowerPoint presentation. No specific technical knowledge is required from the reader, at least not beyond a basic understanding of the SAS macro language. A slight degree of familiarity with DDE to Excel concepts should prove enlightening, though.
Dynamic Data Exchange (DDE) can be used on the Windows platform to create fully customized MS Exc... more Dynamic Data Exchange (DDE) can be used on the Windows platform to create fully customized MS Excel and MS Word files, all from within a Base SAS program. But it also comes in handy for gathering useful metadata about your Excel files! When automating the reading from, or writing to an Excel workbook, life becomes a lot easier if you have access to certain facts about the workbook you're manipulating. Such as the names of the worksheets it comprises; the type of each worksheet — data, graphics, or macros; the number of rows and columns that are in use on each data-sheet; whether a given column contains numerical, character, or mixed type values; and so forth. In this tutorial we will go through the necessary DDE-movements that allow the extraction of such Excel workbook metadata. Wrapping up, a SAS macro is shown to load these metadata into a SAS data set for easy reference in the manner of a dictionary table. 0 What's Up? The dictionary tables — or rather, views — that co...
In SAS® Version 9.1, the hash table - the very first object introduced via the DATA Step Componen... more In SAS® Version 9.1, the hash table - the very first object introduced via the DATA Step Component Interface in Version 9.0 - has finally become robust and syntactically stable. The philosophy and application style of the hash objects is quite different from any other structure ever used in the DATA step before. The most notable departure from the tradition is their run-time nature. Hash objects are instantiated, deleted, allocate memory, and get updated all at the run-time. Intuitively, it is clear that such traits should make for very inventive and flexible programming unseen in the DATA step of yore. Still better, Version 9.2 has added new methods, attributes, and parameters. This paper includes both hash propaedeutics and material intended for programmers already familiar with SAS hashigana at basic to very advanced levels. A number of truly dynamic programming techniques utterly unthinkable before the advent of the canned hash objects in SAS are explored and explained using liv...
In SAS® Version 9.1, the hash table -the very first object introduced via the DATA Step Component... more In SAS® Version 9.1, the hash table -the very first object introduced via the DATA Step Component Interface in Version 9.0 -has finally become robust and syntactically stable. The philosophy and application style of the hash objects is quite different from any other structure ever used in the DATA step before. The most notable departure from the tradition is their run-time nature. Hash objects are instantiated, deleted, allocate memory, and get updated all at the run-time. Intuitively, it is clear that such traits should make for very inventive and flexible programming unseen in the DATA step of yore. Still better, Version 9.2 has added new methods, attributes, and parameters. This paper includes both hash propaedeutics and material intended for programmers already familiar with SAS hashigana at basic to very advanced levels. A number of truly dynamic programming techniques utterly unthinkable before the advent of the canned hash objects in SAS are explored and explained using live SAS code samples. Example 1: File Matching (Lookup file loaded in a loop) data match ( drop = rc ) ; length key $9 s_sat 8 ; declare AssociativeArray hh () ; rc = hh.DefineKey ( 'key' ) ; rc = hh.DefineData ( 's_sat' ) ; rc = hh.DefineDone () ; If you think it is prorsus admirabile, then the following step does the same with even less coding: Example 2: File Matching (Lookup file is loaded via the DATASET: parameter) data match ; set small point = _n_ ; * get key/data attributes for parameter type matching ; * set small (obs = 1) ; * this will work, too :-)! ; * if 0 then set small ; * and so will this :-)! ; * set small (obs = 0) ; * but for some reason, this will not :-( ; dcl hash hh (dataset: 'work.small', hashexp: 10) ; hh.DefineKey ( 'key' ) ; hh.DefineData ( 's_sat' ) ; hh.DefineDone () ; do until ( eof2 ) ; set large end = eof2 ; if hh.find () = 0 then output ; end ; stop ; run ;
Uploads
Papers by Koen Vyverman