RE: [U2] INCLUDE weirdo

2008-03-10 Thread Charles_Shaffer
You think that's old.  When I started out, all we had were sticks and 
stone knives to cut notches in them.

You do realise that you are showing U2 to be a sport of the pre-historic?

My first experience with computers was paper tape. 
Version control was performed with a pencil on the leader of the tape.

How many remember punch cards. 

How about a half a day turnaround to see if your program compiled?
And the fun task of reading core dumps.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation




Dennis Bartlett [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
03/08/2008 03:21 AM
Please respond to u2-users

 
To: u2-users@listserver.u2ug.org
cc: 
Subject:RE: [U2] INCLUDE weirdo


You do realise that you are showing U2 to be a sport of the pre-historic?

My first experience with computers was paper tape. 
Version control was performed with a pencil on the leader of the tape.

How many remember punch cards. 

How about a half a day turnaround to see if your program compiled?
And the fun task of reading core dumps.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

This email was Anti Virus checked by Astaro Security Gateway. 
http://www.astaro.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-10 Thread Tim Stokes
I would not say pre-historic. Those items mentioned are not that far
removed. 
Remember how quickly vinyl left the shelves when CDs came into being. 

You do realize that you are showing U2 to be a sport of the
pre-historic?

/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-08 Thread Dennis Bartlett
You do realise that you are showing U2 to be a sport of the pre-historic?

My first experience with computers was paper tape. 
Version control was performed with a pencil on the leader of the tape.

How many remember punch cards. 

How about a half a day turnaround to see if your program compiled?
And the fun task of reading core dumps.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-07 Thread Dennis Bartlett
Welll

I use Notepad++ to edit, on a LIVE system, making every error instantly
visible in 11 branches across a 300km range...

yes, of course I'm using version control, its called panic 101, aka The
Fire Station...


Rex Gozar WROTE:

You ARE using source code control tools (i.e. not home grown procedures), 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-07 Thread Rex Gozar

Dennis,

I've started to document the steps I've taken to cleanup bad code.  You 
or anyone else interested can read them at:


http://www.pickwiki.com/cgi-bin/wiki.pl?Project_Cleansweep

I'm not done since there is a lot to cover.  I hope to add more over the 
next few weeks.


rex

Dennis Bartlett wrote:

Welll

I use Notepad++ to edit, on a LIVE system, making every error instantly
visible in 11 branches across a 300km range...

yes, of course I'm using version control, its called panic 101, aka The
Fire Station...


Rex Gozar WROTE:

You ARE using source code control tools (i.e. not home grown procedures), 

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-07 Thread Jerry Banker
All I can say is, you must have a lot of free time. I sometimes have
three or four projects going at the same time while also making bug
fixes, helping users, managing the database, making minor changes to
programs, and helping to train a new programmer. Some of our code is
close to 20 years old. When I find free time to work on an older program
I might get enough time to restructure the goto's out of it and I feel
like I've accomplished something. There are three of us now, at one time
we had 5.

Jerry Banker

 -Original Message-
 From: Rex Gozar [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 07, 2008 8:16 AM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] INCLUDE weirdo
 
 Dennis,
 
 I've started to document the steps I've taken to cleanup bad code.
You
 or anyone else interested can read them at:
 
 http://www.pickwiki.com/cgi-bin/wiki.pl?Project_Cleansweep
 
 I'm not done since there is a lot to cover.  I hope to add more over
 the
 next few weeks.
 
 rex
 
 Dennis Bartlett wrote:
  Welll
 
  I use Notepad++ to edit, on a LIVE system, making every error
 instantly
  visible in 11 branches across a 300km range...
 
  yes, of course I'm using version control, its called panic 101,
aka
 The
  Fire Station...
 
 
  Rex Gozar WROTE:
 
  You ARE using source code control tools (i.e. not home grown
 procedures),
  ---
  u2-users mailing list
  u2-users@listserver.u2ug.org
  To unsubscribe please visit http://listserver.u2ug.org/
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-07 Thread Brian Leach
 All I can say is, you must have a lot of free time. 

I'm reminded of the old saying  - if you want something doing, ask the
busiest person.

Brian
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-07 Thread Louie Bergsagel
With more than 25 years in IT, this is what I have learned:

*People remember quick for a day; they remember dirty forever.*


   - When I talked to a former CIO about quality and documentation, he
   said management expects best practices, and it is up to us programmers to
   deliver them.


   - We need to quit saying we can get it done quick in a day when it
   is a week-long job.


   - I have noticed that some programmers inflate their estimates by 10
   times, just so they will look good finishing early.  We have to be accurate,
   without lying.


   - Companies need to establish a threshold to determine when an
   application needs to be rewritten. This could be n years old or n
   modifications or when the program is unreadable.


   - The best IT practices I've seen include:
  - Coding standards (e.g. using loop/repeat instead of for/next)
  - Syntax standards (e.g. using @true and @false instead of 1 and
  0)
  - Everybody uses the same case: UPPER, lower, or Mixed.
  - peer review for coding and syntax compliance (this really
  doesn't take long)
  - operations and user review of documentation BEFORE a program
  is installed.
  - programs are never installed on Friday.

We have many members and companies that have established excellent best
practices. It would be nice to have them on the U2UG wiki.

-- Louie in Seattle
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-07 Thread Rex Gozar

Jerry,

Doing this kind of stuff doesn't take a lot of time; *learning* what to 
do and how to do it takes a whole lot more.  Your programmers have 
probably already lost more productive hours than it takes to clean the 
trash up.  You'll also spot bugs a whole lot faster, furthering your 
productivity and reducing IT costs.


rex

Jerry Banker wrote:

All I can say is, you must have a lot of free time...

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-07 Thread Tim Stokes
We must remember that programming and computers in general has changed
much since the beginning.
How many remember punch cards. 

Can programmers today relate to a time when programmers submitted there
code to be placed on punched cards? 

How about a half a day turnaround to see if your program compiled? And
the fun task of reading core dumps.

There are many factors to consider.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-07 Thread Jerry Banker
Or listening to the core play their favorite song on the transistor
radio placed on top of the memory subsystem. :)

Jerry Banker


 -Original Message-
 From: Tim Stokes [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 07, 2008 2:47 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] INCLUDE weirdo
 
 We must remember that programming and computers in general has changed
 much since the beginning.
 How many remember punch cards.
 
 Can programmers today relate to a time when programmers submitted
there
 code to be placed on punched cards?
 
 How about a half a day turnaround to see if your program compiled? And
 the fun task of reading core dumps.
 
 There are many factors to consider.
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-07 Thread Norman Morgan
 We must remember that programming and computers in general 
 has changed much since the beginning.

 How many remember punch cards.
 Can programmers today relate to a time when programmers submitted
 their code to be placed on punched cards?

Sure can.  I usually had to do my own keypunching, especially when
working late.  Wish I had a buck for every time a compile failed
because I absent-mindedly stuck the old card back in the deck and
threw away the new one.

 And the fun task of reading core dumps.

All I can say is, you have a strange notion of fun.

As long as we are waxing nostalgic, how about old-master, new-master
update processing on sequential files?  Or the ear-splitting sound of
old line printers with the cover open?  The unique sound of a 1403-N1
printing a barber-pole test pattern?

I don't miss the good old days at all.

===
Norman Morgan  [EMAIL PROTECTED]  http://www.brake.com
===
When you do a good deed, get a receipt, 
just in case heaven is like the IRS 
===
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-07 Thread David Murray
Oh, the good old days...

My first experience with computers was paper tape. Version control was
performed with a pencil on the leader of the tape.

I do miss the flashy lights though...

Cheers,

David Murray


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Stokes
Sent: Friday, March 07, 2008 3:47 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] INCLUDE weirdo

