🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.vms
Article #15843

The Minimum You Need to Know to Be an OpenVMS Application Developer

#15843
From: David Turner, Island Computers U...
Date: Thu, 23 Mar 2006 18:11
276 lines
15361 bytes
The Minimum You Need to Know to Be an OpenVMS Application Developer"
ISBN 0-9770866-0-7

Available at http://www.islandco.com/theminimum.html

    For years now the question has been surfacing in the OpenVMS community
"Where are the
pimply faced kids?"  The other situation which seems to continually occur is
a developer of one
language suddenly finding themselves having to modify or maintain an
application written in a
language completely foreign to them.

    This book was a year long effort to answer both of those questions.  It
also should help those
developers from lesser platforms get up to speed when they now have to work
on a good
platform.  Once the rudimentaries of logging in, symbols, logicals and the
various editors are
handled this book takes the reader on a journey of development using the
most common tools
encountered on the OpenVMS platform and one new tool making headway.

    A single sample application (a lottery tracking system) is developed
using FMS and RMS
indexed files in each of the covered languages.  (BASIC, FORTRAN, COBOL and
C/C++).  The
reader is exposed on how to use CDD, CMS and MMS with these languages as
well.  A CD-
ROM is included which contains the source, MMS and command files developed
through the
course of the book.

    Once RMS has been covered with all of the languages the same application
using MySQL
with C and FMS is covered.  This breaks readers into the use of relational
databases if they are
not currently familiar with the concept.

    Rounding out the technical portion of the book is the same application
using RDB with FMS.
While source code is provided for all of the language implementations only
FORTRAN and
COBOL are actually covered in the text.

    It is the hope of the author that this book will prove a useful
reference on the desk of every
OpenVMS developer.  The inclusion of MySQL should benefit both those
unfamiliar with
relational technology and those platform veterans interested in playing with
MySQL for the first
time.

For those who judge a book by its table of contents:
Introduction . . . . . . . . . . . . . . . . . . . . . . . . .I-1
     I.1 Purpose of This Book. . . . . . . . . . . . . . . . .I-1
     I.2 What You Need to Know to Read This Book . . . . . . .I-1
     I.3 Who Should Read This Book . . . . . . . . . . . . . .I-1
     I.4 How to Read This Book . . . . . . . . . . . . . . . .I-2
     I.5 Our Sample Application. . . . . . . . . . . . . . . .I-2
     I.6 Why OpenVMS?. . . . . . . . . . . . . . . . . . . . .I-4
     I.7 The Definition of Application . . . . . . . . . . . .I-5

Chapter 1
Fundamentals of OpenVMS. . . . . . . . . . . . . . . . . . . .1-1
     1.1 Hardware. . . . . . . . . . . . . . . . . . . . . . .1-1
     1.2 Logging In. . . . . . . . . . . . . . . . . . . . . .1-3
     1.3 Symbols . . . . . . . . . . . . . . . . . . . . . . .1-5
     1.4 Editor Choices. . . . . . . . . . . . . . . . . . . .1-9
     1.5 EDT Exercises . . . . . . . . . . . . . . . . . . . 1-14
     1.6 TPU  and EVE Configuration. . . . . . . . . . . . . 1-18
     1.7 LSE . . . . . . . . . . . . . . . . . . . . . . . . 1-20
     1.8 Logicals. . . . . . . . . . . . . . . . . . . . . . 1-21
     1.9 ACLs and the UAF. . . . . . . . . . . . . . . . . . 1-28
     1.10 Logical Name Tables. . . . . . . . . . . . . . . . 1-38
     1.11 Foreign Commands . . . . . . . . . . . . . . . . . 1-40
     1.12 Exercises. . . . . . . . . . . . . . . . . . . . . 1-41

Chapter 2
DCL and Utilities We Need. . . . . . . . . . . . . . . . . . .2-1
     2.1 DCL for Application Development . . . . . . . . . . .2-1
     2.2 FDL and Our Indexed Files . . . . . . . . . . . . . .2-1
     2.3 Indexed File Lore . . . . . . . . . . . . . . . . . .2-5
     2.4 Lexical Functions . . . . . . . . . . . . . . . . . 2-12
     2.5 The Import Program. . . . . . . . . . . . . . . . . 2-14
     2.6 Exercises . . . . . . . . . . . . . . . . . . . . . 2-20

