开云体育


Re: Program Interrupts (signals)

 

Mark, Dave, Rob, Peter et al

I am sorry - I was clumsy and irritating.

My essay was not a criticism of what was done back in the day on CMS but rather it was a message was that things are kind of random and other past decisions would have changed the present (well maybe - but that is where we get into economics and Asimov Foundation territory).? OS has exit functions, and IBM introduced a native version into CMS with ABNEXIT (I have no idea if it traps HX but it should) - and the reason is that applications need this facility. Perhaps the DB2 team got a bit irritated as the plug kept being pulled from their software by operating systems, trashing database transactions. Who knows.

And I still think that if by random chance ABNEXIT had existed on VM/370, then when REXX was being implemented on it they would have used HX to do what they added HI to do. Rene can even check this! And you know what, IBM then might have been obliged to implement a non-maskable immediate called IC ("IPL CMS").?

This is all called?Counterfactual History. And actually this platform (VM/370) is an amazing opportunity to do practical counterfactual IT experiments. I cut my teeth on mainframes and am sad that (in my view) IBM "threw it all away"; is there a historical path that today would see IBM technology retaining is monopoly (and would that be a good thing)???

And Mark, I listen - and to be fair, one days debate to come to the conclusion that an exit function isn't going to exist on this VM/370 is not so long.?

I have had some experience across many platforms and languages - I can assure you that what I suggest is literally only what I have seen in other places and not just the ravings of a lunatic. The best outcomes come from open minded debates between people with different backgrounds - but we all know that.

Adrian


Re: Program Interrupts (signals)

 

开云体育

Also, when those of us who’ve dealt with CMS, CP, etc., since the early days speak up, listen! There are those of us who aren’t in the “VM Hall of Fame” and other such categories because we were deep in the background – basically not permitted to “show our faces” or identify ourselves to the community at large…

?

Mark

?

From: [email protected] <[email protected]> On Behalf Of Dave Wade
Sent: Saturday, April 25, 2020 9:33 AM
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

Adrian

?

Firstly its pointless criticising the design of CMS. It is what it is. In 1972 most programmers didn’t even punch their own cards, never mind have their own virtual machine.

Lets ?put VM/CMS structures in their place in history. The concept of CP/CMS dates as far back as 1967 and CP/40 and CP/67.

That’s around the same timeframe as the Origins of MULTICS. So UNIX and signals were still in the heads of Thompson, Kernigan and Ritchie.

The typical Mainframe was an IBM1401 or IBM1620. Hardware was expensive. Saving a byte or two was a worthwhile gain.

Look at the year 2000 issues because of two digit years. Would you have sacked every one who used two digit dates?

When you have 4 million insurance policies, each of which contains multiple dates, you take a hit…

… in fact we used single character months as well…..

?

So have a beer, sit in the sun and read some of Melinda’s books on the history of VM…

?

?

Dave

?

?

?

From: [email protected] <[email protected]> On Behalf Of adriansutherland67
Sent: 25 April 2020 13:28
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

What's a bit weird is the way IBM layered their hacks on hacks. And I am not trying to cause controversy because we all know what big corporations are like, and what mangers are like ... saving money but building up a technical debt. And we all know that (irritatingly) they are often right, and certainly I have buried some bodies!

In this case ... HX should have raised an interrupt which would have been manageable with one of the CMS interrupt macros. Instead weird polling.

And then?REXX came along which (like us today) needed a way for clean interrupt for the interpretation. One answer would be to fix HX, and allow the interpretor to catch the interrupt. But no - another command HI, another flag to poll!

The biggest hack was allowing the most significant byte of addresses to be used. Today, I would fire someone on the spot for doing that (or the equivalent) ... and the hardware architects should have made sure CPUs fired a machine abend if it ever found anything other than zero in that byte. Just think how much easier it would have been to migrate to 32 (yes 32 bit)!