We must remember that programming and computers in general has changed much
since the beginning.
How many remember punch cards. 

Can programmers today relate to a time when programmers submitted there code
to be placed on punched cards? 

How about a half a day turnaround to see if your program compiled? And the
fun task of reading core dumps.

There are many factors to consider.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-06 Thread Dennis Bartlett
Well, THANKS for that - because that is precisely what I'm doing right
now... looping thru dicts to create attribute equates...

Perhaps we should have an area we can post all these utilities so we don't
have to reinvent the wheel every time...

Anyone?

-Original Message-
Rex Gozar wrote:

I inherited similar bad code.  It too used F1, F2... for file variables, 
hardcoded attribute numbers, etc..  

I wrote a utility to generate INCLUDE files for attribute equates.  Then 
I wrote another utility to rename the file variables and change the 
hardcoded attribute numbers to named constants (equates).
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-06 Thread Rex Gozar

Dennis,

I'll try to post my utilities to www.PickWiki.com for you and anyone 
else interested.  There may be similar utilities there, but I was 
striving to get the programs here to conform to a specific coding 
standard (already posted on PickWiki).  Your standards may be 
drastically different, making my utilities useless to you.


I'll let you know when I'm done.

I firmly believe that shoddy programming has hurt the credibility of 
Pick in general, and we (the Pick community) should take active steps to 
change that image.


rex
P.S. You ARE using source code control tools (i.e. not home grown 
procedures), right?


Dennis Bartlett wrote:

Well, THANKS for that - because that is precisely what I'm doing right
now... looping thru dicts to create attribute equates...

Perhaps we should have an area we can post all these utilities so we don't
have to reinvent the wheel every time...

Anyone?

-Original Message-
Rex Gozar wrote:

I inherited similar bad code.  It too used F1, F2... for file variables, 
hardcoded attribute numbers, etc..  

I wrote a utility to generate INCLUDE files for attribute equates.  Then 
I wrote another utility to rename the file variables and change the 
hardcoded attribute numbers to named constants (equates).

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-06 Thread Mark Eastwood
As someone once told me; 
The great thing about Pick is you can sit down at your kitchen table and
write an entire application. The bad thing about Pick is people sit down
at their kitchen tables and write applications :) 



-Original Message-


I firmly believe that shoddy programming has hurt the credibility of 
Pick in general, and we (the Pick community) should take active steps to

change that image.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-06 Thread Kevin King
I don't think the shoddy programming issue is localized to Pick/MV people
only.  Shoddy programming has eroded the confidence in our entire profession
irrespective of language, database, tools, etc. and yes, application
development is a profession - and all that implies - not a career nor merely
a job.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-06 Thread Charles_Shaffer
Kevin said
I don't think the shoddy programming issue is localized to Pick/MV 
people
only.  Shoddy programming has eroded the confidence in our entire 
profession
irrespective of language, database, tools, etc. and yes, application
development is a profession - and all that implies - not a career nor 
merely
a job.

I agree with what Kevin says, but it's not the programmer's fault as much 
as management.  (and I have spent more time in management than 
programming).  When I was trained in the early 80s, I was led to expect 
that I would go out into a maintenance programming job.  In the following 
25 years, I have never had the luxury of keeping up with maintenance 
programming.  There are always more requests piling up and not enough 
resources to complete them.  The companies I have worked for treat IT 
people as undesireable costs, not asset generators. 

This is further complicated by the fact that the field is exploding in 
terms of the number of areas that there are to learn about.  Based on what 
I see coming out of University's. nobody is taking time to teach the 
importance of writing maintainable code.  I suspect that programming is 
not the only area where this is happening either.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-06 Thread Kevin King
While I believe there's ample blame to go around, it remains up to each
person to choose how they approach the obstacles of this profession.  As a
consultant I am periodically assigned to tasks where cutting a few corners
might be the only way to achieve the improbable objective on the impossible
timeline.  Yet, knowing that support is the only part of the project
lifecycle that has no definitive end date, I'd rather come in slightly over
budget (or eat a couple of hours) if doing the job right (vs cutting
corners) is going to save everyone tons of cash over the long haul.  And if
recent conversations are any indication, I don't believe this is all that
unique of an attitude.  There are, however, decades of bad to be overcome,
and while it doesn't happen overnight, it doesn't mean it can't happen over
time.

