100% found this document useful (7 votes)
210 views

[FREE PDF sample] Developing Mainframe Java Applications 1st Edition Lou Marco ebooks

Lou

Uploaded by

himansakyea
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (7 votes)
210 views

[FREE PDF sample] Developing Mainframe Java Applications 1st Edition Lou Marco ebooks

Lou

Uploaded by

himansakyea
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 81

Download the full version of the ebook at

https://ebookultra.com

Developing Mainframe Java Applications 1st


Edition Lou Marco

https://ebookultra.com/download/developing-
mainframe-java-applications-1st-edition-lou-marco/

Explore and download more ebook at https://ebookultra.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

EJB JSP Java on the edge Lou Marco

https://ebookultra.com/download/ejb-jsp-java-on-the-edge-lou-marco/

ebookultra.com

Enterprise J2ME developing mobile Java applications 8th


print Edition Yuan

https://ebookultra.com/download/enterprise-j2me-developing-mobile-
java-applications-8th-print-edition-yuan/

ebookultra.com

Java Internationalization Creating International


Applications Java Series First Edition David Czarnecki

https://ebookultra.com/download/java-internationalization-creating-
international-applications-java-series-first-edition-david-czarnecki/

ebookultra.com

Developing Backbone js Applications Addy Osmani

https://ebookultra.com/download/developing-backbone-js-applications-
addy-osmani/

ebookultra.com
Developing applications with enterprise SOA 1st Edition
Martin Huvar

https://ebookultra.com/download/developing-applications-with-
enterprise-soa-1st-edition-martin-huvar/

ebookultra.com

Expert Oracle and Java Security Programming Secure Oracle


Database Applications with Java 1st Edition David Coffin

https://ebookultra.com/download/expert-oracle-and-java-security-
programming-secure-oracle-database-applications-with-java-1st-edition-
david-coffin/
ebookultra.com

Running Mainframe z on Distributed Platforms 1st Edition


Kenneth Barrett

https://ebookultra.com/download/running-mainframe-z-on-distributed-
platforms-1st-edition-kenneth-barrett/

ebookultra.com

Metagenomics of the Microbial Nitrogen Cycle Theory


Methods and Applications 1st Edition Diana Marco

https://ebookultra.com/download/metagenomics-of-the-microbial-
nitrogen-cycle-theory-methods-and-applications-1st-edition-diana-
marco/
ebookultra.com

Digital Food Photography 1st Edition Lou Manna

https://ebookultra.com/download/digital-food-photography-1st-edition-
lou-manna/

ebookultra.com
Developing Mainframe Java Applications 1st Edition Lou
Marco Digital Instant Download
Author(s): Lou Marco
ISBN(s): 9780471415282, 0471415286
Edition: 1
File Details: PDF, 2.74 MB
Year: 2001
Language: english
Cover

Y
FL
AM
TE

Team-Fly®
Page i

Developing Mainframe Java™ Applications


Page ii

This page intentionally left blank.


Page iii

Developing Mainframe Java™ Applications

Lou Marco
Page iv

Publisher: Robert Ipsen


Editor: Margaret Eldridge
Assistant Editor: Adaobi Obi
Managing Editor: John Atkins
Text Design & Composition: MacAllister Publishing Services, LLC

Designations used by companies to distinguish their products are often claimed as trademarks. In all
instances where John Wiley & Sons, Inc., is aware of a claim, the product names appear in initial
capital or ALL CAPITAL LETTERS. Readers, however, should contact the appropriate companies
for more complete information regarding trademarks and registration.

Copyright © 2001 by Lou Marco. All rights reserved.

Published by John Wiley & Sons, Inc.

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, recording, scanning or otherwise, except as
permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the
prior written permission of the Publisher, or authorization through payment of the appropriate per-
copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-
8400, fax (978) 750-4744. Requests to the Publisher for permission should be addressed to the
Permissions Department, John Wiley & Sons, Inc., 605 Third Avenue, New York, NY 10158-0012,
(212) 850-6011, fax (212) 850-6008, E-Mail: [email protected].

This publication is designed to provide accurate and authoritative information in regard to the subject
matter covered. It is sold with the understanding that the publisher is not engaged in professional
services. If professional advice or other expert assistance is required, the services of a competent
professional person should be sought.

This title is also available in print as ISBN 0-471-41528-6

For more information about Wiley products, visit our web site at www.Wiley.com
Page v

Contents

Preface xiii
Acknowledgments xvii
Part 1 Java Fundamentals 1
Chapter 1 Introduction 3
Java Trek 3
A New World of Objects 3
Reusability 4
Inheritance 4
Encapsulation 4
Stack Class 5
Polymorphism 6
Java and C++ 6
C++ 7
Java 8
A PL/I Version of the Bubble Sort 17
In Summary 20
Chapter 2 What Is Java? 23
A Brief History of Java 23
The World of Java Today 25
Java: The Programming Language 25
Java: The Object-Oriented Programming Language 25
Java: The Portable Programming Language 26
Page vi

Java: The "Pointer-Less" Programming Language 27


Java: The MultiThreaded Language 28
IBM's Java Efforts 29
Java versus COBOL and PL/I: A Brief Look 29
In Summary 34
Chapter 3 Creating Your First Java Program 35
Installing the JDK 35
Is the JDK Installed Properly? 36
Compiling and Running the Program 37
Compiling and Running Java Programs: A Second Look 38
Watch out for Those Class Names 42
What Does a Compile Error Look Like? 43
Let's Look at the HelloWorld Program 43
Back to Our Program 46
In Summary 47

Chapter 4 The Sun Java 2 Basic JDK Tools 49


Basic JDK Tools 49
Appletviewer 50
jar 51
extcheck 53
java 54
javac 58
Javadoc 62
javah 66
javap 66
jdb
68
In Summary 76

Chapter 5 Declaring and Defining Data 77


Java Primitive Types 77
A Few Words on Variable Typing 78
Variable Type Casting 80
Java Variable Typing 81
The boolean Primitive Type 82
The char Primitive Type 83
Integer Primitive Types 84
Floating Point Primitive Types 85
Character Strings in Java 86
Java Reference Data Types 86
Page vii

Java Naming Conventions 88


In Summary 89
Chapter 6 Java Language Syntax 91
Miscellaneous Java Syntax Items 92
Java Source Code Is Case Sensitive 92
Java Statements Terminated by a Semicolon 92
Java Supports Multiple Comment Styles 92
Java Has No COPY or Include Statement 93
Java Has No Pointers 93
Java Has No Preprocessor 93
Reserved Words Exist in Java 93
Java Is a Free-Form Programming Language 95
Java Assignment Statements 96
Java Operators 97
Java Operators not Found in Mainframe Programming Languages 100
Java Arithmetic Anomalies 106
Mixing Primitive Types in Arithmetic Expressions 107
Loss of Precision when Dividing Integers 108
Shoddy Floating Point Arithmetic Results 109
Overflow and Keep Going 110
Java Program Control Statements 111
Loop Constructs 111
Interrupting the Normal Processing of Loops 117
Java Decision Constructs 119
In Summary 123
Chapter 7 Class and Object Representation 125
Anatomy of a Java Method 125
Visibility Modifiers 125
Other Modifiers 127
Returned Types Coded in Method Headers 128
Method Names and Argument Lists 128
The throws Exception-Name Option in Method Headers 128
A Word or Two about Java Packages 129
The package Statement 131
Anatomy of a Java class 132
Constructor Methods and Instance Variables 132
In Summary 147
Page viii

Chapter 8 Encapsulating and Hiding Data and Methods 149


Encapsulation 149
Why Encapsulate and Hide Your Data and Methods? 150
How Do You Encapsulate Your Classes in Java? 153
A PL/I Example: Is This Object-Oriented Programming? 158
Using Accessor (Get and Set) Methods 161
In Summary 164

Chapter 9 Inheritance 165


Inheritance Defined 165
Same Classes, Different Inheritance Trees 166
Single Versus Multiple Inheritance 168
Y
FL
Example of an Inheritance Tree From the Java Libraries 169
AM

An Example: Implementing Bank Accounts 170


Code for Checking and Savings Account Classes 171
TE

Taking Advantage of Inheritance 174


Effects of Casting to and from Superclasses and Subclasses 181
In Summary 183
Chapter 10 Interfaces 185
What Are Interfaces? 185
Why Are Interfaces Useful? 186
What About Abstract Superclasses? 187
Creating Interfaces 188
Example: Implementing the Vehicle Types 188
In Summary 193
Chapter 11 Java Event-Handling Basics 195
Event Processing
Team-Fly®
196
Java Graphical Interface Components 197
Java Events 199
The Java Event Processing Model 200
Variations on a Theme 1: Using Adapter Classes 205
Variations on a Theme 2: Using Top-Level Classes 206
Variations on a Theme 3: Using Inner Classes 207
In Summary 208
Page ix

Chapter 12 Exception Handling and Thread Basics 209