And to get a more sympathetic hearing from this forum. In a parallel universe IBM launched their PC computer with CMS on metal not DOS. There was some impact on the mainframe business but this was completely offset by new customers and use cases. OS emulation was there from day one and later CP was introduced as the processors got more powerful. SAA was important ... etc.


Re: Program Interrupts (signals)

 

On Sat, Apr 25, 2020 at 09:33 PM, Bob Bolch wrote:
I added the trace start, trace end in already.? I built the system, so I will test it in the morning.
Wow ... Perfect


Re: Program Interrupts (signals)

 

TS is Trace Start, and TE is trace end. So basically a trace flag I can also poll.

A :-)


Re: Program Interrupts (signals)

 

I added the trace start, trace end in already.? I built the system, so I will test it in the morning.


On Sat, Apr 25, 2020, 5:15 PM adriansutherland67 <adrian@...> wrote:
On Sat, Apr 25, 2020 at 09:01 PM, Bob Bolch wrote:
So you do not want an HI mod anymore?
If that was there I would definitely plug it into BREXX, thank you. Won't impact GCCLIB which is fine. In fact that would probably represent what the state of play was with CMS when rexx was integrated in.

There was also a couple of immediate commands to start and stop interpretation tracing which I will lookup. HT was halt trace I think from memory.

What I won't worry about is C signals integration with CMS. Too hard.

Thanks Adrian


Re: Program Interrupts (signals)

 

All I need is flags at a defined address that I can poll (probs every instruction). I would also reset the flags at REXX start or when acting on them but presumably that won't impact your mod.


Re: Program Interrupts (signals)

 

On Sat, Apr 25, 2020 at 09:01 PM, Bob Bolch wrote:
So you do not want an HI mod anymore?
If that was there I would definitely plug it into BREXX, thank you. Won't impact GCCLIB which is fine. In fact that would probably represent what the state of play was with CMS when rexx was integrated in.

There was also a couple of immediate commands to start and stop interpretation tracing which I will lookup. HT was halt trace I think from memory.

What I won't worry about is C signals integration with CMS. Too hard.

Thanks Adrian


Re: Program Interrupts (signals)

 

So you do not want an HI mod anymore?


On Sat, Apr 25, 2020, 4:55 PM adriansutherland67 <adrian@...> wrote:
Ok ... I think it is clear that VM/370 does not have the facilities to provide an exit routine, and there is limited support to provide this by the community.

As we can't trap HX events it's rather pointless to worry too much about anything else. So the good news is I will just fake signals in GCCLIB and leave it at that for the time being.?

Thanks all for the input and advice. It's no drama, what's not possible is not possible!

Adrian


Re: Program Interrupts (signals)

 

Ok ... I think it is clear that VM/370 does not have the facilities to provide an exit routine, and there is limited support to provide this by the community.

As we can't trap HX events it's rather pointless to worry too much about anything else. So the good news is I will just fake signals in GCCLIB and leave it at that for the time being.?

Thanks all for the input and advice. It's no drama, what's not possible is not possible!

Adrian


Re: Program Interrupts (signals)

 

开云体育

Bob,

Sorry, brain fade, (its my wife’s birthday, not got time to check properly) .

?

DMSFREE … TYPE=NUCLEUS…

?

GC20-1807-4 Page 302…

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Bob Bolch
Sent: 25 April 2020 18:13
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

Dave, Do you recall what storage has to be TYPE=SYSTEM?

?

Bob Bolch

?

On Sat, Apr 25, 2020 at 1:01 PM Dave Wade <dave.g4ugm@...> wrote:

No, its just flagged as such so its not released…

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of adriansutherland67
Sent: 25 April 2020 17:50
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

On Sat, Apr 25, 2020 at 04:40 PM, Dave Wade wrote:

So REXX needs to allocate system storage…

I need to think that through ...?

Are there any limits to system memory etc.?


Re: Program Interrupts (signals)

 

Dave, Do you recall what storage has to be TYPE=SYSTEM?