As to the new blood coming into the industry, I think you're spot on;
academia can only do so much and the attention to quality is only one facet
of increasingly complex curricula.  To a degree, I wonder if the definition
of quality would be different for those who have decades of walking the
minefields of bad code vs. those that merely teach the syntax and
semantics?  In the end, it's all a matter of cost, or as the old commercial
used to say:  You can pay me now or pay me later  ...however, in
technology a well spent dollar can save millions.

And on that note, I'll be speaking more about this very topic of saving
millions at Spectrum, first at breakfast on 4/1 and then in a session on...
Thursday, I believe.  See y'all then.

I agree with what Kevin says, but it's not the programmer's fault as much
 as management. [snip]

 Charles Shaffer
 Senior Analyst
 NTN-Bower Corporation
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/




-- 
-Kevin
http://www.PrecisOnline.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Dennis Bartlett
You're a genius...!!!

Thanks for that - added a blank line and all is happy!

dennis


David Beaty wrote:

 Does the BP version of this item have a blank line at the end? We've
 experience problems with INCLUDES that don't have that.


Dennis Bartlett wrote:
 
 0033   WRITESEQ LOG.FILE ON F.FEEDBACK ELSE STOP 'DISK FULL'
 0034   RETURN
 0035 * 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-05 Thread Mats Carlid

Womack, Adrian skrev:

Does anyone else think it's bad practice to have code in INCLUDES?
  

I do !Warning this is a classical religious war issue!


Surely it would be much better to have the INITIATE.FEEDBACK 
GIVE.FEEDBACK routines written as subroutines, and then simply call them
from the appropriate spots.

If the code in either of those routines needs to be changed, you'll need
to also recompile all the programs using the include. But as subroutines
all you need to do is recompile the subroutine in question.
  


And what's worse: Every time you add a variable in the include you must
search all routines that use the include to check that they do not use 
that name ..

unless you have a rigid naming convention to prevent such name reuse.

Although, INCLUDES are fantastic for things like common  equate
definitions.

  

Well - the same argument applies here, but the naming convention
often comes quite naturally - at least  in my experience.

-- mats
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Ron Hutchings
It is a maintenance nightmare from the 1980s that needs to be corrected.



 Date: Wed, 5 Mar 2008 12:14:57 +0100
 From: [EMAIL PROTECTED]
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] INCLUDE weirdo

 Womack, Adrian skrev:
  Does anyone else think it's bad practice to have code in INCLUDES?
 
 I do !Warning this is a classical religious war issue!

  Surely it would be much better to have the INITIATE.FEEDBACK 
  GIVE.FEEDBACK routines written as subroutines, and then simply call them
  from the appropriate spots.
 
  If the code in either of those routines needs to be changed, you'll need
  to also recompile all the programs using the include. But as subroutines
  all you need to do is recompile the subroutine in question.
 

 And what's worse: Every time you add a variable in the include you must
 search all routines that use the include to check that they do not use
 that name ..
 unless you have a rigid naming convention to prevent such name reuse.
  Although, INCLUDES are fantastic for things like common  equate
  definitions.
 
 
 Well - the same argument applies here, but the naming convention
 often comes quite naturally - at least  in my experience.

 -- mats
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/

_
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Dennis Bartlett
Currently the system uses the following coding structure:

OPEN 'HPMAST.FILE' TO F1 ELSE STOP
OPEN 'HPCONTRACT' TO F2 ELSE STOP
OPEN 'HPTRANS.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

Just understanding the code takes a lot of backwards and forwards thru code.

This wouldn't be so bad if they had at least standardised of F1 always being
HPMAST, but they didn't, so the next program does this

OPEN 'HPCONTRACT' TO F1 ELSE STOP
OPEN 'HPTRANS.FILE' TO F2 ELSE STOP
OPEN 'HPMAST.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

The formula at the bottom looks identical to the formula above but it's a
totally different file / field combo. Multiply this by around 1700 programs
and you begin to get a sense of what I face. If a program hits a file or
record error it simply stops with no feedback to the user that the update is
complete. Data integrity is an illusion.

The system has been migrated from Pick, but without all the code being
converted. As a result one has to try compile with a PICK compile, and if
that fails, try a universe style compile. The dictionaries for the most part
contain only F1, F2, F3 with the heading correct some of the time, and
fields in use that do not appear in the dictionaries.

Thus far I have started changing code to always open HPMAST to F.HPMAST, and
to always read HPMAST into HPMAST.R. Code takes on a whole new meaning when
you know what file you're working with.

An additional swing is that every summary total is always calculated -
nothing is stored. This means that every program that ever displays ARREARS
for example has the code to calculate arrears in it. That makes 200 separate
routines with the exact same code in it, just with differing file variables
(ie not a simple swap out).

The code needs to be changed, errors need to be trapped, and duplicated code
weeded out but the time to rewrite complete code doesn't exist. Using
included code allows me (the only full time programmer) to phase in the
changes as time permits.

The idea is to phase the new code into the system as and when a program is
modified. Most programs create qpointers to the various (15) branches, then
open the the qpointed files. The method of doing this varies considerably
from program to program, with a bewildering array of possible file handles -
my plan is to create ideal code for opening, reading, writing files,
stored in SNIPPETS.

I have started converting the opens to a standard, eg F.HPMAST, and read a
standard record, eg HPMAST.R. Keys variables are set to a standard to allow
the use of INCLUDES. Standardises READ includes, WRITE includes all preset
with error trapping code. 

The theory behind the includes thing is that one can still produce a full
listing of the code to debug if required. One can change just a read and
write in a program without having to get involved in other files in the
routine (really messy but allows the process to start and proceed on a very
part time basis). 