What Are Exceptions? 209
The Java Exception Hierarchy 210
The Java Exception Class 211
Mainframe Programming Language Exception Handling 212
Mechanisms
The Java Exception Handling Mechanism 214
Throwing Exceptions 214
Throwing Exceptions - Continued 215
Declaring Potentially Thrown Exceptions 216
Catching Exceptions with try/catch/finally 218
Java Exceptions Summary 220
Thread Basics 220
Why Code Multithreaded Programs? 220
What Are Java Threads? 221
Executing Your Threads 222
Sample MultiThreaded Program 222
In Summary 227
Chapter 13 The Training Department Class Scheduler 229
System
The Application Defined 229
Application Options for the Students 230
Application Options for the Instructors 230
The User Interface 230
The OS/390 Mainframe User Interface 231
The Java User Interface 234
The Data Stores 237
The Course Information File 238
The Class Information File 238
The Instructor Information File 238
The Employee Information File 238
Application Outputs 238
OS/390 IBM Mainframe Outputs 239
Java Outputs 242
Putting Together the Application 243
A Procedural Language Solution 244
A Java Language Solution 249
In Summary 254
Page x

Part 2 Java In the OS/300 Mainframe Environment 255


Chapter 14 Overview of OS/390 Java 257
Infrastructure/Architecture
Software Requirements 257
Java Application Architectures 258
Java Software Components Versus Standalone Programs 259
Accessing OS/390 System Software 259
IBM Java Development Tools 262
In Summary 262
Chapter 15 Overview of OS/390 UNIX System Services 265
The Command Shell 265
The HFS File System 267
Working with HFS Files 268
Comparing MVS, UNIX, and OS/390 Concepts 270
In Summary 278

Chapter 16 Java and MVS Batch 279


Executing Java in Batch 279
Running Java Programs with BPXBATCH 280
Running Compiled and Linked Java Programs 284
Running Java Programs as Started Tasks 285
In Summary 286
Chapter 17 Java Record I/O Using the JRIO Package 287
What Is JRIO? 287
Contents of the JRIO Package 288
JRIO Interfaces 288
JRIO Constants 290
JRIO Exceptions 292
Using JRIO 294
Directory and Dataset Naming Conventions 294
import Statements Needed for JRIO 295
Representing Record Structures 295
JRIO Coding Examples 298
Fetching Encoded Data from and Setting Data to Fields 311
In Summary 313
Chapter 18 Java, CICS, and IMS 315
Java and CICS 315
The CICS Transaction Gateway 315
Writing a JCICS program using COMMAREA 320
Page xi

Java and IMS 321


What Is IMS Connect for Java? 322
In Summary 326

Chapter 19 Java and DB2 327


Overview of Java and DB2 for OS/390 327
Java Database Connectivity (JDBC) 329
Using JDBC 329
Java and SQLJ 334
Using SQLJ 334
Comparing JDBC to SQLJ 337
In Summary 337

Chapter 20 The Training Department Class Scheduler 339


System Revisited
The Application Feature Defined 339
The SQL Used in the Example 339
A Procedural Language Solution for "Display Class List Later Than 340
Entered Date" Option
Comments on the COBOL Solution 340
A Java Language Solution for "Display Class List Later Than 344
Entered Date" Option
The Code for a Single Class Retrieved from the Database 344
In Summary 347
Part 3 Java: Above and Beyond Other Programming 349
Languages
Chapter 21 Applets 351
A Bit of Background 351
Applications versus Applets 351
Coding the Web Page that Uses the Applet 352
How an Applet Executes 352
In Summary 357

Chapter 22 Java User Interface Basics 359


Java GUI Component Libraries 359
Standard GUI Components 360
Java Containers 360
Another Example 366
In Summary 371
Page xii

Chapter 23 Java File I/O 373


The File 374
Files (Datasets) in COBOL, PL/I 374
Files in Java 375
The Concept of a Stream 378
Streams in COBOL and PL/I 378
Streams in Java 380
In Summary 383
Chapter 24 The Java 2 Enterprise Edition Libraries 387
What Is J2EE? 387
Java on the Server 388
J2EE APIs 389
In Summary 394
Chapter 25 Remote Method Invocation 395
What Is Java RMI? 395
Java RMI Mechanics 396
Time for an Example 398
Step 1: Create the RMI Interface 398
Step 2: Code the Client Class 400
Step 3: Code the Server Class 401
Step 4: Compile the Interface, then the Server, and Then the Client 403
Classes
Step 5: Generate the Stub with the rmic Program 403
Step 6: Place the Stub Class File where the Client and the Server 403
Classes can Find Them
Step 7: Start the rmi Registry 404
Step 8: Create a Policy File 404
Step 9: Execute the Server Class 405
Step 10: Execute the Client Class (Invoke the Remote Method) 405
Summary of RMI Steps 405
In Summary 407
Glossary 409
Bibliography 417
Index 419
Page xiii

Preface
Developing Mainframe Java Applications provides big iron data processors with a reference and
learning tool they can use to write Java programs that run under OS/390. The thrust of the book is to
describe Java in the language of the mainframe professional and to show how such professionals
would develop Java applications for the IBM mainframe.

This is a "how-to" book, meant to impart rules and general techniques by drawing analogies between
the familiar and the new. Scant mention is made of the technical intricacies of the Java Virtual
Machine, garbage collection algorithms, "the taming of the threads," or other topics that deal with
Java internals.

Who Should Read This Book?


The main audience for this book is the mainframe programmer. These programmers have years of
experience on the mainframe and, although the likelihood is high that they have a wintel desktop (for
email, office productivity, and mainframe terminal emulation), they may not be adept at
Y
programming on anything but a mainframe.
FL

The book helps programmers learn Java programming, but the book has a wider audience than
AM

mainframe programmers. Systems analysts need to understand what Java is all about as well as
programmers. Management, especially first and second line managers, needs an understanding of
Java and a way of relating Java to their technical background.
TE

As an aside, the book assumes that the reader has no C or C++ programming experience, which
means that Java syntax, down to using curly braces, may be unfamiliar to the reader.

Team-Fly®
Page xiv

The Book's Organization


Part 1, "Java Fundamentals," describes Java by comparing its language features with those of third-
generation procedural languages, such as COBOL and PL/I. The book describes Java as an object-
oriented programming language. Part 1 concludes by showing some Java code for an application and
comparing this Java code to COBOL and PL/I code that performs similar functions.

Part 1 contains chapters that discuss loops, decision constructs, declaring data, and
subroutine/function (methods, really) invocation–the language of procedural programming
languages. Other chapters discuss Class/Object representation, Inheritance, and Encapsulation–the
language of object-oriented programming languages. After the reader completes Part 1, he or she will
have a good grasp of how to use Java and how Java stacks up against familiar mainframe
programming languages.

The goals of Part 1 are as follows:

To describe Java by comparing and contrasting Java to familiar programming languages

To introduce the Sun Java JDK so the reader can create and execute simple Java programs on
his or her PC

To explain how Java implements the object-oriented programming language metaphor,


thereby showing how Java is different from PL/I, COBOL, and other languages used by the
mainframe programmer

Part 2, "Java in the Mainframe Environment," describes IBM's "Java Everywhere" strategy by
examining Java in the OS/390 environment. Each chapter covers how Java works with a particular
brand of IBM technology, such as CICS, DB2, or VSAM. Java code exploiting IBM-specific
technologies is included. The section concludes with Java code that accesses DB2 tables.

Part 2 explains shows how IBM has provided the Java programmer access to tried and true
technologies. After the reader completes this section, he or she will have a good grasp of how to
exploit Java in the OS/390 environment. The reader will be quite comfortable with Java; he or she
knows the syntax, how Java implements the object-oriented world view (from Part 1), and how to
use Java with familiar IBM technologies (Part 1).

The goals of Part 2 are as follows:

To explain how IBM has implemented Java on its mainframe environment

To explain how to use Java with the following IBM technologies:

CICS

IMS

Batch

VSAM
DB2

To compare and contrast Java code with COBOL and PL/I code when using the previous list
of technologies
Page xv

To describe IBM's JRIO classes and how the Java programmer on OS/390 uses these classes to
perform record I/O

To show application code using JDBC to access DB2 data

In the first two parts, the book shows COBOL and PL/I code that functions like the Java code in the
snippets and applications. However, this approach can only take the reader so far into the world of
Java. Simply put, Java is far more capable than COBOL and PL/I put together. Hence, the last
section of the book describes several key features of Java that are found only in Java.

Part 3, "Java: Above and Beyond Other Programming Languages," lightly touches on several Java
features and capabilities, such as applet creation, the Swing user interface classes, Java 2, Enterprise
Edition (J2EE), and Remote Method Invocation (RMI).

The goals of Part 3 are to describe some of Java's unique features, including

Applet coding

Java Native File I/O

Java GUI classes

The libraries constituting the Java 2, Enterprise Edition

The Remote Method Invocation (RMI) classes, which enable a Java programmer to execute
Java programs on other machines over a network

Conventions Used in This Book.


Code listings and outputs appear in a monospaced font, such as

public static void main( String[] args )

The first time a term is used in a chapter, the term is printed in italics.

Throughout the book, you'll find sidebar information that contains relevant information that doesn't
fit into the current context. Here's what a sidebar may look like:

You'll also encounter notes that augment the material preceding the note. Here's

THIS IS HOW A SIDEBAR TITLE MAY LOOK


And here is some text explaining the sidebar title . . .

what a note may look like:

This text may explain the material immediately preceding the note.

You'll also encounter tips that offer a shortcut or a solution to a common problem that relates to the
material you've just read.
This text may provide a shortcut or solution to a common problem.
Page xvi

This page intentionally left blank.


Page xvii

Acknowledgments
This work would not have been possible without the nearly infinite patience of the hard-working folk
at John Wiley & Sons. Of course, kudos go to my wife who had to witness and endure some strange
behaviors on my part during the completion of this work.
Page xviii

This page intentionally left blank.


Page 1

PART One
Java Fundamentals
Page 2

This page intentionally left blank.


Page 3

CHAPTER 1
Introduction

Java Trek
You are a mainframe programmer neck deep in COBOL programming. You cannot escape the siren
song of object-oriented programming (OOP). Every trade publication you peruse has articles from
industry pundits chanting the object mantra. In an evangelical manner, these new disciples of the
object faith quote chapter and verse from the missiles of Saint Booch and Saint Jacobsen. The
message is clear— you must adopt the Object Tao and righteously cast out the old demons of
procedural programming and structured design.

Okay, you got the calling. As a highly evolved mammal, your survival instinct kicks in. You sense
that you'd better find out what this object stuff is all about. If these harbingers of the object path are
correct, you could become obsolete before you become vested in your pension plan. Duly motivated,
you begin your quest for the truth about object technology.
Y
A New World of Objects
FL

The oceans of literature and the galaxy of Web pages contain many new terms and concepts. On your
AM

own, the brave new world of object technology can be quite daunting. In this exploration, you will
have an experienced guide to help you sort through the differences between mainframe programming
concepts and object technology— specifically Java programming.
TE

Team-Fly®
Page 4

Object applications are not related sets of procedures acting on external data sources, but sets of
communicating objects. These objects contain all their needed data and procedures. The object view
of modeling software systems is based on the properties and behaviors of actual application entities.
Comparatively, the old software design model of creating separate data models and structure charts
seems archaic.

Reusability .
The object prophets make strong claims about software reusability. On the reusability issue, the
prophets speak with a single voice. They say that only by using object technology can you, the
programmer, create truly reusable code.

We all know that software reusability is not a new issue. Actually, software reusability has always
been the platonic ideal of programming. You've probably been very close to this ideal at times. It is
possible to write reusable code with a procedural language, but the reusability is achieved in spite of,
rather than because of, your programming tools and environment.

Is there really a programming environment out there somewhere that enables you to create reusable
code as a rule, not as an exception? Any culture advanced enough to produce cholesterol-free eggs
and breastfeeding devices for males must be advanced enough to produce this programming
environment. But do object environments truly assist the programmer in writing reusable code?

Inheritance
You may have read about that wonderful property of objects called inheritance. With inheritance,
you write code that implements some behavior for a group of similar objects, or a class. You create
subclasses based on some relationship— subclass A ISA superclass of B, for example. Once done,
the code that implements behaviors for the superclass is automatically known to the subclass. Yes, I
said automatically known to the subclass.

Well, this certainly sounds like a feature that would help me write reusable code. Think of a bank
account superclass with checking and savings account subclasses. You write code to implement the
withdrawal behavior for the bank account class. This code automatically becomes known to the
checking and savings account superclass. One routine, three classes. This beats the pants out of
reusability in the COBOL world-copying code in a separate member of your PDS and changing a
few lines. Do you see the real value in this inheritance stuff?

Encapsulation
You are likely to encounter the term encapsulation in any exploration of object technology. With
encapsulation, the data and code that implement behaviors in application objects are hidden from
other objects. The big idea is that, because other objects do not know about an object's internal data
and behavior representations, these other objects cannot change these representations. In short,
encapsulation provides a safety mechanism that prevents unwanted changes in an object's data.
Page 5

How does this encapsulation stuff really help prevent unwanted changes? Think about the last set of
COBOL modules you wrote. Let's say you coded a list of parameters in the CALL/USING statement
of the calling module. Remember the unexpected behavior of the calling program? Remember trying
to debug the calling program? Remember how the called program changed one of the parameters
supplied in the LINKAGE section? Remember how difficult this problem was to locate? Suddenly,
like the light bulb flashing over the coyote's head in those silly roadrunner cartoons, you see the
beauty, majesty, and practicality of encapsulation.

The problem with the COBOL modules is that both the calling and called modules needed to know
the data representation of the parameters. Because the called module knew the data representation,
the module contained code that changed the parameter. At times, you count on the ability of the
called COBOL module to change the parameter's value and write code to make wanted changes.
Sadly, you can slip and write code that inadvertently changes passed parameters. The calling module
has no knowledge of these changes and does not execute correctly.

Owing to encapsulation, an object application can never suffer this fate. What an object doesn't
know, an object cannot change. Data contained on objects is safe from unwanted tampering from
other objects.

Stack Class
Let's say Joe Programmer wrote a PL/I program a while back. Being a wise guy, he implemented a
stack as a controlled data structure (a controlled data structure in PL/I— declared with the storage
class CONTROLLED— means the PL/I program can dynamically allocate memory for the structure
with the ALLOCATE statement). All routines that used the stack had this controlled structure
declaration. Joe's code worked; he was immensely pleased with himself. When the team lead
scheduled the code walk-through, he couldn't wait to demonstrate his superior knowledge of the PL/I
language.

Well, it turns out that Joe should have known that the project lead is not nearly as well versed in PL/I
as he is. When she saw the stack and its controlled allocation, she barked, "What is this?" With pride,
Joe described the intricacies of PL/I's controlled storage class. A scowl slowly spread over the
project lead's face. She was clearly not impressed with Joe's code and asked him to rewrite the stack
code, using a more conventional data structure. When Joe meekly asked for a suggestion, she
whipped out an array representation on a white board. Joe slinked back to his cube to make the
required changes.

Joe hunted down every module that accessed the stack because he had to change every one. He had
to change the POP, PUSH, and ISEMPTY routines, too. What a pain. Maybe Joe should have
conferred with Hagatha, the team lead, before he embarked on his coding journey.

If this application were done in an object language, Joe would need to change only the stack class.
All objects communicating with the stack, being ignorant of the stack's data representation, would
not have to be changed.

Another bonus— because of inheritance, all subclasses of a changed class automatically know of the
change. Joe need do nothing to implement a new data representation or a behavior in the subclasses.
Page 6

By now, you should be firmly convinced that this object stuff is definitely worth the admission price.
This class/object representation, combined with inheritance and encapsulation, makes for powerful
code. Many more object technology wonders are there to unearth— let's keep digging.

Polymorphism
What if you could send the same message to different objects and each object would invoke the
appropriate behavior in response to the message? Remember that object applications are
communicating objects, not separate function/module calls acting on external data sources. The term
message makes sense in object-speak. Objects communicate by issuing messages to each other. The
message invokes some behavior that you have implemented in code. The thrust of polymorphism is
that each object responds to a message according to its understanding of that message.

There is practical, everyday truth in this. How do people respond to messages? Do we not respond in
our own way? Don't different people (and dogs, for that matter) respond differently to the same
message? When you become accustomed and attuned to this concept, the object world-view of
polymorphism seems as natural and proper as wearing underwear.

You may think that object technology is recent, say 1990s, technology. However, object technology
has been around since the 1970s. It may be strange to realize that object technology is older than
your dog. It may be older than your significant other. It is certainly older than some of the big iron
technology like DB2 and REXX that you've been using for the past 15 years.

Java and C++


By now, you have absorbed the essentials of an object system: class/object representation,
encapsulation, inheritance, and polymorphism. That's good. But, as a programmer, you may be
naturally curious about programming languages that implement these essentials. It seems that every
programming language has an object flavor (even COBOL.) However, the most common are the
C++ and Java programming languages. Let's investigate these two languages.

Your first impulse may be to rush off to a bookstore and purchase some of the uncounted number of
books about these languages. Because most programming books are 40-plus dollars, a few books
equate to big bucks. After all, you're a programmer, not a drug dealer or a dentist. Three books are
the equivalent of food for two weeks. By now, the at-home crowd must be weary of eating beanie-
weenies. Maybe you can make do without the books for now.

Internet searches reveal a wealth of links on C++ and Java. There are lots of C++ and Java source
code, lots of terminology and acronyms, and lots of talk about UNIX on the net. There's little on how
object technology is used by companies in certain industries— notably yours. To find out how this
object–C++–Java technology is used by your industry and your company will take more research.
Page 7

Perhaps a direct approach is in order. Why not talk to folks in your organization to learn if anyone in
the same building is using object technology? You may meet a few object converts under your
corporate roof. Perhaps some of these object practitioners can shed some interesting light on C++
and Java usage within the company.

C++
Joe, the first object practitioner you meet, uses the C++ programming language. This programmer
swears with the fervor of a recent ex-smoker that any object programmer worth his salt uses C++. He
gleefully takes the time to explain his ardor for C++.

Joe tells you in a pompous and annoying manner that C++ supports all the features of object
programming: class/object representation, encapsulation, inheritance, and polymorphism. He
explains that C++ is a hybrid object language— a language built upon an existing procedural
programming language (C, in this case). He boasts that his C experience and knowledge of object
concepts enabled him to start coding almost immediately.

