MMCC MASTHEAD
Mid-Michigan Computer Consultants - Bay City, Michigan
 


CONTENTS       (old style)
Mid-Michigan Computer Consultants
509 Center
Bay City, Michigan

Sales (989) 892-9242
Support (989) 686-8860

Plb-0100.cfm v1.0


plb-t010.cfm
 

ANSI Standard PL/B Language and Visual PL/B

MMCC Programming Standards

NOTE TO OUR READERS
This web resource is written for our own use. But we feel strongly that the PL/B language should be shared with the software community. So feel free to use this at will! BUT PLEASE... if you find errors or omissions or have a better way to do something. TELL US! Dialog helps us all. Send e-mail to: support@mmcctech.com


Back to Standards Index

PL/B PROGRAM ORGANIZATION

Every MMCC program has a similar organization. Understanding this general consistency makes it easier to maintain programs that one is not familiar with or has not worked on in years.

The standards now in use have been used since the early 1980's. Every effort has been made to insure that old programs do not break as new standards are added. That has the less desirable effect of sometimes making new programs look archaic or causing them to use an older form that could be done better with newer forms. We accept that as a necessary evil.

This article includes the following topics:

PROGRAM STRUCTURE



The typical MMCC PL/B program organization is:
..........................................
. program name                          date written
.
.   general description of what it does
.
TRAPTIME    EQU  0               General EQU's for special routines.
OLDSTUFF    EQU  0               (more described below)
GHCCOMMON   EQU  0
.
         INCLUDE Z:COMMON        Standard include units
         INCLUDE REVISION.DBS    (more described below)
         INCLUDE PLBEQU.INC
         INCLUDE PLBMETH.INC
         INCLUDE Z:PRINT-WK
.
Local "working storage" items and variables
.
MAIN_FORM  PLFORM   xxxxxx
... other plforms here
.
ALIO     EQU    0                 File equate list
CFIO     EQU     1                (more described below)
HCIO     EQU      2
XCIO     EQU       3
.
         INCLUDE  xxxxIOFD.pls    File descriptions for ALL files
. 
         INCLUDE  Z:DATEGREG      Date routines
. 
         INCLUDE  xxxxOPEN        file opening routines
.
.......................
.        Program initialization
         Mainline
             calls to processing sub-routines
         end of job wrapup
         MOVE     CURRPROG, PRIORPG
         MOVE     NEXTPROT, CURRPROG
         CHAIN    CURRPROG
.
.......................
.
         Processing sub-routines
.
.......................
.
         INCLUDE  xxxxIO.pls      standard I/O routines
         INCLUDE  Z:TRAPNEW.PLS    
         INCLUDE  Z:GO-SLOW.PLS
         INCLUDE   xxxx           other general purpose routines.
.
.......................
.pagehead
         INCLUDE  Z:PRINT-DO
....     program specific page headings
         RETURN
.
.......................
.
print_do_trailer
....     program specific page bottom if needed
         RETURN
Each of the above items is defined below.




Back to Standards Index

STANDARD INCLUDE MODULES

FIELD NAME CONVENTIONS




v1.10

Write to MMCC Technical Support at:               Send e-mail to MMCC.
MMCC - Technical Support
600 W. Midland
Bay City, MI 48708
(989) 686-8860
© 1997 - 2024 MMCC - All Rights Reserved