Recompiling everything is far less tiring than trying to concentrate and not
leave out code whilst being moved from fire to fire, besides which having it
all in SNIPPETS allows me to get it right in one place and know that
correction is being filtered into the whole system by a simple recompile.



Adrian Womack wrote:

 Does anyone else think it's bad practice to have code in INCLUDES?
 Surely it would be much better to have the INITIATE.FEEDBACK 
 GIVE.FEEDBACK routines written as subroutines, and then simply call them
 from the appropriate spots.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Dennis Bartlett
Hi Kate,

Yes its been solved - the included code needed to have a blank line at the
end of it. Simple but not something I might have thought of!

Hope it works for you...

dennis

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kate Stanton
Sent: 05 March 2008 06:00 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] INCLUDE weirdo

Hi Dennis,

Have you solved this?

When I have run into trouble with INCLUDE, I have copied the code into my 
program and compiled.  The problem then usually becomes obvious.  Have you 
tried this?

Cheers, Kate

- Original Message - 
From: Dennis Bartlett [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, March 04, 2008 8:11 PM
Subject: [U2] INCLUDE weirdo


I have an INCLUDE statement that brings in code from a snippets file called
 SNIPPETS.

 INCLUDE SNIPPETS GIVE.FEEDBACK

 If I compile the compiler hangs as it hits the include statement.

 If I then change it to include from BP

 INCLUDE BP GIVE.FEEDBACK

 it works fine.

 What am I doing wrong?
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/



-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.4/1310 - Release Date: 2008/03/04
08:35 AM
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Dennis Bartlett
Hey, in a normal world I would agree. 

No religious war needed... ;-)

Thanks for the heads up - its something I'll put a bit more thought into...
Its just the magnitude of what I have to achieve that's pushing me this way.
I'm currently getting around a hour to work on a particular source code
before being given a new urgent task. This way I believe I can make
headway.

Phase 1 is to take the common ARREARS code out of each program and place it
in SNIPPETS with a naming convention that describes where it comes from.

eg code taken from HPPOSTCASHDEF in HPBP gets stored in SNIPPETS as

ARREARS.CALC.HPBP.HPPOSTCASHDEF.INST1 
(each instance of the common code within the program source stored
 separately)

Phase 2: Once all ARREARS calculation code has been extracted from all
programs I can normalise the code into the same variables (just for
comparison purposes) to work out just how many programs have identical code,
and which ones do something different). All those with common code need to
have one subroutine created, and the subroutine called from every program
referenced in SNIPPETS starting with ARREARS.CALC...


-Original Message-
Mats wrote

 I do !Warning this is a classical religious war issue!
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Dennis Bartlett
 It is a maintenance nightmare from the 1980s that needs to be corrected.

Agreed. I started here on Jan 7th. I've so far been assigned 97 tasks, each
in some state of investigation / repair before the next one hits. At this
rate, with no hope of time to do a thorough overhaul, I had to find a means
of moving forward incrementally, even if just to give me hope that
maintenance will become easier.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-05 Thread Dianne Ackerman
Whatever salary you're making, it's not enough! :)
-Dianne

Dennis Bartlett wrote:

Currently the system uses the following coding structure:

OPEN 'HPMAST.FILE' TO F1 ELSE STOP
OPEN 'HPCONTRACT' TO F2 ELSE STOP
OPEN 'HPTRANS.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

Just understanding the code takes a lot of backwards and forwards thru code.

This wouldn't be so bad if they had at least standardised of F1 always being
HPMAST, but they didn't, so the next program does this

OPEN 'HPCONTRACT' TO F1 ELSE STOP
OPEN 'HPTRANS.FILE' TO F2 ELSE STOP
OPEN 'HPMAST.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

The formula at the bottom looks identical to the formula above but it's a
totally different file / field combo. Multiply this by around 1700 programs
and you begin to get a sense of what I face. If a program hits a file or
record error it simply stops with no feedback to the user that the update is
complete. Data integrity is an illusion.

The system has been migrated from Pick, but without all the code being
converted. As a result one has to try compile with a PICK compile, and if
that fails, try a universe style compile. The dictionaries for the most part
contain only F1, F2, F3 with the heading correct some of the time, and
fields in use that do not appear in the dictionaries.

Thus far I have started changing code to always open HPMAST to F.HPMAST, and
to always read HPMAST into HPMAST.R. Code takes on a whole new meaning when
you know what file you're working with.

An additional swing is that every summary total is always calculated -
nothing is stored. This means that every program that ever displays ARREARS
for example has the code to calculate arrears in it. That makes 200 separate
routines with the exact same code in it, just with differing file variables
(ie not a simple swap out).

The code needs to be changed, errors need to be trapped, and duplicated code
weeded out but the time to rewrite complete code doesn't exist. Using
included code allows me (the only full time programmer) to phase in the
changes as time permits.

The idea is to phase the new code into the system as and when a program is
modified. Most programs create qpointers to the various (15) branches, then
open the the qpointed files. The method of doing this varies considerably
from program to program, with a bewildering array of possible file handles -
my plan is to create ideal code for opening, reading, writing files,
stored in SNIPPETS.

I have started converting the opens to a standard, eg F.HPMAST, and read a
standard record, eg HPMAST.R. Keys variables are set to a standard to allow
the use of INCLUDES. Standardises READ includes, WRITE includes all preset
with error trapping code. 

The theory behind the includes thing is that one can still produce a full
listing of the code to debug if required. One can change just a read and
write in a program without having to get involved in other files in the
routine (really messy but allows the process to start and proceed on a very
part time basis). 

Recompiling everything is far less tiring than trying to concentrate and not
leave out code whilst being moved from fire to fire, besides which having it
all in SNIPPETS allows me to get it right in one place and know that
correction is being filtered into the whole system by a simple recompile.



Adrian Womack wrote:

  