Chapter 3
DEC BASIC. . . . . . . . . . . . . . . . . . . . . . . . . . .3-1
     3.1 Goals . . . . . . . . . . . . . . . . . . . . . . . .3-1
     3.2 Language Data Types . . . . . . . . . . . . . . . . .3-1
     3.3 Magic Numbers . . . . . . . . . . . . . . . . . . . .3-3
     3.4 Group vs. Record. . . . . . . . . . . . . . . . . . .3-6
     3.5 Creating Our Statistics Files . . . . . . . . . . . .3-7
     3.6 Data File Reporting . . . . . . . . . . . . . . . . 3-21
     3.7 Other BASIC Language Features . . . . . . . . . . . 3-28
     3.8 BASIC Features to Never Use . . . . . . . . . . . . 3-33
     3.9 The Zero Element. . . . . . . . . . . . . . . . . . 3-34
     3.10 Where Do We Go From Here?. . . . . . . . . . . . . 3-35
     3.11 Exercises. . . . . . . . . . . . . . . . . . . . . 3-35

Chapter 4
FMS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-1
     4.1 What is FMS?. . . . . . . . . . . . . . . . . . . . .4-1
     4.2 Creating a Data Entry Screen in FMS . . . . . . . . .4-2
     4.3 FMS Object vs. Library. . . . . . . . . . . . . . . .4-5
     4.4 Stand Alone Data Entry. . . . . . . . . . . . . . . .4-6
     4.5 An FMS Browse Program . . . . . . . . . . . . . . . 4-20
     4.6  An FMS Menu. . . . . . . . . . . . . . . . . . . . 4-27
     4.7 FMS Functions to Never Use. . . . . . . . . . . . . 4-38
     4.8 FMS Summary . . . . . . . . . . . . . . . . . . . . 4-38
     4.9 FMS Function and Subroutine Summary . . . . . . . . 4-39
     4.10 Exercises. . . . . . . . . . . . . . . . . . . . . 4-53

Chapter 5
CMS Theory and Practice. . . . . . . . . . . . . . . . . . . .5-1
     5.1 Code Management System. . . . . . . . . . . . . . . .5-1
     5.2 Logical Environment for CMS Based Development . . . .5-1
     5.3 Creating Our CMS Library. . . . . . . . . . . . . . .5-9
     5.4 Putting Our Application in the Library. . . . . . . 5-10
     5.5 Deleting an Element From the Library. . . . . . . . 5-11
     5.6 Classes and Deletions . . . . . . . . . . . . . . . 5-12
     5.7 Modifying Elements Once They Are in CMS . . . . . . 5-12
     5.8 Productionizing the Application . . . . . . . . . . 5-13
     5.9 Legacy Build Procedure. . . . . . . . . . . . . . . 5-16
     5.10 Additional CMS Commands. . . . . . . . . . . . . . 5-18
     5.11 Promotion Between Libraries. . . . . . . . . . . . 5-20
     5.12 Exercises. . . . . . . . . . . . . . . . . . . . . 5-29

Chapter 6
CDD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-1
     6.1 What is CDD?. . . . . . . . . . . . . . . . . . . . .6-1
     6.2 Some Definitions You Need to Know . . . . . . . . . .6-2
     6.3 The Different Camps of CDD Configuration. . . . . . .6-3
     6.4 Creating a Repository . . . . . . . . . . . . . . . .6-5
     6.5 Defining Our Logicals and Directories . . . . . . . .6-6
     6.6 Creating Our Fields and Records . . . . . . . . . . .6-8
     6.7 Converting Our Include File . . . . . . . . . . . . 6-12
     6.8 Using Variants and Dates. . . . . . . . . . . . . . 6-14
     6.9 Nuking the CDD. . . . . . . . . . . . . . . . . . . 6-20
     6.10 Full Build Modification. . . . . . . . . . . . . . 6-22
     6.11 CDD Usage Summary. . . . . . . . . . . . . . . . . 6-24
     6.12 Mass Changes Due to CDD. . . . . . . . . . . . . . 6-24
     6.13 Exercises. . . . . . . . . . . . . . . . . . . . . 6-29






Chapter 7
Object and Text Libraries. . . . . . . . . . . . . . . . . . .7-1
     7.1 What We Know About Libraries So Far . . . . . . . . .7-1
     7.2 Application Logicals We Need. . . . . . . . . . . . .7-2
     7.3 Creating Our Text Library . . . . . . . . . . . . . .7-2
     7.4 Converting Our Application to a Single EXE. . . . . .7-3
     7.5 Programming Assignment. . . . . . . . . . . . . . . 7-23
     7.6 Exercises . . . . . . . . . . . . . . . . . . . . . 7-24

