HP3000-L Archives

May 2010, Week 4

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:
Olav Kappert <[log in to unmask]>
Reply To:
Date:
Thu, 27 May 2010 10:06:12 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (102 lines)
Roy:

An issue that has not been addressed, other than what you just wrote, is 
how the program was set up.

In the past, I have seen programs which set SETMSG off because they 
don't want messages to appear on their screen (in block or character 
mode).  There are even software packages which routinely do this.  So 
checking for HPQUIET can provide false information.

If you are concerned about the amount of time (money) doing this job 
properly, then by all means do it quick and dirty.  Otherwise, invest in 
doing the job right and make the changes to all the programs and TEST 
them before putting them in production.

Olav Kappert


Roy Brown wrote:

> I like this technique, and will take note of it for the future.
>
> But is it just me who tries to go for the super-generalisation?
>
> Imagine a big, established suite of programs, already calling this 
> subprogram from more than a few places, but a new requirement means it 
> suddenly has to know if it was called while the program calling it had 
> the terminal in block mode or character mode.
>
> Linkage, External or whatever, you are going to fight very shy of 
> making all those calling places have to keep track of which mode they 
> are in, in a variable, a JCW or VAR, or even an Image dataset, so that 
> the subprogram can read this.
>
> Easier, more reliable, and safer by far, to have the subprogram figure 
> this out for itself if it wants to know which mode the terminal is in, 
> and leave the rest of the suite absolutely unchanged.
>
> Seeing a problem like this, I tend to make the jump from 'how do I 
> tell the subprogram which mode?' (as Walter says, possibly in many 
> places) to 'how does the subprogram figure this out?' almost without 
> thinking about it.
>
> And only go back to disturbing the established system to provide this 
> new information if, with my tail between my legs, I conclude that it's 
> something the subprogram just logically *cannot* figure out for itself.
>
> Roy
>
>
> In message <000001cafd4e$8991a360$6601a8c0@DJFJQK21>, Walter J. Murray 
> <[log in to unmask]> writing at 20:41:48 in his/her local time opines:-
>
>> Mike asks how to pass data to a subprogram without using a Linkage
>> section.
>>
>> Assuming the main program and subprogram are both COBOL, here's a handy
>> technique I have used to pass data between them without using parameters
>> and a Linkage Section.
>>
>> Define data items in the Working-Storage Section of both the main
>> program and the subprogram.  Give them both the same name (important!)
>> and the same Picture clause, and declare them both as EXTERNAL.  A value
>> stored in such a data item by one program will be "seen" by the other.
>>
>> It's a handy way to pass additional data between a program and a
>> subprogram, without having to change the calling sequences (in possibly
>> many programs).
>>
>> Walter
>>
>> Walter J. Murray
>>
>>
>> -----Original Message-----
>> From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
>> Behalf Of Michael Caplin
>> Sent: Wednesday, May 26, 2010 8:20 AM
>> To: [log in to unmask]
>> Subject: [HP3000-L] BLOCK MODE VARIABLE
>>
>> I have a subprogram that can be called from a block or character mode
>> main
>> program and I want the sub to know which called it without anything
>> being
>> passed in linkage.  I can think of some ugly ways to do it.  Does anyone
>> know
>> of an easy/simple way.
>> TIA,
>> mike
>>
>> * To join/leave the list, search archives, change list settings, *
>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>>
>> * To join/leave the list, search archives, change list settings, *
>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2