Does anyone else think it's bad practice to have code in INCLUDES?
Surely it would be much better to have the INITIATE.FEEDBACK 
GIVE.FEEDBACK routines written as subroutines, and then simply call them
from the appropriate spots.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Marc Harbeson
Only thing is that if you used subroutines - you would only have to
recompile the subroutines.  :-)

For example (with no error checking flags, etc - no use of COMMON, etc)

CALL OPEN.THAT.FILE(F.HPMAST,HPMAST.FILE)
WAITFLAG = False
CALL LOCK.THAT.RECORD(F.HPMAST,HPMAST.KEY,WAITFLAG)
CALL READ.THAT.RECORD(HPMAST.REC,F.HPMAST,HPMAST.KEY)
CALL WRITE.THAT.RECORD(HPMAST.REC,F.HPMAST,HPMAST.KEY)
CALL RELEASE.THAT.LOCK(F.HPMAST,HPMAST.KEY)
CALL CLOSE.THAT.FILE(F.HPMAST)

Where I see value in the $INCLUDE would be the formulas and standard
equates.  Such as the following
EQU True TO 1
EQU False TO 0
EQU ThatName TO HPMAST.REC1

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett
Sent: Wednesday, March 05, 2008 9:57 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] INCLUDE weirdo

Currently the system uses the following coding structure:

OPEN 'HPMAST.FILE' TO F1 ELSE STOP
OPEN 'HPCONTRACT' TO F2 ELSE STOP
OPEN 'HPTRANS.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

Just understanding the code takes a lot of backwards and forwards thru
code.

This wouldn't be so bad if they had at least standardised of F1 always
being
HPMAST, but they didn't, so the next program does this

OPEN 'HPCONTRACT' TO F1 ELSE STOP
OPEN 'HPTRANS.FILE' TO F2 ELSE STOP
OPEN 'HPMAST.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

The formula at the bottom looks identical to the formula above but it's
a
totally different file / field combo. Multiply this by around 1700
programs
and you begin to get a sense of what I face. If a program hits a file or
record error it simply stops with no feedback to the user that the
update is
complete. Data integrity is an illusion.

The system has been migrated from Pick, but without all the code being
converted. As a result one has to try compile with a PICK compile, and
if
that fails, try a universe style compile. The dictionaries for the most
part
contain only F1, F2, F3 with the heading correct some of the time, and
fields in use that do not appear in the dictionaries.

Thus far I have started changing code to always open HPMAST to F.HPMAST,
and
to always read HPMAST into HPMAST.R. Code takes on a whole new meaning
when
you know what file you're working with.

An additional swing is that every summary total is always calculated -
nothing is stored. This means that every program that ever displays
ARREARS
for example has the code to calculate arrears in it. That makes 200
separate
routines with the exact same code in it, just with differing file
variables
(ie not a simple swap out).

The code needs to be changed, errors need to be trapped, and duplicated
code
weeded out but the time to rewrite complete code doesn't exist. Using
included code allows me (the only full time programmer) to phase in the
changes as time permits.

The idea is to phase the new code into the system as and when a program
is
modified. Most programs create qpointers to the various (15) branches,
then
open the the qpointed files. The method of doing this varies
considerably
from program to program, with a bewildering array of possible file
handles -
my plan is to create ideal code for opening, reading, writing files,
stored in SNIPPETS.

I have started converting the opens to a standard, eg F.HPMAST, and read
a
standard record, eg HPMAST.R. Keys variables are set to a standard to
allow
the use of INCLUDES. Standardises READ includes, WRITE includes all
preset
with error trapping code. 

The theory behind the includes thing is that one can still produce a
full
listing of the code to debug if required. One can change just a read and
write in a program without having to get involved in other files in the
routine (really messy but allows the process to start and proceed on a
very
part time basis). 

Recompiling everything is far less tiring than trying to concentrate and
not
leave out code whilst being moved from fire to fire, besides which
having it
all in SNIPPETS allows me to get it right in one place and know that
correction is being filtered into the whole system by a simple
recompile.



Adrian Womack wrote:

 Does anyone else think it's bad practice to have code in INCLUDES?
 Surely it would be much better to have the INITIATE.FEEDBACK 
 GIVE.FEEDBACK routines written as subroutines, and then simply call
them
 from the appropriate spots.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-05 Thread Charles_Shaffer
When I see difficult UNIBASIC code, I just remember RPL.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation




Whatever salary you're making, it's not enough! :)
-Dianne

Dennis Bartlett wrote:

Currently the system uses the following coding structure:

OPEN 'HPMAST.FILE' TO F1 ELSE STOP
OPEN 'HPCONTRACT' TO F2 ELSE STOP
OPEN 'HPTRANS.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

Just understanding the code takes a lot of backwards and forwards thru 
code.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Jerry Banker
Dianne is correct. Your code looks like it was built by a CASE tool.

Jerry Banker


 -Original Message-
 From: Dianne Ackerman [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 05, 2008 9:28 AM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] INCLUDE weirdo
 
 Whatever salary you're making, it's not enough! :)
 -Dianne
 
 Dennis Bartlett wrote:
 
 Currently the system uses the following coding structure:
 
 OPEN 'HPMAST.FILE' TO F1 ELSE STOP
 OPEN 'HPCONTRACT' TO F2 ELSE STOP
 OPEN 'HPTRANS.FILE' TO F3 ELSE STOP
 READ F1R FROM F1, KEY THEN...
 READ F2R FROM F2, KEY THEN...
 READ F3R FROM F3, KEY THEN...
 F1R36,X = F2R13 / F3R82 * F1R8 + F3R43
 
 Just understanding the code takes a lot of backwards and forwards
thru
 code.
 
 This wouldn't be so bad if they had at least standardised of F1