Bob Bolch

On Sat, Apr 25, 2020 at 1:01 PM Dave Wade <dave.g4ugm@...> wrote:

No, its just flagged as such so its not released…

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of adriansutherland67
Sent: 25 April 2020 17:50
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

On Sat, Apr 25, 2020 at 04:40 PM, Dave Wade wrote:

So REXX needs to allocate system storage…

I need to think that through ...?

Are there any limits to system memory etc.?


Re: Program Interrupts (signals)

 

开云体育

No, its just flagged as such so its not released…

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of adriansutherland67
Sent: 25 April 2020 17:50
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

On Sat, Apr 25, 2020 at 04:40 PM, Dave Wade wrote:

So REXX needs to allocate system storage…

I need to think that through ...?

Are there any limits to system memory etc.?


Re: Program Interrupts (signals)

 

On Sat, Apr 25, 2020 at 04:40 PM, Dave Wade wrote:
So REXX needs to allocate system storage…
I need to think that through ...?

Are there any limits to system memory etc.?


Re: Program Interrupts (signals)

 

On Sat, Apr 25, 2020 at 04:17 PM, Bob Bolch wrote:
As far in errors in a program called by BREXX, if your SPIE or STAE handlers
are in effect, then they get control in the environment of the crashing
program. It is not the BREXX environment. With either SPIE or STAE, you could
specify the address of a retry routine, which runs in the environment of the
called program.

What would you do in such a routine?
Good question ... because it gets to the heart of my concerns. I would want the program to exit but I would not want CMS to execute it's abend logic and in that way ensure that BREXXs memory does not get released or files closed. In sum, that GCCLIB would do what CMS abend does but only for the failing program.

It's because by using BREXX etc. we have more than one program running in CMS (which it is not expecting).

So if the SPIE stuff does that then I am happy :-) although it depends on the called program behaving itself but hey that's fine!


Re: Program Interrupts (signals)

 

开云体育

So REXX needs to allocate system storage…

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Bob Bolch
Sent: 25 April 2020 16:58
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

Later editions of the manuals say 'All user storage is released.'

The code in R6 DMSABN does release all user storage on HX.

I believe that note 3. means that the storage is not set to zeros.

?

Bob Bolch

?

On Sat, Apr 25, 2020 at 11:34 AM Joe Monk <joemonk64@...> wrote:

Harold,

?

HX is a CMS command...

?

"Use?the?HX?command?to?stop the execution of?any CMS?or?CMS/DOS command?or program, close?any?open?files?or I/O devices,?and?return?to?the?CMS command?environment.?

?

1. HX?clears all file definitions?made?via tne?FILEDEF?or?DLBL commands,?including those entered with the?PERM?option.

  1. The?HX?command?is?executed?when?the next?SVC?or I/O?interruption?occurs: therefore?a?delay?may?occur between keying?HX?and?the return to?CMS.?All terminal output generated before?HI?is?processed?is?displayed before the?command?is?executed.
  2. HX?does not?clear?user storage."

?

Page 213-214

?

?

Joe

?

On Sat, Apr 25, 2020 at 10:16 AM Harold Grovesteen <h.grovsteen@...> wrote:

On Sat, 2020-04-25 at 09:45 -0500, Joe Monk wrote:
> "This is back to front.? HX is recognised while processing an
> interrupt
> from the console."
>
>?
I am sure those of you in the know, just assume everyone knows.

But, I see HX mentioned without differentiating whether this is a CP
command or CMS command.

Can someone clear that up for me, please, and anyone else somewhat
confused by what this does?

Thanks,
Harold Grovesteen



Re: Program Interrupts (signals)

 

On Sat, Apr 25, 2020 at 04:35 PM, Peter Coghlan wrote:
DMSITS or DMSITI noticed it and who knows
whether you will be that lucky
A good point and well made!


Re: Program Interrupts (signals)

 