Chapter 8
MMS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-1
     8.1 The Purpose of MMS. . . . . . . . . . . . . . . . . .8-1
     8.2 The Correct Way to Use MMS. . . . . . . . . . . . . .8-1
     8.3 Putting It All Together . . . . . . . . . . . . . . .8-8
     8.4 Exercises . . . . . . . . . . . . . . . . . . . . . 8-12

Chapter 9
Message Utility, Mail and Phone. . . . . . . . . . . . . . . .9-1
     9.1 Message File Definition . . . . . . . . . . . . . . .9-1
     9.2 VMSMAIL Overview. . . . . . . . . . . . . . . . . . .9-2
     9.3 Sending Mail From Inside Server Applications. . . . .9-5
     9.4 Programming Assignment. . . . . . . . . . . . . . . 9-10
     9.5 VMSPhone Overview . . . . . . . . . . . . . . . . . 9-10
     9.6 Creating Your Own Messages. . . . . . . . . . . . . 9-12
     9.7 Testing Your Messages . . . . . . . . . . . . . . . 9-14
     9.8 Programming Assignment 2. . . . . . . . . . . . . . 9-21
     9.9 Exercises . . . . . . . . . . . . . . . . . . . . . 9-21

Chapter 10
     FORTRAN. . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1
     10.1 Yes, It's Still Out There. . . . . . . . . . . . . 10-1
     10.2 Basics of Fortran. . . . . . . . . . . . . . . . . 10-2
     10.3 Our Sample Application . . . . . . . . . . . . . . 10-7
     10.4 Programming Assignment 1 . . . . . . . . . . . . .10-53
     10.5 Using Message Files. . . . . . . . . . . . . . . .10-53
     10.6 Our Quadword Example . . . . . . . . . . . . . . .10-54
     10.7 Sending Mail . . . . . . . . . . . . . . . . . . .10-56
     10.8 Programming Assignment 2 . . . . . . . . . . . . .10-60
     10.9 Exercises. . . . . . . . . . . . . . . . . . . . .10-60

Chapter 11
COBOL. . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1
     11.1 Overview . . . . . . . . . . . . . . . . . . . . . 11-1
     11.2 Interview Questions That Are Red Flags . . . . . . 11-2
     11.3 The Myth of the COBOL SORT Verb. . . . . . . . . . 11-4
     11.4 The DCL SORT Command . . . . . . . . . . . . . . . 11-4
     11.5 Our Sample Application . . . . . . . . . . . . . . 11-6
     11.6 Programming Assignment . . . . . . . . . . . . . .11-58
     11.7 The Rest of the Language . . . . . . . . . . . . .11-59
     11.8 Our Quadword Example . . . . . . . . . . . . . . .11-61
     11.9 Sending Mail . . . . . . . . . . . . . . . . . . .11-62
     11.10 Programming Assignment 2. . . . . . . . . . . . .11-67
     11.11 Exercises . . . . . . . . . . . . . . . . . . . .11-68

Chapter 12
C/C++. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1
     12.1 Overview . . . . . . . . . . . . . . . . . . . . . 12-1
     12.2 Some Differences on OpenVMS. . . . . . . . . . . . 12-6
     12.3 Our Sample Application in C. . . . . . . . . . . . 12-9
     12.4 C++ Philosophy and Terminology . . . . . . . . . .12-69
     12.5 Our Sample Application in C++. . . . . . . . . . .12-71
     12.6 C/C++ Follow Up. . . . . . . . . . . . . . . . . 12-139
     12.7 Debugging Notes for C/C++. . . . . . . . . . . . 12-146
     12.8 Sending Mail . . . . . . . . . . . . . . . . . . 12-147
     12.9 D_FLOAT Example. . . . . . . . . . . . . . . . . 12-152
     12.10 Programming Assignments . . . . . . . . . . . . 12-156
     12.11 Exercises . . . . . . . . . . . . . . . . . . . 12-156

Chapter 13
MySQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1
     13.1 Why MySQL? . . . . . . . . . . . . . . . . . . . . 13-1
     13.2 Getting and Installing MySQL . . . . . . . . . . . 13-4
     13.3 Our Application Database . . . . . . . . . . . . . 13-9
     13.4 Creating the Tables. . . . . . . . . . . . . . . .13-10
     13.5 Compiling and Linking With MySQL . . . . . . . . .13-13
     13.6 Our Sample Application . . . . . . . . . . . . . .13-17
     13.7 MySQL Follow-up. . . . . . . . . . . . . . . . . .13-65
     13.8 Programming Assignments. . . . . . . . . . . . . .13-67
     13.9 Exercises. . . . . . . . . . . . . . . . . . . . .13-69