always
 being
 HPMAST, but they didn't, so the next program does this
 
 OPEN 'HPCONTRACT' TO F1 ELSE STOP
 OPEN 'HPTRANS.FILE' TO F2 ELSE STOP
 OPEN 'HPMAST.FILE' TO F3 ELSE STOP
 READ F1R FROM F1, KEY THEN...
 READ F2R FROM F2, KEY THEN...
 READ F3R FROM F3, KEY THEN...
 F1R36,X = F2R13 / F3R82 * F1R8 + F3R43
 
 The formula at the bottom looks identical to the formula above but
 it's a
 totally different file / field combo. Multiply this by around 1700
 programs
 and you begin to get a sense of what I face. If a program hits a file
 or
 record error it simply stops with no feedback to the user that the
 update is
 complete. Data integrity is an illusion.
 
 The system has been migrated from Pick, but without all the code
being
 converted. As a result one has to try compile with a PICK compile,
and
 if
 that fails, try a universe style compile. The dictionaries for the
 most part
 contain only F1, F2, F3 with the heading correct some of the time,
and
 fields in use that do not appear in the dictionaries.
 
 Thus far I have started changing code to always open HPMAST to
 F.HPMAST, and
 to always read HPMAST into HPMAST.R. Code takes on a whole new
meaning
 when
 you know what file you're working with.
 
 An additional swing is that every summary total is always calculated
-
 nothing is stored. This means that every program that ever displays
 ARREARS
 for example has the code to calculate arrears in it. That makes 200
 separate
 routines with the exact same code in it, just with differing file
 variables
 (ie not a simple swap out).
 
 The code needs to be changed, errors need to be trapped, and
 duplicated code
 weeded out but the time to rewrite complete code doesn't exist. Using
 included code allows me (the only full time programmer) to phase in
 the
 changes as time permits.
 
 The idea is to phase the new code into the system as and when a
 program is
 modified. Most programs create qpointers to the various (15)
branches,
 then
 open the the qpointed files. The method of doing this varies
 considerably
 from program to program, with a bewildering array of possible file
 handles -
 my plan is to create ideal code for opening, reading, writing
files,
 stored in SNIPPETS.
 
 I have started converting the opens to a standard, eg F.HPMAST, and
 read a
 standard record, eg HPMAST.R. Keys variables are set to a standard to
 allow
 the use of INCLUDES. Standardises READ includes, WRITE includes all
 preset
 with error trapping code.
 
 The theory behind the includes thing is that one can still produce a
 full
 listing of the code to debug if required. One can change just a read
 and
 write in a program without having to get involved in other files in
 the
 routine (really messy but allows the process to start and proceed on
a
 very
 part time basis).
 
 Recompiling everything is far less tiring than trying to concentrate
 and not
 leave out code whilst being moved from fire to fire, besides which
 having it
 all in SNIPPETS allows me to get it right in one place and know that
 correction is being filtered into the whole system by a simple
 recompile.
 
 
 
 Adrian Womack wrote:
 
 
 
 Does anyone else think it's bad practice to have code in INCLUDES?
 Surely it would be much better to have the INITIATE.FEEDBACK 
 GIVE.FEEDBACK routines written as subroutines, and then simply call
 them
 from the appropriate spots.
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Robert Houben
We had the same problem where the INCLUDE file was dropped onto a samba share 
from source-safe.  The fix was to read each program entry in and write it out 
with a trailing attribute mark.  This was a problem for more than includes.  
Once I did that, everything worked OK.

It was some weird EOF condition.  Here is the program I use to fix it:

* This program fixes up end-of-item situation that causes universe
* compiler to hang on programs.
*
EQU TRUE TO 1, FALSE TO 0
*
FILENAME=OLEDB.INCLUDES
GOSUB FIXFILE
FILENAME=OLEDB.PROGRAMS
GOSUB FIXFILE
STOP
*
FIXFILE: *
  *
   OPEN FILENAME TO FILE ELSE STOP 201,FILENAME
   SELECT FILE
   FINISHED=FALSE
   LOOP
  READNEXT ID ELSE
 FINISHED=TRUE
  END
   UNTIL FINISHED DO
  READ ITEM FROM FILE, ID THEN
 ITEM-1=
 LOOP
 WHILE ITEM NE '' AND ITEM[LEN(ITEM),1] EQ CHAR(254) DO
ITEM=ITEM[1,LEN(ITEM)-1]
 REPEAT
 WRITE ITEM ON FILE, ID
  END
   REPEAT
RETURN
*
END

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kate Stanton
Sent: Tuesday, March 04, 2008 8:00 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] INCLUDE weirdo

Hi Dennis,

Have you solved this?

When I have run into trouble with INCLUDE, I have copied the code into my
program and compiled.  The problem then usually becomes obvious.  Have you
tried this?

Cheers, Kate

- Original Message -
From: Dennis Bartlett [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, March 04, 2008 8:11 PM
Subject: [U2] INCLUDE weirdo


I have an INCLUDE statement that brings in code from a snippets file called
 SNIPPETS.

 INCLUDE SNIPPETS GIVE.FEEDBACK

 If I compile the compiler hangs as it hits the include statement.

 If I then change it to include from BP

 INCLUDE BP GIVE.FEEDBACK

 it works fine.

 What am I doing wrong?
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-05 Thread Dennis Bartlett
And here I am complaining... I documented a library system written entirely
in PROC..

boy, I am giving my age away...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 05 March 2008 07:10 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] INCLUDE weirdo

When I see difficult UNIBASIC code, I just remember RPL.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-05 Thread Susan Lynch
Now, now, now - you can write bad code in any language - or you can write 
good code.  I worked with someone who learned RPL first and her RPL code was 
very easy to read and maintain.  She did not want to learn Basic because the 
Basic programmers who had preceeded us at that site wrote cryptic (and 
bug-ridden) Basic.  When I showed her my code, she was amazed - she had 
thought that Basic required the unreadable style she had seen from the 
others.


I actually liked RPL!

Susan Lynch
FW Davison  Company, Inc.
- Original Message - 
From: [EMAIL PROTECTED]

