HP3000-L Archives

November 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Costas Anastassiades <[log in to unmask]>
Reply To:
Costas Anastassiades <[log in to unmask]>
Date:
Thu, 6 Nov 1997 12:55:52 +-200
Content-Type:
text/plain
Parts/Attachments:
text/plain (76 lines)
We, and I believe many many others, have lots of Transact programs.We have
about 400,000 lines of Transact code in about 350 programs, which cover
everything from R&D BOMs to MRP and invoicing. We are trying not to develop
any more new stuff, but are still writing plenty of "new feature" code.
"We" is a two man team which handle everything from analysis and coding to
DBA and the "tricky users". The team is complimented by a sysadmin and two
more people who handle the day to day tasks and users.
There is no shame in using efficient, reliable, stable, no frills tools and
I believe Transact is definitely one of them.

Anyway, back to your question.

You can remove the repeated code from the programs and place it "as is" in
separate ASCII files. You then use the !INCLUDE compiler command to include
it at compile time.

About half our programs are on-line and we use the following methodology:
-Write the program as if it where a stand alone program
-Compile it into a Rellocatable or Executable Library
-Include all the CALL program commands into a main "menu" program
-Compile the menu program declaring the Relocatable Library at compile time
OR run the menu program declaring the Executable Library at run time.
Compiling with the Relocatable Library means slow compilations, larger
object file, better run time performance. Using an Executable Library is
the opposite.

About passing parameters. Programs that need to pass info to each other
have a common portion of the List register. The DATA option on the CALL
command specifies the first item whose value will be passed. The values of
all the following items in the calling programs list will passed and mapped
to whatever item is in the called programs list (so it's important to
always INIT them).

Example :

<< Common List Items saved in filename COMLIST.INCLUDE >>
VariableA:
VariableB:
VariableC:
VariableD:
<< End Of Common List Items >>

SYSTEM MainProg;

LIST
!INCLUDE(COMLIST.INCLUDE)
other variables used only locally,      INIT;

LET (VariableA) = 10;
LET (VariableB) = 20;
LET (VariableC) = 30;
LET (VariableD) = 40;

CALL CalledProg, DATA=VariableA;
EXIT;

SYSTEM CalledProg;

LIST
!INCLUDE(COMLIST.INCLUDE)
other variables used only locally,      INIT;

DISPLAY VariableA;
DISPLAY VariableB;
DISPLAY VariableC;
DISPLAY VariableD;

EXIT;

I've only mentioned what is realy familiar to me as this is how we achieve
what I think you are attempting. We inherited a very early version of
todays system and have never attempted to change this philosophy.

There are other ways and PROC is one of them. However we only use PROC to
call INTRINSICS.

ATOM RSS1 RSS2