Chapter 14
RDB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-1
     14.1 Why RDB? . . . . . . . . . . . . . . . . . . . . . 14-1
     14.2 What's in the Book and What's on Disk. . . . . . . 14-4
     14.3 Table and Database Definitions . . . . . . . . . . 14-5
     14.4 The Drawbacks. . . . . . . . . . . . . . . . . . .14-14
     14.5 Our SQLMOD Implementation. . . . . . . . . . . . .14-15
     14.6 Programming Assignment 1 . . . . . . . . . . . . .14-29
     14.7 SQLMOD Follow Up . . . . . . . . . . . . . . . . .14-37
     14.8 EXEC SQL Implementation. . . . . . . . . . . . . .14-38
     14.9 RDB Follow Up. . . . . . . . . . . . . . . . . . .14-54
     14.10 Programming Assignment 2. . . . . . . . . . . . .14-55
     14.11 Exercises . . . . . . . . . . . . . . . . . . . .14-55





Chapter 15
Ruminations and Observations . . . . . . . . . . . . . . . . 15-1
     15.1 Overview . . . . . . . . . . . . . . . . . . . . . 15-1
     15.2 What Do You Do?. . . . . . . . . . . . . . . . . . 15-1
     15.3 Keep Your Eye on the Sparrow . . . . . . . . . . . 15-5
     15.4 Have You Ever Wondered Why Y2K Happened? . . . . . 15-6
     15.5 Optimal Technology . . . . . . . . . . . . . . . . 15-9
     15.6 The Self-Defeating Business Model. . . . . . . . .15-11
     15.7 Offshore Computing - The Death Knell of IT in the U.S. 15-14
     15.8 Avoiding a Hell-Hole . . . . . . . . . . . . . . .15-17



-- 

David B Turner
Island Computers US Corp
2700 Gregory St, Suite 180
Savannah GA 31404
Tel: 912 447 6622 X201
Cell: 912 447 6622 X252
Fax: 912 201 0402
Email: dbturner@icusc.com
Web: http://www.islandco.com
=====================================
All orders are subject to the following terms and conditions
of sale. These should be read before ordering.
http://www.islandco.com/warranty.html
Technical Details
Message-ID: <JuBUf.747$yn4.684@bignews7.bellsouth.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!bigfeed2.bellsouth.net!bigfeed.bellsouth.net!bignumber.bellsouth.net!news.bellsouth.net!bignews7.bellsouth.net.POSTED!496e0a1a!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f7344,a423e09250cec1b9,start
X-Google-Thread: 1164f8,a423e09250cec1b9,start
X-Google-Thread: 1094ae,a423e09250cec1b9,start
X-Google-Thread: fcd99,a423e09250cec1b9,start
X-Google-Thread: 111c93,a423e09250cec1b9,start
X-Google-Attributes: gidf7344,gid1164f8,gid1094ae,gidfcd99,gid111c93,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!bigfeed2.bellsouth.net!bigfeed.bellsouth.net!bignumber.bellsouth.net!news.bellsouth.net!bignews7.bellsouth.net.POSTED!496e0a1a!not-for-mail
From: "David Turner, Island Computers US Corp" <dbturner@icusc.com>
Newsgroups: comp.os.vms,comp.sys.dec,de.comp.os.vms,fr.comp.os.vms,comp.os.linux.alpha
Subject: The Minimum You Need to Know to Be an OpenVMS Application Developer
Lines: 278
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Message-ID: <JuBUf.747$yn4.684@bignews7.bellsouth.net>
X-Complaints-To: abuse@bellsouth.net
X-Abuse-Info: Please forward a copy of all headers for proper handling
X-Trace: enggpaojkliedbjjdbdpiflmbcekedmfhojhikkbagflhcbopemglkmlmnomlofiobiflbnphkimilonipipnpopiheaokkpppaimpifmkcegckdnomfelohmhimpblmhfmffopebmdiljgefhnnlojlkbmffbff
NNTP-Posting-Date: Thu, 23 Mar 2006 13:08:41 EST
Organization: BellSouth Internet Group
Date: Thu, 23 Mar 2006 13:11:48 -0500