To: u2-users@listserver.u2ug.org
Sent: Wednesday, March 05, 2008 12:10 PM
Subject: Re: [U2] INCLUDE weirdo



When I see difficult UNIBASIC code, I just remember RPL.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation




Whatever salary you're making, it's not enough! :)
-Dianne

Dennis Bartlett wrote:


Currently the system uses the following coding structure:

OPEN 'HPMAST.FILE' TO F1 ELSE STOP
OPEN 'HPCONTRACT' TO F2 ELSE STOP
OPEN 'HPTRANS.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

Just understanding the code takes a lot of backwards and forwards thru

code.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-05 Thread Charles_Shaffer
Susan Wrote:
Now, now, now - you can write bad code in any language...

You're right there.  I've proved it many times.

I actually liked RPL!

So you're the one!

Charles Shaffer
Senior Analyst
NTN-Bower Corporation
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-05 Thread Rex Gozar

Dennis,

I inherited similar bad code.  It too used F1, F2... for file variables, 
hardcoded attribute numbers, etc..  Over 10% of the programs would not 
compile without some warning or error.


I wrote a utility to generate INCLUDE files for attribute equates.  Then 
I wrote another utility to rename the file variables and change the 
hardcoded attribute numbers to named constants (equates).  I kept all 
changes in source code control (CVS) in case I needed to revert to a 
backup.  I did this as sidework, so it took me a couple weeks to create 
the utilities; it only took a few minutes to run them, but it took a 
couple more weeks to review ALL the code changes (using diff tools).


The effort was well worth it.  It made debugging and development easy. 
I would encourage you or anyone else in a similar situation to do the same.


rex
P.S.  I also had to create a utility to space out statements in a 
consistent way so the diff tools wouldn't report false positives.


Dennis Bartlett wrote:

Currently the system uses the following coding structure:

OPEN 'HPMAST.FILE' TO F1 ELSE STOP
OPEN 'HPCONTRACT' TO F2 ELSE STOP
OPEN 'HPTRANS.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

Just understanding the code takes a lot of backwards and forwards thru code.

This wouldn't be so bad if they had at least standardised of F1 always being
HPMAST, but they didn't, so the next program does this

OPEN 'HPCONTRACT' TO F1 ELSE STOP
OPEN 'HPTRANS.FILE' TO F2 ELSE STOP
OPEN 'HPMAST.FILE' TO F3 ELSE STOP
READ F1R FROM F1, KEY THEN...
READ F2R FROM F2, KEY THEN...
READ F3R FROM F3, KEY THEN...
F1R36,X = F2R13 / F3R82 * F1R8 + F3R43

The formula at the bottom looks identical to the formula above but it's a
totally different file / field combo. Multiply this by around 1700 programs
and you begin to get a sense of what I face. If a program hits a file or
record error it simply stops with no feedback to the user that the update is
complete. Data integrity is an illusion.

The system has been migrated from Pick, but without all the code being
converted. As a result one has to try compile with a PICK compile, and if
that fails, try a universe style compile. The dictionaries for the most part
contain only F1, F2, F3 with the heading correct some of the time, and
fields in use that do not appear in the dictionaries.

Thus far I have started changing code to always open HPMAST to F.HPMAST, and
to always read HPMAST into HPMAST.R. Code takes on a whole new meaning when
you know what file you're working with.

An additional swing is that every summary total is always calculated -
nothing is stored. This means that every program that ever displays ARREARS
for example has the code to calculate arrears in it. That makes 200 separate
routines with the exact same code in it, just with differing file variables
(ie not a simple swap out).

The code needs to be changed, errors need to be trapped, and duplicated code
weeded out but the time to rewrite complete code doesn't exist. Using
included code allows me (the only full time programmer) to phase in the
changes as time permits.

The idea is to phase the new code into the system as and when a program is
modified. Most programs create qpointers to the various (15) branches, then
open the the qpointed files. The method of doing this varies considerably
from program to program, with a bewildering array of possible file handles -
my plan is to create ideal code for opening, reading, writing files,
stored in SNIPPETS.

I have started converting the opens to a standard, eg F.HPMAST, and read a
standard record, eg HPMAST.R. Keys variables are set to a standard to allow
the use of INCLUDES. Standardises READ includes, WRITE includes all preset
with error trapping code. 


The theory behind the includes thing is that one can still produce a full
listing of the code to debug if required. One can change just a read and
write in a program without having to get involved in other files in the
routine (really messy but allows the process to start and proceed on a very
part time basis). 


Recompiling everything is far less tiring than trying to concentrate and not
leave out code whilst being moved from fire to fire, besides which having it
all in SNIPPETS allows me to get it right in one place and know that
correction is being filtered into the whole system by a simple recompile.



Adrian Womack wrote:


Does anyone else think it's bad practice to have code in INCLUDES?
Surely it would be much better to have the INITIATE.FEEDBACK 
GIVE.FEEDBACK routines written as subroutines, and then simply call them
from the appropriate spots.

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-04 Thread Ray Wurlod
Do you have a VOC entry for SNIPPETS ?
Is SNIPPETS a Type 1/19 file?
Is there a record called GIVE.FEEDBACK in SNIPPETS ?
Does the compiler time out after a while (say five minutes) or hang 
interminably ?

 - Original Message -
 From: Dennis Bartlett [EMAIL PROTECTED]
 To: u2-users@listserver.u2ug.org
 Subject: [U2] INCLUDE weirdo
 Date: Tue, 4 Mar 2008 09:11:35 +0200
 
 
 I have an INCLUDE statement that brings in code from a snippets file called
 SNIPPETS.
 
   INCLUDE SNIPPETS GIVE.FEEDBACK
 
 If I compile the compiler hangs as it hits the include statement.
 
 If I then change it to include from BP
 
   INCLUDE BP GIVE.FEEDBACK
 
 it works fine.
 
 What am I doing wrong?
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-04 Thread David Jordan
Check that the SNIPPETS file is type 1 or 19