He continues by explaining that C++ supports multiple inheritance. Multiple inheritance enables a
subclass to inherit data attributes or behaviors from more than one superclass. Of course, he grins,
multiple inheritance is more flexible than, and superior to, single inheritance.

Because of your hard work and research, you understand what Joe is talking about. You wax with
glee as you realize that you can talk the object talk. You can't wait to walk the object walk.
Impatiently, you ask him to show you some C++ code.

As your eyes scan the C++ code, your shiny, gleeful face quickly sours to a dull, woeful puss. You
can't understand any of this stuff. This code could be Babylonian cuneiform writing as far as you're
concerned. You can't believe that under this mess is essentially code in a procedural language.

You recall the first time you saw PL/I. You didn't understand the nuts and bolts, but you had a good
understanding of what the code did. Your COBOL background was good preparation for
understanding PL/I. Unfortunately, this C++ stuff looks pretty cryptic.

The C++ programmer senses your state of overall confusion and asks you how much C experience
you have under your belt. There may be lots under your belt these days, but none of it is C
programming experience. You're a COBOL and PL/I programmer. Remember when you had to learn
pointer use in PL/I? You finally grasped that a pointer is merely a four-byte address. Joe shows you
pointers to character strings, pointers to integers, and (gasp!) pointers to pointers, explaining that,
although these pointers are addresses, they are all different data types. You thank the Joe for his time
and mosey on to your cubie. Alone with your thoughts, the horror of learning C++ seeps in. You
thought object programming would be easier than conventional procedural programming. This C++
stuff seems to be procedural programming at its worst.

At lunch, you mention to a chum that you're looking into C++ programming. This chum happens to
know a thing or two about C++. He has some C++ information obtained from a vendor of Macintosh
software development tools. He believes that this information is Mac-specific. But the C++
information from the Mac vendor made the
Page 8

stuff you gleaned from the pointer-happy programmer earlier today read like a nursery rhyme. Here's
what you read:

When you call the function "MYSTREAM.read()", it normally returns a reference to the stream object
itself, that is, . MYSTREAM. This is so you can chain these functions together, like this:

MyStream.read (MyVar1).read(MyVar2).read(MyVar3)

But when you call "MYSTREAM.read()" from a function that expects an integer, the compiler performs
some "sleight-of-hand" and actually returns MYSTREAM.good()" as the function result.

So this is what the world of programming has evolved to?

Desperately, you rifle through your notes. You recall hearing through the mill that your corporate
training department may be developing courses on Internet technologies. You recall the instructor of
the last class you took, oh so many moons ago. Why not give her a call?

Java
Jane, a corporate instructor, is developing a course on the Java programming language. Java, she
excitedly explains, is part of a suite of technologies that enable a programmer to write a program
once and run it on any platform— even on the Internet. Great— you have to deal with a suite of
technologies to learn and use Java. This is just what you need, right? Before you get all steamed up
over technology suites and the like, your Java guide says that Java has use and value as a
programming language aside and apart from Internet; Java is much more than the "Applet language
of the Internet." Upon hearing this, you regain your composure.

Jane starts to talk about Java's inheritance mechanism. When you comment on C++ and its support
for multiple inheritance, she audibly snickers. Jane mentions that with multiple inheritance, you have
no straightforward way of knowing the origin of some inherited behavior. Her point is that an
application developed with multiple inheritance may ease initial class creation and application
development but could make application maintenance a nightmare. By now, you assume that Java
supports single inheritance only.

However, when you point out the textbook advantages of multiple inheritance, she audibly snickers
again. Your Java guide points out that she never got to explain Java's inheritance mechanism to you.
She tells you that Java supports single inheritance inas-much as every object is created from a class
that has one and only one superclass. However, the Java designers were well aware of the limitations
of single inheritance as well as the pitfalls of multiple inheritance. She explains that Java's
inheritance mechanism is unique; a Java class has the ability to inherit behaviors from several classes
but only one of these classes is the superclass. The inherited behaviors that do not belong to the
superclass are defined to the class by an interface.

You are puzzled because this sounds like multiple inheritance. Jane explains that Java supports two
separate hierarchies: a Class hierarchy, which defines the
Page 9

class/superclass relationship, and an Interface hierarchy, which enables a class to implement


behaviors from classes not contained in the class hierarchy. In JavaSpeak, a class extends its
superclass and (optionally) implements one or more interfaces.

Well, this still sounds like multiple inheritance but you get her gist: A Java class has one bonafide
superclass but can implement behaviors from other classes. When you comment that a Java class can
inherit method implementations from only the superclass, and the class must provide
implementations for all methods used by an interface, your guide approvingly nods. She suggests
that you not get hung up on the differences between a superclass and an interface yet.

Jane explains that the lazy C++ programmer could write code that doesn't do the cool object stuff,
like encapsulation or inheritance. The lazy C++ programmer could write C++ code to be completely
procedural. At first, you might be tempted to believe that this ability of C++ to wear two hats, so to
speak, is a good thing. Yeah, but you saw C++ code, remember? C++ is not your idea of procedural
programming.

Actually, she says, a common view of C++ is that C++ is a better version of C; C++ was developed
to overcome the deficiencies of the C programming language (of which many exist). Now, you don't
know C, and don't care to learn, but you see the wisdom of her words. You get the drift that C++ was
developed from C as opposed to being developed from the ground up. C++ is a better C, not a
language necessarily engineered to support object orientation.

The Java guru continues. She states that you could do procedural programming in Java, but anything
of substance, like file or database I/O, requires classes and objects and inheritance— the stuff of
objects. Although you could force a Java program to be procedural and not use object-oriented
features, your program probably could not do anything useful.

Java is a modern language, she says. Java designers at Sun Microsystems had definite ideas in mind
when Java went to the drawing board. Considering that Java was released in late 1995, you can tell
that this technology is hot.

Some Java Code

Perhaps you should look at some Java code before she waxes into a Java frenzy. Jane presents an
implementation of the bubble sort in Java as shown in Listing 1.1.

Looks like that C++ stuff you saw before. You see those ++, --and the braces {}. At least there's a
use for those braces now. For the moment, you're not impressed with the syntax of this "modern"
language.

My friendly Java instructor explains that syntax is syntax; after all, isn't it all a matter of what you're
used to? Of course, as a programmer, you take the time to explain that programming language syntax
parallels written language inasmuch as both need to be read, written, and understandable. You take
the time to explain that language replete with punctuation is more difficult to digest than language
without excess punctuation. However, you are a gracious and classy person and you readily yield to
your Java Guide's point about syntax.

Life, and programming, is too intense to sweat the small stuff. Jane says her time is short and she'd
rather not go over too many syntax details right now; she'd rather stick to explaining Java concepts
that may be daunting to a Java wannabe like you.
Page 10

