The Ds2 Procedure Sas Programming Methods At Work Peter Eberhardt instant download
The Ds2 Procedure Sas Programming Methods At Work Peter Eberhardt instant download
https://ebookbell.com/product/the-ds2-procedure-sas-programming-
methods-at-work-peter-eberhardt-55280532
https://ebookbell.com/product/the-ds2-procedure-sas-programming-
methods-at-work-eberhardt-7019146
Mastering The Sas Ds2 Procedure Advanced Data Wrangling Techniques 1st
Edition Mark Jordan
https://ebookbell.com/product/mastering-the-sas-ds2-procedure-
advanced-data-wrangling-techniques-1st-edition-mark-jordan-6988092
https://ebookbell.com/product/mastering-the-sas-ds2-procedure-
advanced-datawrangling-techniques-second-edition-2ed-mark-
jordan-9955224
The Union Haggadah Home Service For The Passover Central Conference Of
American Rabbis Rabbis
https://ebookbell.com/product/the-union-haggadah-home-service-for-the-
passover-central-conference-of-american-rabbis-rabbis-33546358
The Roman Republic Of Letters Scholarship Philosophy And Politics In
The Age Of Cicero And Caesar Catherine Volk
https://ebookbell.com/product/the-roman-republic-of-letters-
scholarship-philosophy-and-politics-in-the-age-of-cicero-and-caesar-
catherine-volk-44860132
https://ebookbell.com/product/the-ninth-month-james-patterson-44862442
https://ebookbell.com/product/the-history-written-on-the-classical-
greek-body-robin-osborne-44863234
How To Tell If Your Cat Is Plotting To Kill You The Oatmeal Matthew
Inman
https://ebookbell.com/product/how-to-tell-if-your-cat-is-plotting-to-
kill-you-the-oatmeal-matthew-inman-44863758
My Dog The Paradox A Lovable Discourse About Mans Best Friend The
Oatmeal
https://ebookbell.com/product/my-dog-the-paradox-a-lovable-discourse-
about-mans-best-friend-the-oatmeal-44863950
The DS2 Procedure
SAS® Programming Methods at Work
Peter Eberhardt
support.sas.com/bookstore
The correct bibliographic citation for this manual is as follows: Eberhardt, Peter. 2016. The DS2 Procedure:
SAS® Programming Methods at Work. Cary, NC: SAS Institute Inc.
The DS2 Procedure: SAS® Programming Methods at Work
Copyright © 2016, SAS Institute Inc., Cary, NC, USA
ISBN 978-1-62960-170-0 (Hard copy)
ISBN 978-1-62960-222-6 (EPUB)
ISBN 978-1-62960-223-3 (MOBI)
ISBN 978-1-62960-224-0 (PDF)
All Rights Reserved. Produced in the United States of America.
For a hard copy book: No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without the
prior written permission of the publisher, SAS Institute Inc.
For a web download or e-book: Your use of this publication shall be governed by the terms established by
the vendor at the time you acquire this publication.
The scanning, uploading, and distribution of this book via the Internet or any other means without the
permission of the publisher is illegal and punishable by law. Please purchase only authorized electronic
editions and do not participate in or encourage electronic piracy of copyrighted materials. Your support of
others’ rights is appreciated.
U.S. Government License Rights; Restricted Rights: The Software and its documentation is commercial
computer software developed at private expense and is provided with RESTRICTED RIGHTS to the United
States Government. Use, duplication, or disclosure of the Software by the United States Government is
subject to the license terms of this Agreement pursuant to, as applicable, FAR 12.212, DFAR 227.7202-1(a),
DFAR 227.7202-3(a), and DFAR 227.7202-4, and, to the extent required under U.S. federal law, the
minimum restricted rights as set out in FAR 52.227-19 (DEC 2007). If FAR 52.227-19 is applicable, this
provision serves as notice under clause (c) thereof and no other notice is required to be affixed to the
Software or documentation. The Government’s rights in Software and documentation shall be only those set
forth in this Agreement.
SAS Institute Inc., SAS Campus Drive, Cary, NC 27513-2414
March 2016
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.
SAS software may be provided with certain third-party software, including but not limited to open-source
software, which is licensed under its applicable third-party software license agreement. For license
information about third-party software distributed with SAS software, refer to
http://support.sas.com/thirdpartylicenses.
Contents
Preface
About This Book
About The Author
Chapter 1: Solving Bigger Problems
big data. Big data. BIG DATA
PROC DS2
Problem Space
Clarity
Scope
Modularity and Encapsulation
Data Types
Data Space
Embedded SQL
Threaded Data Access
In-Database Processing
Our First DS2 Programs
PROC DS2 as a DATA Step Equivalent
Chapter 2: Object-Oriented Programming for SAS Programmers
Background and Definition
Dog Class
An Example of OOP
Moving Forward
Chapter 3: Variables and Data Types
Variable Names
DECLARE Statement
DATA Step Conversion—Numerics
DATA Step Conversion—Characters
DATA Step Conversion—Date Types
DATA Step Conversion—Binary Types
DATA Step Conversion—Saving Your Table
More about Dates
Operations and Assignments
IF Operator
SELECT Operator
Arrays
Temporary Arrays
Variable Arrays
Deferred Dimensioning
Array Dimensions
Array Assignment
Missing Values and NULL Values
ANSI Mode and SAS Mode
Testing for Missing or NULL Values
Chapter 4: Scope
Scope
The Program Data Vector (PDV)
KEEP and DROP
Scope in Other Programming Blocks
Chapter 5: Methods
Defining Methods
System-Defined Methods
User-Defined Methods
Recursion
Chapter 6: Packages
User-Defined Packages
Instantiation
Using a Package Variable
Package as Object
Packages and Scope
Package as Method Parameter and Method Return Variable
System-Defined Packages
FCMP Package
TZ Package
Chapter 7: An Example
Problem
The Hash Package
Four Steps to Creation
Lookup and Retrieval
Problem Revisited
Threaded Read
Parameterized Threaded Read
Chapter 8: Data Sources
Overview
Sample Tables
SET
SET Data Set Options
SET with No BY Statement
SET with BY Statement
SET with FedSQL as a Data Source
Merge
Merge with FedSQL as a Data Source
Threads
Thread Methods
Thread Parameters
SQLSTMT Package
SQLSTMT Binding
SQLSTMT – Returning the Rows
References
Index
Preface
Lao Tzu said, “The journey of a thousand miles begins with one step.”
I do not know where the journey that led me to write this book will lead me
from here, but I can identify some of the main signposts that helped guide me
to this point.
The journey started at SAS User’s Group International 23 in Nashville. This
was my first SUGI–I went there thinking I knew a lot about SAS, and came
away realizing how little I really knew! I met Rob and Marje Fecht, who
encouraged me to become more involved in the SAS user community. Over
the years, I became more and more involved, first as a presenter, later as a
section chair, and then as a Content Advisory Team member for SAS Global
Forum. I had the opportunity to be the Academic Chair for SESUG 2008,
SESUG 2012, and PharmaSUG China 2015.
SAS Global Forum 2013 was another turn in the journey, specifically when
the Junior Professional Program was introduced. Through this program, I
have met several bright young SAS programmers who have been not only an
inspiration, but also paper collaborators–Xiao Jin Qin, Lucheng Shao, and
Jing Chen. In 2013, at the Junior Professional Program reception, I met Xue
Yao, who talked about a pre-conference workshop she attended that featured
DS2; she was keen to learn more. It turned out we were doing similar work,
health-care related, and we both had an interest in learning more about DS2.
This chance meeting led to our collaborating on SAS Global Forum papers,
and ultimately to this book.
I hope this book helps some of you on your journey with SAS. In particular,
for those of you who read this and say, “I can do a better job,” do not just say
it, do it. We all grow when we share our knowledge and experience.
About This Book
Purpose
PROC DS2: SAS® Programming Methods at Work introduces a new SAS
procedure. New in SAS 9.4, PROC DS2 provides programming concepts that
can be used for the first time by many SAS programmers. Through examples,
the book helps SAS DATA step programmers learn about PROC DS2 features
such as data types, methods, packages, and threads.
Prerequisites
PROC DS2: SAS® Programming Methods at Work assumes that the reader has at
least a basic understanding of SAS DATA step programming.
Additional Help
Although this book illustrates many analyses that are regularly performed in
businesses across industries, you might have specific questions. To fully
support you, SAS and SAS Press offer you the following resources:
• For questions about topics covered in this book, contact the author
through SAS Press.
◦ Send questions by email to [email protected]. Include the book title
in your correspondence.
◦ Submit feedback on the author’s page at
http://support.sas.com/author_feedback.
• For questions about topics beyond the scope of this book, post
questions to the relevant SAS Support Communities at
https://communities.sas.com/welcome.
• SAS maintains a comprehensive website with up-to-date information.
One page that is particularly useful to both the novice and the
seasoned SAS user is the Knowledge Base. Search for relevant notes in
the “Samples & SAS Notes” section of the Knowledge Base at
http://support.sas.com/resources.
• Registered SAS users or their organizations can access SAS Customer
Support at http://support.sas.com. Here, you can pose specific
questions to SAS Customer Support; under SUPPORT, click Submit a
Problem. Provide an email address to which replies can be sent,
identify your organization, and provide a customer site number or
license information. This information can be found in your SAS logs.
Keep in Touch
We look forward to hearing from you. We invite questions, comments, and
concerns. If you want to contact us about a specific book, include the book
title in your correspondence.
Peter Eberhardt has been a SAS consultant since 1982; his company,
Fernwood Consulting Group, Inc., is a SAS Alliance Partner. In addition to
providing consulting services to the Financial and Health Care sectors, Peter
has been an active contributor to the SAS user community as a speaker at user
groups across Canada, the United States, the Caribbean, and China. He has
also served on the Content Advisory Team for SAS Global Forum and as the
Academic Chair for SESUG (2008, 2012) and PharmaSUG China (2015).
Learn more about this author by visiting his author page at
http://support.sas.com/eberhardt. There you can download free book
excerpts, access example code and data, read the latest reviews, get updates,
and more.
Chapter 1: Solving Bigger Problems
big data. Big data. BIG DATA
PROC DS2
Problem Space
Clarity
Scope
Modularity and Encapsulation
Data Types
Data Space
Embedded SQL
Threaded Data Access
In-Database Processing
Our First DS2 Programs
PROC DS2 as a DATA Step Equivalent
PROC DS2
The DATA step has served SAS programmers well over the years. Although it
is powerful, it has not fundamentally changed since its inception. SAS has
introduced a significant programming alternative to the DATA step—PROC
DS2—a new procedure for your object-oriented programming environment.
PROC DS2 is basically a new programming language based on the DATA step
language. It is a powerful tool for advanced problem solving and advanced
data manipulation. PROC DS2 makes it easier to develop complex and flexible
programs for complex and flexible solutions. These programs are robust and
easier to understand, which eases maintenance down the road.
Starting with SAS 9.4, PROC DS2 is part of the Base SAS package. For users in
a high-performance analytics environment, there is PROC HPDS2. However,
in this book, only PROC DS2 is discussed.
Problem Space
PROC DS2 deals with this more complex problem space by using many object-
oriented programming (OOP) constructs. With OOP constructs, SAS
programmers can develop more robust and flexible programs using the
following:
• clarity
• scope
• modularity and encapsulation
• data types
Clarity
In DS2, you must be clear with each identifier that you are using. An
identifier is one or more tokens or symbols that name programming language
entities such as variables, labels, method names, package names, and arrays,
as well as data source objects such as table names and column names. To
ensure clarity, in DS2, identifiers are declared using a DECLARE statement.
The DECLARE statement clearly states both the name and data type of the
identifier. Before you can use an element in a DS2 program, you must tell DS2
the name and data type of the element. The benefit (besides making the
programmer think more clearly about the nature of the program!) is that
because the program does not compile if an invalid identifier is used,
misspellings and other hard-to-detect errors can be addressed and corrected at
the beginning.
Scope
In programming, scope is the area in which a variable is visible. In other
words, scope lets you know where a variable can be accessed. In DS2, there
are two levels of scope:
• global
• local
Global variables have global scope. That is, they are accessible from anywhere
in the program. Local variables have local scope. That is, they are accessible
only from within the block in which the variable was declared and only while
that block is executing. Each variable in any scope must have a unique name,
but variables in different scopes can have the same name. This enables you to
use consistent and meaningful variable names in different parts (or methods)
of your program without overwriting values. The benefit is that you can more
easily isolate worker variables (e.g., a DO loop variable, an intermediate
calculation, etc.) from variables that will ultimately be written out to result
sets.
ProcedurePROC DS2…QUIT
1680.
New Shoreham, and Charles set out in haste for Brighton. While he was
at supper there, with his attendants and with Tattershall, the owner of the
boat, the latter fixed his eyes, upon the King, and took occasion after the
meal to draw one of the royal attendants aside, and complain of his having
been deceived. “The gentleman in the grey dress was the King; he knew
him well, having been with him in 1648, when he was Prince of Wales, and
commanded the royal fleet.” This information was promptly conveyed to
Charles, who thought it the more prudent course to keep his companions
drinking with him all night, in order to make sure of their holding no
conversation that he did not overhear.
Just before their departure, and while he was alone in his room,
Tattershall came in, and kissing his hand, which was resting on the back of
a chair, said, “I suppose, if I live I shall be a lord, and my wife will be a
lady.” Charles laughed, to show that he understood him, and joined the
company in the other room. At four in the morning of the 16th of October
they set out for Shoreham. When Charles and Wilmot, his sole companion,
had entered the vessel, Tattershall fell upon his knees and swore to the King
that whatever might be the consequence he would land him safe and sound
on the coast of France.
The boat made for the Isle of Wight, that being its ordinary course; but
towards six o’clock in the evening, Charles, having previously arranged the
matter with Tattershall, addressed the crew. He told them that his
companion and himself were merchants, who were running away from their
creditors, and asked them to join him in begging the captain to take them to
France, backing his entreaties, at the same time, with a present of twenty
shillings for drink. Tattershall raised a great many objections; but at last,
with apparent repugnance, he turned the vessel’s head towards France. At
daybreak they sighted the city of Fécamp. At the same time they discovered
a suspicious-looking sail which they took for an Ostend pirate. Without
waiting to test the truth of their suspicions, the two fugitives took to the
ship’s boat and arrived safely in port. (Guizot: Memoirs of Charles the
Second; Lingard: History of England.)
BLANCHE GAMOND.
1687.
“The dear sisters who were waiting for me ran up to me and asked me
where I was hurt.
“ ‘Everywhere,’ I replied; ‘I am sure that I have broken my thigh,’ and I
begged of them to tie it up for me with my apron. I then limped away, my
two sisters supporting me on either side. I made sixty or seventy steps in
great pain, and reached the gate of the Faubourg de Valence: but it was
closed. They helped me to get upon the wall, but when I stood upon the top
of it, and saw how high it was, I said to my three dear sisters, ‘This is a
second precipice, and I am not brave enough to attempt to descend. Leave
me and go alone.’
“They let me down from the wall and left me there, and then they tried
to get down themselves, and succeeded after great trouble. When they had
reached the other side, Mademoiselle Dumas cried out to me, ‘We are
going. We are very sorry to leave you behind. God preserve you from our
enemies. I wish you prosperity, and give you my blessing, and I beg of you
to give me yours in return.’
“ ‘Who am I,’ I replied, ‘to give you my blessing? but I pray that God
will give you his. I pray fervently that he will lead you in all his ways; and I
conjure you to leave this place as quickly as you can, or all of us may be
recaptured.’
“I was thus left quite alone, still suffering the cruel and violent pains
which had never left me from the moment of my fall. It was not yet
daybreak, and I lifted up my heart to God. But I fainted in the midst of my
prayer, and did not come to myself for, at least, a quarter of an hour. I had
no one to console me, or even to offer me a single drop of water; but as
soon as I came to myself I cried out, ‘Lord, do not abandon me.’ I lay for a
time without being able to make any movement, and then I thought that at
daybreak they would be sure to find me, and then I should be recaptured
and taken to the hospice. ‘O God,’ I prayed, ‘grant me this mercy that this
day may see the last of my troubles, for death is better than life. I have lived
enough. Take my soul to thee, O God. Oh grant, if it please thee, that I may
be taken to the tomb, and not to the hospice this day.’
“Day then began to break. I had not enough strength to raise myself, so
that those who passed by did not know that I was lamed. I was only just
able to hide my face from them by covering it with my tappeta. I was
interrupted during my prayers by the agony which I suffered from my
broken thigh and dislocated ankle. After a time a gentleman came by, and
said, ‘It would be better, mademoiselle, for you to be at your own house
than to remain here, and it would certainly be more becoming.’
“ ‘If you knew who I was, sir,’ I replied, ‘you would not address me in
such language.’
“In another moment they opened the gate of the Faubourg and the
passers-by said very hard and cruel things about me, seeing me lying at full
length in the road so early in the morning.”
She begged one of them to fetch Mademoiselle Marsilière, a Protestant
converted to Catholicism, whom she knew, and she prayed God that this
early friend might turn out a good Samaritan, but this prayer was not heard.
“Are you asking for me?” said Mademoiselle Marsilière, when she
approached the poor wounded creature. “Yes, mademoiselle; save me—for
mercy’s sake help me. Take me to some place where I may die, so that no
one may witness my sufferings.”
“But Mademoiselle Marsilière replied that I should endanger her safety
as well as my own. ‘I must go,’ she said, ‘before any one sees me, or I shall
be put in prison myself.’
“I was wounded to the heart at this treatment from a co-religionist, and I
asked her if she had the courage to leave me in this condition. ‘Help me, at
least,’ I said, ‘to crawl behind this wall, so that I may not be seen by the
passers-by.’ ”
But neither the prayers nor the sufferings of the unfortunate Blanche had
the least effect on the prudent and charitable person whom she had called to
her aid. Mademoiselle Marsilière went away, but returned shortly
afterwards with the almoner of the religious house of which she was a
member, who, without paying the least regard to the distressed condition of
the wounded girl, began to address to her a series of questions about her
escape and her accomplices. At length two men, seizing her by the
shoulders and the feet, carried her to the hospice and laid her down upon the
stones in the courtyard.
It is impossible to enter fully here into all the details of the rigorous
punishment endured by the poor girl for some months after this. She bore
all with her ordinary courage and patience, but the mere recital of such
atrocities would give too much pain to the most unfeeling heart.
She was at last allowed to return to her parents, and she recovered her
health after her long sufferings, and retired to Switzerland with her family.
JEAN BART AND THE CHEVALIER DE FORBIN.
1689.
Jean Bart escorting a fleet of twenty merchantmen, had hoisted his flag on
board the frigate La Raileuse, of twenty-eight guns, having for second in
command under him the Chevalier de Forbin, captain of Les Jeux, a frigate
of twenty-four. They were attacked by two English ships, one of forty-eight,
and the other of forty-two guns, and they nobly sacrificed themselves to
save the merchant fleet. Jean Bart lost nearly all his men and was slightly
wounded in the head, but Forbin was still more unfortunate, for he received
six wounds, and nearly all of his crew perished. They were compelled to
surrender, but the fleet of merchantmen was saved, while all the English
officers and a great number of the common seamen were killed.
They were taken to Portsmouth, where they of course expected to be
treated as prisoners of war on parole, but the governor of the fortress would
not even grant them this scanty honour. They were shut up in a sort of inn
with barred windows, and sentinels were placed before their door. This
wretched treatment naturally made them anxious to escape, and they did not
even wait until their wounds were cured before they began to form their
plans. An Ostend fisherman, a relation of Jean Bart—as some say, Gaspar
Bart, his brother—having put in to Portsmouth, found means to gain
admission to the prison, and to confer with his two friends on the project
which occupied all their thoughts. On one of his visits he left a file behind
him, with which they cut the bars before their windows, hiding the marks
by covering them with pieces of moistened bread and soot.
It happened fortunately that the surgeon sent to attend them was a
Fleming, himself a prisoner, and equally desirous with his two patients of
recovering his liberty. In due time too, the men who had been appointed to
wait on them were gained over by a liberal present, and by still more liberal
promises. The great difficulty was to find means of putting to sea; but the
attendants who alone had power to leave the prison undertook to make the
necessary arrangements for the embarkation. They accordingly hailed one
day a Norwegian shallop, the master of which was at the time lying in a
drunken sleep in his cabin. He was quietly transferred from his own vessel
to another; and this was no sooner done than the two attendants ran to tell
the prisoners to prepare for instant flight.
As soon as the surgeon came to pay his accustomed visit, he was told to
give the Ostend fishermen notice to take everything necessary for a voyage
of some days on board the Norwegian vessel. He lost no time in executing
his commission, and the sloop was soon amply supplied with bread, cheese,
beer, and other necessaries. It was then arranged that the surgeon should
return at midnight with the fisherman and the two attendants, and as soon as
he arrived beneath the prison window should signal his presence by
throwing a small stone against the panes.
The signal was heard at the appointed hour. Jean Bart removed the bars
in front of his window, fastened his bedclothes end to end, and sliding down
the band, reached the ground in safety. The surgeon, the fisherman, and the
two attendants led them at once to a little creek in which the vessel was
moored, and they all embarked with the exception of the fisherman, who
went quietly back to his own ship. In leaving Plymouth the fugitives had a
narrow escape. They were seen by the look-out on the guard ship, and
hailed with the customary “Who goes there?” By great good fortune Jean
Bart knew a little English, and he replied, “Fishermen.” They were then
suffered to pass.
The poor lieutenant had not been able to follow his captain. He had lost
an arm; he was very corpulent; and as he could not have rendered the least
assistance during the voyage, his presence would only have tended to
compromise the safety of his friends. He took, therefore, the heroic
resolution of remaining in prison, and of assisting the fugitives by keeping
the guard amused while they were running away. He continued this
subterfuge after Jean Bart had left the house, and pretended to be
conversing with him in his room, until long after he had had time to effect
his embarkation in safety. He then drew in the sheets which had served his
commander as a rope, and quietly went to bed. He affected great surprise
next day when he was informed of the escape of his fellow-prisoners,
pretending to believe they had basely abandoned him, and cursing them
very heartily in both English and French.
His gaolers were deceived by this ruse, and put several questions to him
as to the conversations with his commander, in the hope of ascertaining the
direction the fugitives had taken. “These traitors,” he replied, “have told me
nothing; all that I know is that Bart lately had a pair of shoes made, and that
he remarked when he tried them on, how useful they would be to any one
who had to take a long walk.” This completely deceived them, and they sent
horse soldiers out in all directions in the hope of recapturing the fugitives,
who were then in the middle of the Channel.
Jean Bart at length sighted the coast of Brittany, and disembarked at a
small village a few leagues from St. Malo. The journey from Plymouth had
occupied forty-eight hours, and, this time included, he had not been in
captivity more than eleven days. The party were received with transports of
joy, for the merchantmen whom they had saved had spoken in the highest
terms of their courage, but it was thought their patriotic devotion had cost
them their lives. Jean Bart’s first care was to indemnify the Ostend
fisherman whom the English had made responsible for his flight, and his
next to purchase the liberty of his brave lieutenant, who was released a
month after the escape of his commander.
DUGUAY-TROUIN.
1694.
1700-1702.
The Count de Bucquoy, who was originally an officer in the army, had
become, under the combined influence of the Jesuits and the monks of La
Trappe, a religious enthusiast, but had afterwards quarrelled with his
priestly friends. He was of an active mind, and, if we may believe his own
account of himself, he was too much addicted to the advocacy of advanced
ideas. This, and his hostility to Louis XIV., caused him to be arrested at
Sens, on a charge of having been heard to mutter disaffection at an inn.
While he was being taken to Paris he tried to escape, but without success;
and his account of the attempt shows that he did not then possess the skill in
conducting that class of enterprises which he afterwards acquired.
He was sent to For-l’Évêque; and from the very first day of his
imprisonment he began to consider how he could recover his liberty. He
remembered that one of the body-guard, who had been imprisoned in the
same place, had nearly made his escape through a window of a loft, which
looked out upon one of the quays, then called the Valley of Misery, and that
he had failed, owing solely to his terror at the sight of the precipice on
which his prison was built.
Bucquoy, however, made up his mind to repeat this attempt. He tried at
first to form a clear idea of the plan of this terrible place. He discovered that
the loft in question served as a kind of antechamber to his small cell, and
that it was, at the same time, the lumber-room of the prison. Wishing to
make sure of everything before risking his life, he one day pretended to be
ill, and asked to be led upstairs to breathe the air at a small window which
over-looked that part of the building. The height from the quay was
appalling; and, in addition to that, every one of the numerous window-
gratings to which he would have to cling in making his descent was covered
with short, sharp spikes. The sight was enough to strike terror into the
stoutest heart.
When he had once more been locked up in his cell, he, however,
confirmed himself in his resolution to escape through the loft. All that was
necessary was to find means to leave the cell unobserved, and to reach a
certain part of the antechamber.
To get out without the consent of the gaoler, he would have had to break
the door down; but he soon saw that it would be impossible to do this, as he
was wholly unprepared with tools, and as the noise of his operations would
be certain to alarm his guards. It occurred to him, however, that he might
burn away the door; and with this view he obtained permission to cook for
himself in his own cell. He asked for a few eggs and some charcoal, and
paid liberally for both, in order the more readily to induce the gaoler to
supply them. All being ready, and the whole household asleep, he placed the
brasier close to the door and fanned the flame until it ignited the ponderous
timbers. When he had by this means burnt a hole large enough to admit his
body, he passed through, first taking care to extinguish the flames, as it was
not his wish to destroy the building. In this operation he was nearly
suffocated by the smoke from the smouldering beams. He was without a
rope to tie to the window of the loft, but he made a substitute for it by
binding together a number of strips of webbing cut from a mattrass which
he found among the furniture. He then fastened this band to a bedstead,
which he dragged to the window, and, gliding gently down, was fortunate
enough to pass the windows without receiving any fatal injury from the
spikes, and to reach the quay. It was daybreak, and the market people
opening their shops did not fail to observe him, all torn and bloody as he
was, for many of the spikes had entered his flesh. But a greater danger
threatened him, in the unwelcome attentions of a number of young men,
who had only just risen from supper, and who chased him through the
streets with drunken cries. A timely shower of rain, however, dispersed
them, and he was saved.
In trying to avoid them he made many turns and doubles, and at last
found himself at the door of a café, near the Temple, which he entered for
the purpose of making some slight changes in his appearance, in case he
should meet his tormentors again. His dress, however, began to excite
remark among the customers, and fearing he was already known, he hastily
paid his reckoning, and went out without knowing what direction to take.
He at last took refuge at the house of a relation of one of his servants, to
whom he told a plausible story to excuse the negligence of his attire. The
woman fetched him some food at his request, but feeling he could not
confide in her discretion, he soon left the house to seek a more secure
asylum.
After spending some nine months in sending petition after petition from
his various hiding-places, he tried to leave the kingdom, but choosing his
time badly, was arrested at La Fère and sent to prison. He made two
attempts to escape, and failed only by a hair’s breadth in the second, having
scaled a wall and swum across a ditch before he was discovered. He was at
length taken back to Paris, and imprisoned in the Bastille.
To enter the Bastille was almost to abandon hope, for escape seemed
impossible. But even while he was passing the gates of the prison, Bucquoy
was reconnoitering it to find means to effect his escape. He took particular
notice of the drawbridge and the counterscarp, but he was not allowed much
time for his observations; for he was at once hurried away to the Bretignière
tower.
After passing a few days in one of the lowest dungeons of this tower, he
was placed in a cell, shared by a number of prisoners in common. He
proposed that they should make a joint effort to recover their liberty, but he
was denounced by one of their number, an abbé. He was then once more
shut up in his dungeon. He was suffered to leave it, however, on feigning to
be ill and at the point of death. He was believed to be paralytic, and as it
was thought there was no further danger of his attempting to carry out his
plans, he was once more sent to the common room. In course of time he had
made the circuit of nearly all the towers of the building, never failing to
study the plan of each of them attentively; and he was at length sent to the
Bertaudière, where he had for companion a German baron, whom he
undertook to convert from the Lutheran faith, and whom he persuaded to
aid him in his attempt to escape. They had already commenced operations
on an old window which had long been closed up, when they were betrayed
by another prisoner. Bucquoy was adroit enough to exculpate himself, and
to throw the blame upon his betrayer, but he was removed to a cell in the
tower, La Liberté, together with the baron, whose conversion he represented
was not quite complete.
They then began to renew their preparations, this time with the view of
reaching the ditch of the Porte Saint Antoine. They made a hole in the wall
by means of certain jagged pieces of iron and brass, old nails and knife-
blades, which the abbé had carefully collected in the course of his long
sojourn in the prison; and which, by the aid of the fire in the room, they
fashioned into tools. At the same time they began to make a ladder, using
for this purpose the strips of osier in which their wine bottles were
enveloped, and telling the gaoler they were collecting them to serve as fuel.
A hole which they had scooped out under the flooring of their cell served to
conceal all these things.
Working steadily every day, and never losing sight of their design, they
contrived in a short time to make a tolerable ladder. All was now nearly
ready, and they were on the very point of making their attempt, when on
visiting their subterranean cupboard one day, it gave way beneath them, and
precipitated them into a room on the floor below occupied by a jesuit. The
poor man’s mind was ill at ease, and this terrible accident made him quite
mad. The abbé was taken back to his cell by a gaoler, but he was not
allowed to remain there long, and he was thus doomed to lose almost in a
moment the fruits of long months of most trying exertion. He found means,
however, to get rid of his German baron, who was no further use to him, as
he could not be persuaded to embark in another attempt. But the baron had
abjured his religion, and this gained the abbé such a reputation as a
converter of heretics, that he was sent to attempt the reformation of a
certain Protestant, named Grandville, who was considered a very excellent
boon companion by his fellow prisoners, and who was known to be most
anxious to make his escape.
Two other prisoners were placed in the same cell with them, and the
abbé soon found means to come to an understanding with all his
companions in misfortune. After he had bound them to him by the most
solemn oaths, he informed them that he had a small file concealed in his
clothes, which had hitherto escaped the closest search, and he proposed that
they should cut through the bars of their windows with it, and make their
way into the courtyard. He had managed to keep some pieces of osier that
he and the German had plaited, and by the aid of his new confederates, he
soon added largely to his store. They laboured together like the workmen of
the tower of Babel, for they were almost as much hindered by differences of
opinion, as the others were by differences of speech. At last they made up
their minds to take the only course possible to them: viz. to descend by the
ladder into the ditch. Once there, it was agreed that each should look after
himself.
On the appointed day—or, rather, night—they removed the bars as soon
as they found all was silent in the fortress. Fearing that their suspended
bodies might be seen from the other cells, they first let down a long white
sheet, which covered all the windows between their cell and the ground. As
it was necessary to prevent the ladder from falling close to the wall, the
abbé had some days previously erected a kind of sundial at the end of a long
pole, and the sentinels had already learned to regard it without suspicion.
After they had taken all these precautions, and had smeared the white ropes
of their ladder with soot, the abbé asked to be allowed to be first to make
the descent, promising to await his companions in the ditch. He was, at the
same time, to warn them of the approach of the sentinels by pulling a
smaller rope, falling from the window to the ground. When all had been
thus arranged he got out of the window, and reached the ditch in safety; but
he remained there two hours without receiving a sign from his companions.
He pulled the rope repeatedly, to no purpose, and he began to fear they were
engaged in some new dispute, when he saw them lowering some cumbrous
machine they had constructed to aid them in their flight. Two of them came
down, but the rest had not at first been able to pass through the window, and
this had been the cause of the delay. When they found, at length, they could
force themselves through, they were still willing to stay with the
unfortunate Grandville, whose obesity compelled him to remain behind, but
he generously refused to allow them to make this useless sacrifice on his
behalf.
Their sad story ended, the abbé urged them, with all the eloquence of
which he was master, to follow his plan of escape; but not being able to
persuade them he began to look to his own safety. He had only a small osier
ladder; with this he contrived to gain the top of the ditch as soon as the
sentinel’s back was turned; he then climbed the counterscarp and reached a
deep gutter, and passing over another wall and ditch, finally dropped into
the Rue St. Antoine, nearly lacerating his arm on a hook outside a butcher’s
shop in his fall. Before leaving the wall he looked round for his comrades,
and hearing the cry of a half-strangled person, followed rapidly by a
musket-shot, he concluded that they had tried to carry out their intention of
seizing the guard but had been overpowered; and as he never heard of the
unfortunate creatures again he remained all his life confirmed in this
impression. Not caring to await a similar fate, he ran rapidly from the Rue
St. Antoine to the Rue des Journelles; and after making half the circuit of
Paris he arrived at the house of some friends, who furnished him with the
means of leaving the country.
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
ebookbell.com