I use $INCLUDE also.

Regards

David Jordan
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-04 Thread Dennis Bartlett
SNIPPETS
0001: F
0002: SNIPPETS
0003: D_SNIPPETS

A type 1 file

 GIVE.FEEDBACK
0001 * GIVE.FEEDBACK
0002 * D.Bartlett 03Mar08
0003 * updates the file sent by BLAT by email
0004 * 
0005 * expects a variable 'FEEDBACK'
0006 * containing the message to add to the logfile
0007 * 
0008 INITIATE.FEEDBACK:
0009   LOG.ERROR = 0
0010   CRLF = CHAR(13):CHAR(10)
0011   LOG.DATE = OCONV(DATE(),'D4/')
0012   LOG.DATE = LOG.DATE[7,4]:LOG.DATE[4,2]:LOG.DATE[1,2]
0013   FEEDBACK = STR('=',40)
0014   FEEDBACK := CRLF:'WELCOME TO FEEDBACK ---':LOG.DATE
0015   FEEDBACK := CRLF
0016   FEEDBACK := CRLF:'The overnight automatic emailer...'
0017   FEEDBACK := CRLF
0018   FEEDBACK := CRLF:'Never again do you have to wonder.. did that
thing run?'
0019   FEEDBACK := CRLF:'FEEDBACK will mail you the results of every
overnight'
0020   FEEDBACK := CRLF:run... now ain't that cool?
0021   FEEDBACK := CRLF
0022   OPENSEQ 'INTEGRITY','FEEDBACK' TO F.FEEDBACK ELSE NULL
0023   WEOFSEQ F.FEEDBACK
0024   WRITESEQ FEEDBACK ON F.FEEDBACK ELSE STOP'DISK FULL'
0025   RETURN
0026 * 
0027 GIVE.FEEDBACK:
0028   IF (LOG.ERROR) THEN RETURN
0029   LOG.DATE = OCONV(DATE(),'D4/')
0030   LOG.TIME = OCONV(TIME(),'MTHS')
0031   LOG.DATE =
LOG.DATE[7,4]:LOG.DATE[4,2]:LOG.DATE[1,2]:'::':LOG.TIME
0032   LOG.FILE = LOG.DATE:: :FEEDBACK
0033   WRITESEQ LOG.FILE ON F.FEEDBACK ELSE STOP 'DISK FULL'
0034   RETURN
0035 * 

Every program has the following type of error message
  OPEN 'VOC' TO VOC ELSE
 FEEDBACK = DAILY,SETTLEMENT,CANNOT OPEN VOC,DIDNT RUN
 GOSUB GIVE.FEEDBACK
 STOP 'VOC FILE'
  END

and once a day the FEEDBACK file sent, using BLAT, via email to me every
morning...

feedback.bat
blat p:\INTEGRITY\FEEDBACK -to [EMAIL PROTECTED]

and finally feedback.bat is automated to happen at 6AM every morning.

Voila!


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ray Wurlod
Sent: 04 March 2008 10:21 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] INCLUDE weirdo

Do you have a VOC entry for SNIPPETS ?
Is SNIPPETS a Type 1/19 file?
Is there a record called GIVE.FEEDBACK in SNIPPETS ?
Does the compiler time out after a while (say five minutes) or hang
interminably ?

 - Original Message -
 From: Dennis Bartlett [EMAIL PROTECTED]
 To: u2-users@listserver.u2ug.org
 Subject: [U2] INCLUDE weirdo
 Date: Tue, 4 Mar 2008 09:11:35 +0200
 
 
 I have an INCLUDE statement that brings in code from a snippets file
called
 SNIPPETS.
 
   INCLUDE SNIPPETS GIVE.FEEDBACK
 
 If I compile the compiler hangs as it hits the include statement.
 
 If I then change it to include from BP
 
   INCLUDE BP GIVE.FEEDBACK
 
 it works fine.
 
 What am I doing wrong?
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/



-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.4/1309 - Release Date: 2008/03/03
06:50 PM
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-04 Thread Brian Leach
Dennis

If you're using BLAT I assume you're on Windows.

I've seen an INCLUDE hang if the included file doesn't have a terminating CRLF. 

Go into the editor and file it again and see if the problem persists.

Brian


I have an INCLUDE statement that brings in code from a snippets file called
SNIPPETS.

INCLUDE SNIPPETS GIVE.FEEDBACK

If I compile the compiler hangs as it hits the include statement.

If I then change it to include from BP

INCLUDE BP GIVE.FEEDBACK

it works fine.

What am I doing wrong?
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] INCLUDE weirdo

2008-03-04 Thread Womack, Adrian
Does anyone else think it's bad practice to have code in INCLUDES?
Surely it would be much better to have the INITIATE.FEEDBACK 
GIVE.FEEDBACK routines written as subroutines, and then simply call them
from the appropriate spots.

If the code in either of those routines needs to be changed, you'll need
to also recompile all the programs using the include. But as subroutines
all you need to do is recompile the subroutine in question.

Although, INCLUDES are fantastic for things like common  equate
definitions.

Adrian








DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] INCLUDE weirdo

2008-03-04 Thread Kate Stanton

Hi Dennis,

Have you solved this?

When I have run into trouble with INCLUDE, I have copied the code into my 
program and compiled.  The problem then usually becomes obvious.  Have you 
tried this?


Cheers, Kate

- Original Message - 
From: Dennis Bartlett [EMAIL PROTECTED]

To: u2-users@listserver.u2ug.org
Sent: Tuesday, March 04, 2008 8:11 PM
Subject: [U2] INCLUDE weirdo



I have an INCLUDE statement that brings in code from a snippets file called
SNIPPETS.

INCLUDE SNIPPETS GIVE.FEEDBACK

If I compile the compiler hangs as it hits the include statement.

If I then change it to include from BP

INCLUDE BP GIVE.FEEDBACK

it works fine.

What am I doing wrong?
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/ 

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/