class BubSort { //1


public static void main( String args[]) { //2
int anarray[] = {3,10,6,1,2,9} ; //3
sort( anarray ) ; //4
for (int idx = 0; idx < anarray.length; idx++ )
System.out.print1n( anarray[ idx ] ) ;

} //5

static void sort(int a[]) { //6


for (int idx1 = a.length; --idx1>=0; ) {
boolean swapped = false;
for (int idx2 = 0; idx2<idx1; idx2++) {

if (a[idx2] > a[idx2+1]) {


int temp = a[idx2];
a[idx2] = a[idx2+1];
a[idx2+1] = temp;
swapped = true;

}
if (!swapped)
return ;
}

} //7

} //8
Listing 1.1 The infamous bubble sort.

She first explains that the double slashes denote a single line comment; the slash-asterisk
combination denote a multi-line comment. She mentions that Java is case sensitive. That is, the
variable names myPay and MYPAY are different variables. Like a chanteuse breaking into song, she
starts to explain pieces of the program by the numbers. She says that even this small example
contains many Java features; she has time to cover only a few points. You express your gratitude and
ask her to proceed.

She explains the big picture by stating that the program has a main method that declares and
initializes an array of numbers, calls a sort method, and prints out the sorted array. The sort() method
implements our friend, old Mr. Bubble. Both the main()
Page 11

and sort() methods are part of a class called BubSort. You may understand her reasoning; it is the
way you might code an example to illustrate a sort or features of a programming language.

The Java Program-By the Numbers

She starts to discuss the numbered lines.

Line //1 is the class declaration:

class BubSort {

Every Java file containing Java source code has a class declaration. The class declaration should
match the name of the dataset. In this case, the dataset name would be BubSort.java.

Line //2 is the declaration for the main() method:

public static void main( String args[]) {

Every Java application has a main() method. Now, she continues, this doesn't mean that every dataset
with Java source code has a main() method. Some Java source files have support datasets. And, she
adds, Java applets do not have a main() method.

Yes, applets. You recall reading about Java applets— small programs that execute within a Web
page. But you withhold your questions because you're in the middle of dissecting this bubble sort.

Speaking of which, Jane returns to the explanation of line //(2). Well, those words public static void
have meaning. She says it has to do with the visibility of the method (that's the public keyword)— the
method does not belong to any particular object (that's the static keyword) and what the method
does, or does not return (that's the void keyword).

Yes, she says— Java has keywords, or reserved words, like most programming languages.

Line //3 is a Java array declaration:

int anarray[] = {3,10,6,1,2,9} ;

The first keyword, int, is the data type of the elements of the array. You gather that the keyword int
is short for integer. She tells you that you may be right, you may be wrong— it depends on what you
think an integer is.

You say that the definition of an integer is operating-system dependent. On some platforms an
integer is four bytes, type binary, unsigned. On other platforms, an integer is four bytes, type packed,
signed. You say the int declaration depends on the platform you are writing Java on.

Java and Platform Independence

Well, your long-suffering and humble Java instructor certainly has a thing or two to say now. She
asks you if you've read anything about Java. If so, she claims, you'd know
Page 12

that Java doesn't care for operating system particulars such as primitive data type byte sizes and
formats. The beauty of Java is that Java was designed to be source code compatible across multiple
platforms. The same Java that executes on a Wintel box will run without modification on a
Macintosh, an IBM RS6000 running AIX, or on an IBM mainframe running OS/390.

You chortle under your breath. Seems you've heard this one before. You recall how C was the
ultimate cross platform software development tool. C was the "be all, end all" of programming
languages. Now, you never became proficient in C, but you work in data processing, right? If C lived
up to one-tenth of its promise, you would have heard about it, right? Well, you still spent your time
coding EVALUATE statements and looking at Abend-Aid dumps, right?

Apparently sensing your disbelief over her words, she explains that Java achieves this cross platform
execution boast by compiling into a platform-neutral format called bytecodes. A platform-specific
piece of software called a Java Virtual Machine translates the bytecodes into platform-specific
machine code. Hence, the Java compiler does not have to care about operating system details; the
Java Virtual Machine takes care of that. And the Java Virtual Machine is platform-specific.

You see the beauty in this approach. The Java programmer really does not have to know how big
integers are or how booleans are represented on a particular platform. All the Java programmer needs
to know is how big Java integers are or how Java represents booleans. The Java Virtual Machine
takes care of the mundane platform-specific details.

Oh, back to the question, how large are int data types? She says that Java uses four byte signed
binary integers.

Java Objects and Primitive Types.

A typical Java declaration is the data type or class name followed by the variable or object name. In
line // 3, the identifier anarray is the name of the declared array. My guide says that Java variables or
objects can have other attributes attached to them, but for now let's keep things straightforward.

You are a bit puzzled over this "variable or object" thing. Isn't Java object-oriented? Isn't everything
you use in Java an object instantiated from a class? Isn't that how this object-oriented stuff works?

She reminds you that Java is a new language. Over the years, computer scientists have learned a
thing or two about programming languages. For example, a "pure object" language like Smalltalk
would never, never, ever, ever permit you to use anything but objects. In Smalltalk, even the number
2 is considered an object. Some computer scientist types have concluded that this "everything is an
object" approach doesn't work for some applications. A programming language runtime must keep
track of memory allocated for objects (among other things). Most object languages need custom
routines to compare objects for equality and to read and write objects. In short, using objects is a lot
of work for a computer.

An example of an application type that is not well suited to object technology is the "number
crunching" type of applications used in science labs. Remember those old Fortran programs with five
nested loops? To use an object-oriented system to perform
Page 13

numeric calculations seems a bit wasteful of computing resources considering what the system may
require to keep track of all the objects used. Of course, this is not to say that you couldn't code
application of this type in object languages.

Java enables a programmer to use primitive data types instead of objects. For example, this example
uses few objects. The array elements, the array indices, and the boolean flag are not objects; these
program elements are variables. The array declared on line //3 is what she calls a reference data type.

As an aside, Java arrays are very object-like. Arrays may be assigned to variables of type Object
(Object is the root class in Java, the class at the top of the hierarchy). But, she continues, Java
practitioners do not consider an array an object.

You mull this over. You sort of understand that the array declaration does not declare an object.
Objects use methods and there's been no talk of methods attached to this array. This array is pretty
much like an array used in COBOL or PL/I.

You believe that some of this object stuff looks really good "on paper" but often fails the real world
test. You've read that this object stuff is decades old. Let's face it— if this technology were so great, it
would be more widespread. A mixture of old-fashioned, procedural programming and this object
stuff could be just what we need in data processing, perhaps.

Possibly, says your Java guide. She continues to discuss the sort example.
Y
FL
Back to the Java Bubble Sort
AM

Back to line //3. Note that this statement initializes the array. In Java, arrays start with index 0, not 1
like some programming languages. Just something to keep in mind, she quips.
TE

Jane comments that she has to wrap this up soon; she has meetings to attend and memos to write. She
starts to discuss line //4:

sort( anarray ) ;

Here's where you invoke the sort() method and pass the array argument. This is not tough, new, or
strange. This is programming!

Where are the objects? Where are the classes? Java is object-oriented, right? Of course, Jane says,
but we don't need object stuff to do a bubble sort. Java lets you do some things procedurally.

Take a look at line //6:

static void sort(int a[])

The sort method has a special keyword, static, which means that you need not attach this method to
an object. Sometimes you just need a piece of code that does not depend on any particular object's
data. The bubble sort is like that; the sort is entirely parameter driven. What we need is a way of
telling Java that we want this method but don't want to create objects and attach the method to the
object. The static keyword does just that.

She explains that if she (or anyone) needed a bubble sort, she could use the sort method in the
BubSort class. First, the programmer would remove the main() method from BubSort.java; Listing

Team-Fly®
1.2 shows the new BubSort.java.
Page 14

class BubSort {

static void sort(int a[]) {

for (int idx1 = a.length; --idx1>=0; ) {


boolean swapped = false;
for (int idx2 = 0; idx2<idx1; idx2++) {

if (a[idx2] > a[idx2+1]) {


int T = a[idx2];
a[idx2] = a[idx2+1];
a[idx2+1] = T;
swapped = true;
}

}
if (!swapped) return ;

}
Listing 1.2 Bubble sort in its own class.

As you can see, the sort() method is unchanged but the class does not have a main() method.
Presumably, the class that will use the sort() method has a main() method, and only one main()
method per Java application is allowed.

Assuming the BubSort class is on the same directory as the UseBub class or in what Java mavens
call the classpath, when you execute UseBub, the Java runtime will pull what UseBub needs from
BubSort. In particular, UseBub needs the sort() routine. Check out the lines marked with //*** in
Listing 1.3.

BubSort.sort( anarray ) ;
BubSort.sort( anarray2 ) ;

The sort() method is qualified with the class that contains the method.

You ask about the other statements in the original bubble sort program— the one from Listing 1.1. In
particular, you ask about these curly braces. The rest of the numbered statements are braces that
close off blocks. She explains that Java uses the curly braces as block constructs. The block construct
helps to define variable visibility. Also, the block construct is required when more than one
statement follows an if statement or a loop construct. Even a small Java program can contain
numerous braces, she says.

The visibility of these variables may be defined by curly braces; variables declared within a pair of
braces are known within those braces. Some cases exist where a variable is declared within a
statement. In this case, that variable is visible only in that statement. She directs you to the following
statement:
Page 15

class UseBub {

static void printResults (int sorted[]) {

for (int idx = 0; idx < sorted.length; idx++ )


System.out.println( sorted[ idx ] ) ;

public static void main( String args[]) {

int anarray[] = {3,10,6,1,2,9} ;


BubSort.sort( anarray ) ; //***

int anarray2[] = {12, 4, 35, 1, 55, 76, 3 } ;


BubSort.sort(anarray2) ; //***

printResults( anarray ) ;

printResults( anarray2 ) ;

}
Listing 1.3 Invoking the bubble sort from a class.

for (int idx = 0; idx < anarray.length; idx++ )


System.out.println( anarray[ idx ] ) ;

This is a single statement. The variable idx is visible in this statement only.

She catches you staring at this statement. She catches you in mid-thought and explains that this is a
looping construct that prints an array value to the default output stream. She also says that she is
quickly running out of time and has to pick up the pace.

After a pregnant pause, you meekly ask her where the pointer references are. You figure that
"modern" languages like C++ and Java are replete with pointers. You cite your discussion with the
C++ programmer and what he told you about pointers in C++. What about pointer use in Java, you
ask?

With an impish grin, she tells me that Java does not use pointers. No pointers? None, she answers.
Java is able to do what every programming language does, and more, without the use of explicitly
declared and manipulated pointers. A Java programmer cannot declare a pointer or access the
starting address of a data structure in any way.

Well, well— no pointers in Java! That one statement alone is music to your codeweary ears. You start
to believe that these Java engineers at Sun really know their stuff.
Page 16

Meet the Sun JDK

You ask her how she compiles and links this program. She reminds you that Java compiles into a
platform-neutral data format called bytecodes. You knowingly nod in agreement. She is using a
WinTel box to compile her Java source. She tells you that the marketplace is rife with Java tools and
serious Java folk have an arsenal of tools to help with Java development. For now, she explains,
she'll use the standard tool suite, or Java Development Kit, available from Sun Microsystems (the
developers of Java). She opens up a DOS window and compiles the program. Next, she executes the
program. Figure 1.1 shows the DOS window after compiling and running the bubble sort.

The javac command invokes the Java compiler. In truly sparse computer geek fashion, a successful
compile provides no diagnostics. A successful Java compile produces a class file— in this case,
BubSort.class. Next, the java command executes the program. The java command passes the
previously created class file, in Bytecode format, to the Java Virtual Machine for execution. The
result of the execution is seen in the DOS window previously.

Well, well, you think. This certainly beats the pants off of submitting batch compiles and links. You
enter source code in an appropriately named dataset, switch to a DOS window where you do your
compiles, and repeat until you get a clean compile. Next, you execute your program in the very same
window.

You note that you need a program to execute your Java program. You ask her where the executable
file is produced by the linker. Actually, you ask her where and how she did the link. Your Java guide
tells you that she did not link the Java code; she did not produce an executable. The java compiler,
javac, produced a class file composed of bytecodes. The bytecodes are interpreted by the java
command.

You ask her how much these Java tools cost— the compiler (javac), the program that executes the
bytecodes (java), and the Java Virtual Machine. You would like to get a copy on your machine.
When she replies that these tools are free, you slip off your chair. Free? How can this be? Our shop is
used to paying a fortune for any software tool.

Figure 1.1 DOS window after compiling and running the sort.
Exploring the Variety of Random
Documents with Different Content
The Project Gutenberg eBook of Heel
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: Heel

Author: Philip José Farmer

Illustrator: Virgil Finlay

Release date: December 7, 2019 [eBook #60871]

Language: English

Credits: Produced by Greg Weeks, Mary Meehan and the Online


Distributed Proofreading Team at http://www.pgdp.net

*** START OF THE PROJECT GUTENBERG EBOOK HEEL ***


HEEL
By PHILIP JOSE FARMER

Great cast! Stupendous show!


If this didn't make history,
nothing ever would!

[Transcriber's Note: This etext was produced from


Worlds of If Science Fiction, May 1960.
Extensive research did not uncover any evidence that
the U.S. copyright on this publication was renewed.]
"Call me Zeus," said the Director.
"Zeus?" said his wife, a beautiful woman not over a thousand years
old. "What an egomaniac! Comparing yourself to a god, even if he is
the god of those—those savages!"
She gestured at the huge screen on the wall. It showed, far below,
the blue sea, the black ships on the yellow beach, the purple tents of
the Greek army, the broad brown plain, and the white towers of Troy.
The Director glared at her through hexagonal dark glasses and puffed
on his cigar until angry green clouds rolled from it. His round bald
head was covered by a cerise beret, his porpoise frame by a canary
yellow tunic, and his chubby legs by iridescent green fourpluses.
"I may not look like a god, but as far as my power over the natives of
this planet goes, I could well be their deity," he replied.
He spoke sharply to a tall handsome blond youth who wore a crooked
smile and bright blue and yellow tattoo spiraling around his legs and
trunk. "Apollo, hand me the Script!"
"Surely you're not going to change the Script again?" said his wife.
She rose from her chair, and the scarlet web she was wearing
translated the shifting micro-voltages on the surface of her skin into
musical tones.
"I never change the Script," said the Director. "I just make the slight
revisions required for dramatic effects."
"I don't care what you do to it, just so you don't allow the Trojans to
win. I hate those despicable brutes."
Apollo laughed loudly, and he said, "Ever since she and Athena and
Aphrodite thought of that goofy stunt of asking Paris to choose the
most beautiful of the three, and he gave the prize to Aphrodite,
Hera's hated the Trojans. Really, Hera, why blame those simple,
likable people for the actions of only one of them? I think Paris
showed excellent judgment. Aphrodite was so grateful she contrived
to get that lovely Helen for Paris and—"
"Enough of this private feud," snapped the Director. "Apollo, I told
you once to hand me the Script."

Achilles at midnight paced back and forth before his tent. Finally, in
the agony of his spirit, he called to Thetis. The radio which had been
installed in his shield, unknown to him, transmitted his voice to a
cabin in the great spaceship hanging over the Trojan plain.
Thetis, hearing it, said to Apollo, "Get out of my cabin, you heel, or
I'll have you thrown out."
"Leave?" he said. "Why? So you can be with your barbarian lover?"
"He is not my lover," she said angrily. "But I'd take even a barbarian
as a lover before I'd have anything to do with you. Now, get out. And
don't speak to me again unless it's in the line of business."
"Any time I speak to you, I mean business," he said, grinning.
"Get out or I'll tell my father!"
"I hear and obey. But I'll have you, one way or another."
Thetis shoved him out. Then she quickly put on the suit that could
bend light around her to make her invisible and transport her through
the air and do many other things. Out of a port she shot, straight
toward the tent of her protégé. She did not decelerate until she saw
him standing tall in the moonlight, his hands still raised in entreaty.
She landed and cut the power off so he could see her.
"Mother, Mother!" cried Achilles. "How long must I put up with
Agamemnon's high-handedness?"
Thetis took him by the hand and led him into the tent. "Is Patroclos
around?" she asked.
"No, he is having some fun with Iphis, that buxom beauty I gave him
after I conquered the city of Scyros."
"There's a sensible fellow," said Thetis. "Why don't you forget this
fuss with King Agamemnon and have fun with some rosy-cheeked
darling?" But a painful expression crossed her face as she said it.
Achilles did not notice the look. "I am too sick with humiliation and
disgust to take pleasure in anything. I am full up to here with being a
lion in the fighting and yet having to give that jackal Agamemnon the
lion's share of the loot, just because he has been chosen to be our
leader. Am I not a king in Thessaly? I wish—I wish—"
"Yes?" said Thetis eagerly. "Do you want to go home?"
"I should go home. Then the Greeks would wish they'd not allowed
Agamemnon to insult the best man among them."
"Oh, Achilles, say the word and I'll have you across the sea and in
your palace in an hour!" she said excitedly. She was thinking, The
Director will be furious if Achilles disappears, but he won't be able to
do anything about it. And the Script can be revised. Hector or
Odysseus or Paris can play the lead role.

"No," Achilles said. "I can't leave my men here. They'd say I had run
out on them, that I was a coward. And the Greeks would call me a
yellow dog. No, I'll allow no man to say that."
Thetis sighed and answered sadly, "Very well. What do you want me
to do?"
"Go ask Zeus if he will give Agamemnon so much trouble he'll come
crawling to me, begging for forgiveness and pleading for my help."
Thetis had to smile. The enormous egotism of the beautiful brute!
Taking it for granted that the Lord of Creation would bend the course
of events so Achilles could salvage his pride. Yet, she told herself, she
need not be surprised. He had taken it calmly enough the night she'd
appeared to him and told him that she was a goddess and his true
mother. He had always been convinced divine blood ran in his veins.
Was he not superior to all men? Was he not Achilles?
"I will go to Zeus," she said. "But what he will do, only he knows."
She reached up and pulled his head down to kiss him on the
forehead. She did not trust herself to touch the lips of this man who
was far more a man than those he supposed to be gods. The lips she
longed for ... the lips soon to grow cold. She could not bear to think
of it.
She flicked the switch to make her invisible and, after leaving the
tent, rose toward the ship. As always, it hung at four thousand feet
above the plain, hidden in the inflated plastic folds that simulated a
cloud. To the Greeks and Trojans the cloud was the home of Zeus,
anchored there so he could keep a close eye on the struggle below.
It was he who would decide whether the walls of Troy would stand or
fall. It was to him that both sides prayed.

The Director was drinking a highball in his office and working out the
details of tomorrow's shooting with his cameramen.
"We'll give that Greek Diomedes a real break, make him the big hero.
Get a lot of close-ups. He has a superb profile and a sort of flair
about him. It's all in the Script, what aristocrats he kills, how many
narrow escapes, and so on. But about noon, just before lunch, we'll
wound him. Not too badly, just enough to put him out of action. Then
we'll see if we can whip up a big tearjerker between that Trojan and
his wife—what's her name?"
He looked around as if he expected them to feed him the answer. But
they were silent; it was not wise to know more than he.
He snapped his fingers. "Andromache! That's it!"
"What a memory! How do you keep all those barbaric names at your
tongue's tip? Photographic!" and so on from the suckophants.
"O.K. So after Diomedes leaves the scene, you, Apollo, will put on a
simulacrum of Helenos, the Trojan prophet. As Helenos, you'll induce
Hector to go back to Troy and get his mother, the Queen, to pray for
victory. We can get some colorful shots of the temple and the local
religious rites. Meantime, we'll set up a touching domestic scene
between Hector and his wife. Bring in their baby boy. A baby's always
good for ohs and ahs. Later, after coffee break, we'll...."
Apollo drifted through the crowd toward the Director's wife. She was
sitting on a chair and moodily drinking. However, seeing Apollo, she
smiled with green-painted lips and said, "Do sit down, darling. You
needn't worry about my husband being angry because you're paying
attention to me. He's too busy shining down on his little satellites to
notice you."
Apollo seated himself in a chair facing her and moved forward so
their knees touched.
"What do you want now?" she said. "You only get lovey-dovey when
you're trying to get something out of me."
"You know I love only you, Hera," he said, grinning. "But I can't meet
you as often as I'd like. Old Thunder-and-Lightning is too suspicious.
And I value my job too much to risk it, despite my overwhelming
passion for you."
"Get to the point."
"We're way over our budget and past our deadline. The shooting
should have been finished six months ago. Yet Old Fussybritches
keeps on revising the Script and adding scene after scene. And that's
not all. We're not going home when Troy does fall. The Director is
planning to make a sequel. I know because he asked me to outline
the Script for it. He's got the male lead picked out. Foxy Grandpa
Odysseus."

Hera sat upright so violently she sloshed her drink over the edge of
her glass. "Why, my brother means to kill Odysseus at the first
opportunity! My brother is mad, absolutely mad about Athena, but he
can't get to first base with her. She's got eyes only for Odysseus,
though how she could take up with one of those stupid primitives, I'll
never understand."
"Athena claims he has an intelligence equal to any of us," said Apollo.
"However, it's not her but Thetis I meant to discuss."
"Is my stepdaughter interfering again?"
"I think so. Just before this conference I saw her coming out of the
Director's room, tears streaming from her big cow eyes. I imagine
she was begging him again to spare Achilles. Or at least to allow the
Trojans to win for a while so Agamemnon will give back to Achilles
the girl he took from him, that tasty little dish, Briseis."
"You ought to know how tasty she is," said Hera bitterly. "I happen to
know you drugged Achilles several nights in a row and then put on
his simulacrum."
"A handy little invention, that simulacrum," said Apollo. "Put one on
and you can look like anybody you want to look like. Your jealousy is
showing, Hera. However, that's not the point. If Thetis keeps playing
on her father's sympathies like an old flute, this production will last
forever. Frankly, I'd like to shake the dust of this crummy planet from
my feet, get back to civilization before it forgets what a great script
writer I am."
"What do you propose?"
"I propose to hurry things up. Eventually, Achilles is supposed to quit
sulking and take up arms again. So far, the Director has been
indefinite on how we'll get him to do that. Well, we'll help him
without his knowing it. We'll fix it so the Trojans will beat the Greeks
even worse than the Director intends. Hector will almost run them
back into the sea. Agamemnon will beg Achilles to get back into the
ring. He'll give him back the loot he took from him, including Briseis.
And he'll offer his own daughter in marriage to Achilles.
"Achilles will refuse. But we'll have him all set up for the next move.
Tonight a technician will implant a post-hypnotic suggestion in
Achilles that he send his buddy Patroclos, dressed in Achilles' armor,
out to scare the kilts off the Trojans. We'll generate a panic among
the Trojans with a subsonic projector. Then we'll arrange it so Hector
kills Patroclos. That is the one thing to make Achilles so fighting mad
he'll quit sulking...."
"Patroclos? But the Director wants to save him for the big scene
when Achilles is knocked off. Patroclos is supposed to put Achilles'
armor on, storm the Scaian gate, and lead the Greeks right into the
city."
"Accidents will happen," said Apollo. "Despite what the barbarians
think, we are not gods. Or are we? What do you say to my plan?"
"If the Director finds out we've tampered with the Script, he'll divorce
me. And you'll be blackballed in every studio from one end of the
Galaxy to the other."
Apollo winked and said, "I'll leave it to you to make Old Stupe think
Patroclos' death was his own idea. You have done something like that
before, and more than once."
She laughed and said, "Oh, Apollo, you're such a heel."
He rose. "Not a heel. Just a great script writer. Our plan will give me
a chance to kill Achilles much sooner than the Director expects. And
it'll all be for the good of the Script."

That night two technicians went into the Greek camp, one to Achilles'
tent and one to Agamemnon's. The technician assigned to the King of
Mycenae gave him a whiff of sleep gas and then taped two
electrodes to the royal forehead. It took him a minute to play a
recording and two to untape the electrodes and leave.
Five minutes later, the King awoke, shouting that Zeus had sent him a
dream in the shape of wise old Nestor. Nestor had told him to rouse
the camp and march forth even if it were only dawn, for today Troy
would fall and his brother Menelaos would get back his wife Helen.
Agamemnon, though, who had always been too clever for his own
good, told the council of elders that he wanted to test his army
before telling them the truth. He would announce that he was tired of
this war they could not win and that he wanted to go home. This
news would separate the slackers from the soldiers, his true friends
from the false.
Unfortunately, when he told this to the assemblage, he found far less
men of valor than he had expected. The entire army, with a few
exceptions, gave a big hurrah and stampeded toward the ships. They
had had a bellyful of this silly war, fighting to win back the beautiful
tart Helen for the King's brother, spilling their guts all over foreign
plains while their wives were undoubtedly playing them false with the
4-Fs, the fields were growing weeds, and their children were starving.
In vain, Agamemnon tried to stop the rush. He even shouted at them
what they had only guessed before, that more was at stake than his
brother's runaway wife. If Troy was crushed, the Greeks would own
the trading and colonizing routes to the rich Black Sea area. But no
one paid any attention to him. They were too concerned with
knocking each other over in their haste to get the ships ready to sail.
At this time, the only people from the spaceship on the scene were
some cameramen and technicians. They were paralyzed by the
unexpectedness of the situation, and they were afraid to use their
emotion-stimulating projectors. By the flick of a few switches the
panic could be turned into aggression. But it would have been
aggression without a leader. The Greeks, instead of automatically
turning to fight the Trojans, would have killed each other, sure that
their fellows were trying to stop them from embarking for home.
The technicians did not dare to waken the Director and acknowledge
they could not handle a simple mob scene. But one of them did put a
call through to one of the Director's daughters, Athena.
Athena zipped down to Odysseus and found him standing to one
side, looking glum. He had not panicked, but he also was not
interfering. Poor fellow, he longed to go home to Penelope. In the
beginning of this useless war, he had pretended madness to get out
of being drafted. But, once he had sworn loyalty to the King, he
would not abandon him.
Athena flicked off her light-bender so he could see her. She shouted,
"Odysseus, don't just stand there like a lump on a bog! Do something
or all will be lost—the war, the honor of the Greeks, the riches you
will get from the loot of Troy! Get going!"
Odysseus, never at a loss, tore the wand of authority from the King's
numbed hand and began to run through the crowd. Everybody he
met he reproached with cowardice, and backed the sting of his words
with the hard end of the wand on their backs. Athena signaled to the
technicians to project an aggression-stimulating frequency. Now that
the Greeks had a leader to channel their courage, they could be
diverted back to fighting.
There was only one obstacle, Thersites. He was a lame hunchback
with the face of a baboon and a disposition to match.
Thersites cried out in a hoarse, jeering voice, "Agamemnon, don't
you have enough loot? Do you still want us to die so you may gather
more gold and beautiful Trojan women in your greedy arms? You
Greeks, you're not men. You're women who will do anything this
disgrace to a crown tells you to do. Look what he did to Achilles.
Robbed him of Briseis and in so doing robbed us of the best warrior
we have. If I were Achilles, I'd knock Agamemnon's head off."
"We've put up with your outrageous abuse long enough!" shouted
Odysseus. He began thwacking Thersites on the head and the back
until blood ran. "Shut up or I'll kill you!"
At this the whole army, which hated Thersites, roared with laughter.
Odysseus had relieved the tension; now they were ready to march
under Agamemnon's orders.
Athena sighed with relief and radioed back to the ship that the
Director could be awakened. Things were well in hand.

And so they were—until a few days later when Apollo and Hera,
waiting until the Director had gone to bed early with a hangover from
the night before, induced Hector to make a night attack. The fighting
went on all night, and at dawn Patroclos ran into Achilles' tent.
"Terrible news!" he cried. "The Trojans have breached the walls
around our ships and are burning them! Diomedes, Agamemnon, and
Odysseus are wounded. If you do not lead your men against Hector,
all is lost!"
"Too bad," said Achilles. But the blood drained from his face.
"Don't be so hardhearted!" shouted Patroclos. "If you won't fight, at
least allow me to lead the Myrmidons against the enemy. Perhaps we
can save the ships and drive Hector off!"
Achilles shouted back, "Very well! You know I give you, my best
friend, anything you want. But I will not for all the gold in the world
serve under a king who robs me of prizes I took with my own sword.
However, I will give you my armor, and my men will march behind
you!"
Then, sobbing with rage and frustration, he helped Patroclos dress in
his armor.
"Do you see this little lever in the back of the shield?" he said. "When
an enemy strikes at you, flick it this way. The air in front of you will
become hard, and your foe's weapon will bounce off the air. Then,
before he recovers from his confusion, flick the lever the other way.
The air will soften and allow your spear to pass. And the spearpoint
will shear through his armor as if it were cheese left in the hot sun. It
is made of some substance harder than the hardest bronze made by
the hand of man."
"So this is the magic armor your divine mother, Thetis, gave you,"
said Patroclos. "No wonder—"
"Even without this magic—or force field, as Thetis calls it—I am the
best man among Greek or Trojan," said Achilles matter-of-factly.
"There! Now you are almost as magnificent as I am. Go forth in my
armor, Patroclos, and run the Trojans ragged. I will pray to Zeus that
you come back safely. There is one thing you must not do, though,
no matter how strong the temptation—do not chase the Trojans too
close to the city, even if you are on the heels of Hector himself. Thetis
has told me that Zeus does not want Troy to fall yet. If you were to
threaten it now, the gods would strike you down."
"I will remember," said Patroclos. He got into Achilles' chariot and
drove off proudly to take his place in front of the Myrmidons.

The Director was so red in the face, he looked as if his head were
one huge blood vessel.
"How in space did the Trojans get so far?" he screamed. "And what is
Patroclos doing in Achilles' armor? There's rank inefficiency here or
else skullduggery! Either one, heads will roll! And I think I know
whose! Apollo! Hera! What have you two been up to?"
"Why, Husband," said Hera, "how can you say I had anything to do
with this? You know how I hate the Trojans. As for Apollo, he thinks
too much of his job to go against the Script."
"All right, we'll see. We'll get to the bottom of this later. Meanwhile,
let's direct the situation so it'll end up conforming to the Script."
But before the cameramen and technicians could be organized,
Patroclos, leading the newly inspired Greeks, slaughtered the Trojans
as a lion kills sheep. He could not be stopped, and when he saw
Hector running away from him, he forgot his friend's warning and
pursued him to the walls of Troy.
"Follow me!" yelled Patroclos to the Greeks. "We will break down the
gates and take the city within an hour!"

It was then Apollo projected fury into Hector so that he turned to


battle the man he thought was Achilles. And Apollo, timing to
coincide with the instant that Patroclos flicked off his force field,
struck him a stunning blow from behind. At the same time a spear
thrown by a Trojan wounded Patroclos in the back. Dazed, hurt, the
Greek started back toward his men. But Hector ran up and stabbed
him through the belly, finding no resistance to his spear because
Patroclos had not turned the force field back on. Patroclos hit the
ground with a crash of armor.
"No, no, you fool, Apollo!" shouted the Director into the radio. "He
must not die! We need him later for the Script. You utter fool, you've
bumbled!"
Thetis, who had been standing behind the Director, burst into tears
and ran into her cabin.
"What's the matter with her?" asked the Director.
"You may as well know, darling," said Hera, "that your daughter is in
love with a barbarian."
"Thetis? In love with Patroclos? Impossible!"
Hera laughed and said, "Ask her how she feels about the planned
death of Achilles. That is whom she is weeping for, not Patroclos. She
foresees Achilles' death in his friend's. And I imagine she will go to
comfort her lover, knowing his grief when he hears that Patroclos is
dead."
"That's ridiculous! If she's in love with Achilles, why would she tell
Achilles she is his mother?"
"For the very reason she loves him but doesn't want him to know.
She at least has sense enough to realize no good could come from a
match with one of those Earth primitives. So she stopped any passes
from him with that maternal bit. If there is one thing the Greeks
respect, it is the incest taboo."
"I'll have him knocked off as soon as possible. Thetis might lose her
head and tell him the truth. Poor little girl, she's been away from
civilization too long. We'll have to wind up this picture and get back
to God's planet."
Hera watched him go after Thetis and then switched to a private
channel. "Apollo, the Director is very angry with you. But I've thought
of a way to smooth his feathers. We'll tell him that killing Patroclos
was the only way to get Achilles back into the fight. He'll like that.
Achilles can then be slain, and the picture will still be saved. Also, I'll
make him think it was his idea."
"That's great," replied Apollo, his voice shaky with dread of the
Director. "But what can we do to speed up the shooting? Patroclos
was supposed to take the city after Achilles was killed."
"Don't worry," said Athena, who had been standing behind Hera.
"Odysseus is your man. He's been working on a device to get into the
city. Barbarian or not, that fellow is the smartest I've ever met. Too
bad he's an Earthman."

During the next twenty-four hours, Thetis wept much. But she was
also very busy, working while she cried. She went to Hephaistos, the
chief technician, an old man of five thousand years. He loved Thetis
because she had intervened for Hephaistos more than once when her
father had been angry with him. Yet he shook his head when she
asked him if he could make Achilles another suit of armor, even more
invulnerable than the first.
"Not enough time. Achilles is to be killed tomorrow."
"No. My father has cooled off a little. He remembered that the Script
calls for Achilles to kill Hector before he himself dies. Besides, the
government anthropologist wants to take films of the funeral games
for Patroclos. And he overrules even Father, you know."
"That'll give me a week," said Hephaistos, figuring on his fingers. "I
can do it. But tell me, child, why all the tears? Is it true what they
say, that you love a barbarian, that magnificent red-haired Achilles?"
"I love him," she said, weeping again.
"Ah, child, you are a mere hundred years or so. When you reach my
age, you'll know that there are few things worth tears, and love
between man and woman is not one of them. However, I'll make the
armor. And its field of force will cover everything around him except
an opening to the outside air. Otherwise, he'd suffocate. But what
good will all this do? The Director will find some means of killing him.
And even if Achilles should escape, you'd be no better off."
"I will," she said. "We'll go to Italy—and I'll give him perpetuol."
Thetis went to her cabin. Shortly afterward, the doorbell rang. She
opened the door and saw Apollo.
Smiling, he said, "I have something here you might be interested in
hearing." He held in his hand a small cartridge.
Seeing it, her eyes widened in surprise.
"Yes, it's a recording," he said, and he pushed past her into the room.
"Let me put it in your playback."
"You don't have to," she replied. "I presume you had a microphone
planted in Hephaistos' cabin?"
"Correct. Won't your father be angry if somebody sends him a note
telling him you're planning to ruin the Script by running off to Italy
with a barbarian? And not only that but inject perpetuol into the
barbarian to increase his life span? Personally, if I were your father,
I'd let you do it. You'd soon grow sick of your handsome but uncouth
booby."
Thetis did not answer.
"I really don't care," he said. "In fact, I'll help you. I can arrange it so
the arrow that hits Achilles' heel will be a trick one. Its head will just
seem to sink into his flesh. Inside it will be a needle that will inject a
cataleptic agent. Achilles will seem to be dead but will actually be in a
state of suspended animation. We'll sneak his body at night from the
funeral pyre and substitute a corpse. A bio-tech who owes me a favor
will fix up the face of a dead Trojan or Greek to look like Achilles'.
When this epic is done and we're ready to leave Earth, you can run
away. We'll not miss you until we're light-years away."
"And what do you want in return for arranging all this? My thanks?"
"I want you."
Thetis flinched. For a moment she stood with her eyes closed and her
hands clenched. Then, opening her eyes, she said, "All right. I know
that is the only way open for me. It's also the only way you could
have devised to have me. But I want to tell you that I loathe and
despise you. And I'll be hating every atom of your flesh while you're
in possession of mine."
He chuckled and said, "I know it. But your hate will only make me
relish you the more. It'll be the sauce on the salad."
"Oh, you heel!" she said in a trembling voice. "You dirty, sneaking,
miserable, slimy heel!"
"Agreed." He picked up a bottle and poured two drinks. "Shall we
toast to that?"

Hector's death happened, as planned, and the tear-jerking scene in


which his father, King Priam, came to beg his son's body from
Achilles. Four days later, Achilles led the attack on the Scaian gate. It
was arranged that Paris should be standing on the wall above the
gate. Apollo, invisible behind him, would shoot the arrow that would
strike Achilles' foot if Paris' arrow bounced off the force field.
Apollo spoke to Thetis, who was standing beside him. "You seem very
nervous. Don't worry. You'll see your lovely warrior in Italy in a few
weeks. And you can explain to him that you aren't his mother, that
you had to tell him that to protect him from the god Apollo's jealousy.
But now that Zeus has raised him from the dead, you have been
given to him as a special favor. And all will end happily. That is, until
living with him will become so unbearable you'd give a thousand
years off your life to leave this planet. Then, of course, it'll be too
late. There won't be another ship along for several millennia."
"Shut up," she said. "I know what I'm doing."
"So do I," he said. "Ah, here comes the great hero Achilles, chasing a
poor Trojan whom he plans to slaughter. We'll see about that."
He lifted the airgun in whose barrel lay the long dart with the trick
head. He took careful aim, saying, "I'll wait until he goes to throw his
spear. His force field will be off.... Now!"
Thetis gave a strangled cry. Achilles, the arrow sticking from the
tendon just above the heel, had toppled backward from the chariot
onto the plain, where dust settled on his shining armor. He lay
motionless.
"Oh, that was an awful fall," she moaned. "Perhaps he broke his
neck. I'd better go down there and see if he's all right."
"Don't bother," said Apollo. "He's dead."
Thetis looked at him with wide brown eyes set in a gray face.
"I put poison on the needle," said Apollo, smiling crookedly at her.
"That was my idea, but your father approved of it. He said I'd
redeemed my blunder in killing Patroclos by telling him what you
planned. Of course, I didn't inform him of the means you took to
insure that I would carry out my bargain with you. I was afraid your
father would have been very shocked to hear of your immoral
behavior."
Thetis choked out, "You unspeakable ... vicious ... vicious ... you ...
you...."
"Dry your pretty tears," said Apollo. "It's all for your own good. And
for Achilles', too. The story of his brief but glorious life will be a
legend among his people. And out in the Galaxy the movie based on
his career will become the most stupendous epic ever seen."

Apollo was right. Four thousand years later, it was still a tremendous
box-office attraction. There was talk that now that Earth was civilized
enough to have space travel, it might even be shown there.
*** END OF THE PROJECT GUTENBERG EBOOK HEEL ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1

You might also like