On Sat, Apr 25, 2020 at 04:33 PM, Dave Wade wrote:

So have a beer, sit in the sun and read some of Melinda’s books on the history of VM…

?

Noted :-)


Re: Program Interrupts (signals)

 

开云体育

Joe,

Its older than that. There was a CP40 based on a hacked 360/40 which became CP/67

?

?

&

?

?

and scroll down to VM History….

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Joe Monk
Sent: 25 April 2020 14:09
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

So yes, thats right, the machine that gave birth to VM (back in those days it was called CP/67) had 32-bit addressing!

?

Joe

?

On Sat, Apr 25, 2020 at 8:03 AM Joe Monk via <joemonk64=[email protected]> wrote:

"Just think how much easier it would have been to migrate to 32 (yes 32 bit)!"

?

32-bit was tried by IBM with the 360/67 and it was found there was no appetite for it in the market. If you want to see what it is all about, spin up hercules with?a BC mode PSW, with bits 4 and 5 of the PSW turned on, which indicates 32 bit addressing. There even was an OS IBM developed which supports 32 bit addressing called TSS/360.

?

?

Joe

?

On Sat, Apr 25, 2020 at 7:28 AM adriansutherland67 <adrian@...> wrote:

What's a bit weird is the way IBM layered their hacks on hacks. And I am not trying to cause controversy because we all know what big corporations are like, and what mangers are like ... saving money but building up a technical debt. And we all know that (irritatingly) they are often right, and certainly I have buried some bodies!

In this case ... HX should have raised an interrupt which would have been manageable with one of the CMS interrupt macros. Instead weird polling.

And then?REXX came along which (like us today) needed a way for clean interrupt for the interpretation. One answer would be to fix HX, and allow the interpretor to catch the interrupt. But no - another command HI, another flag to poll!

The biggest hack was allowing the most significant byte of addresses to be used. Today, I would fire someone on the spot for doing that (or the equivalent) ... and the hardware architects should have made sure CPUs fired a machine abend if it ever found anything other than zero in that byte. Just think how much easier it would have been to migrate to 32 (yes 32 bit)!

And to get a more sympathetic hearing from this forum. In a parallel universe IBM launched their PC computer with CMS on metal not DOS. There was some impact on the mainframe business but this was completely offset by new customers and use cases. OS emulation was there from day one and later CP was introduced as the processors got more powerful. SAA was important ... etc.


Re: Program Interrupts (signals)

 


DMSCIT contains the console interrupt service routine. When processing an
attention interrupt, it checks if a HX command has been entered and if so
it sets a flag (the KXWANT bit in KXFLAG), checks some other stuff and
returns.
1/ From outside the nucleus can I access this flag - or put it another way
how do find its address and also the KXWANT bit number?
I think you would need to include a NUCON macro and an FVS macro in an
assembly program to get the address of KXFLAG and the bit value of KXWANT.
However, I would not suggest going this way because you would have to
notice the bit being set before DMSITS or DMSITI noticed it and who knows
whether you will be that lucky.

Regards,
Peter Coghlan.


2/ DMSABN is where I would need to add a ABEND exit routine - i.e. the
ABNEXIT that IBM was obliged to introduce later


Re: Program Interrupts (signals)

 

Correct. After HX, CMS ends whatever is running and returns to the command prompt.
It has worked exactly that way for 45 years.?

Bob Bolch



On Sat, Apr 25, 2020 at 12:26 PM adriansutherland67 <adrian@...> wrote:
On Sat, Apr 25, 2020 at 04:07 PM, Bob Bolch wrote:
The code says that HX releases all user storage. That means storage
allocated with DMSFREE TYPE=USER.
Isnt there also a getmain macro or something as well as dmsfree? Perhaps that is os emulation.

Anyway ... the problem is that if the use types HX all memory is released and the whole rexx call chain is lost. Which at one level is fine and dandy. But users need to be aware that HX is kind of catastrophic.