Playing with 370 asm again

Now a ‘playpen’ mvs3.8j system is available to the public on my website I wanted to automate recovery from any damage a user could cause (even though they don’t have console access). That necessitated a change to my task monitoring program to handle jes2 failures (ok I have caused all of those so far in testing this stuff), which needed to be able to provide a parm to the jes2 start command, and their wasn’t room in my card layout.

So the card layout was changed, the code changed to handle it, and at the same time I did a code cleanup to get rid of all the code that was hard coded with a card length to actually use the length of the card image variable… almost.

Apart from the new card length blowing the 4K limit of the program, which was resolved by moving the card buffer area to a seperate dsect using getmained storage, I came across another interesting (annoying) problem. Bother, I still need hard coded lengths in my code for arithmetic.

The problem is that if I define a variable ” XX DC F’70’ ” and try to use it for arithmetic (ie: A R3,XX) it SOC4’s (moved the data pointer into god knows what address space instead of just offsetting by 70 bytes). However if I use a hard coded value (ie A R3,=F’70’) it works just fine; and yes it was definately coded as a DC in the code space not a DS in the data space.
So the new code uses references to lengths and maximum card rules that you need to change only in one place, except for arithmetic operations that all have the length codes as =F’length’.
Buggered if I can figure that one out.

Anyway, the new code is a lot cleaner than the old version, and as the card rules have been moved from the code space to a seperate getmained dsect you can have up to 58 rules stored in memory instead of the max of 20 in the origional version, should you ever need to have 58 STC tasks monitored.
Its not in the download area yet, still need to migrate it to the test server and feed it into CVS; yes I was testing on the live webserver (as thats the easiest to recover from if I broke it being kickstarted from the test server and all).

And why did I need extra fields, been playing with fiddling with JES2 remotely, and while killing it with a $PJES2,ABEND still leaves the TSO (spy console) session active to reply to prompts and restart JES2 I was thinking what if it wasn’t me issuing the command now my play system is available on the web… so MMPF now replies to the abend prompt and taskmon now hot starts JES2 again after it’s down… the extra card length was needed to pass the parms to JES2 to hot start instead of prompt.
Although probably nobody but me would ever waste time automating a crash and hot restart of JES2 on an MVS3.8J system, I have :-).

About mark

At work, been working on Tandems for around 30yrs (programming + sysadmin), plus AIX and Solaris sysadmin also thrown in during the last 20yrs; also about 5yrs on MVS (mainly operations and automation but also smp/e work). At home I have been using linux for decades. Programming background is commercially in TAL/COBOL/SCOBOL/C(Tandem); 370 assembler(MVS); C, perl and shell scripting in *nix; and Microsoft Macro Assembler(windows).
This entry was posted in MVS3.8J. Bookmark the permalink.