Batch program to update CVTUSER

2010-12-18 Thread Peter Relson
My post was describing the net affect, that only a key 0 program can 
access bytes x'800'-x'FFF' of the PSA.

As Jim Mulder privately reminded me, architecturally, all of page 0 is 
fetch-protected key 0 storage, but the "fetch protection override" is 
applied to bytes 0-x'7FF' to all programs of any key to read the first 2K.

Peter Relson
z/OS Core Technology Design

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-18 Thread Binyamin Dissen
On Fri, 17 Dec 2010 07:50:48 -0500 Peter Relson  wrote:

:>Bill Fairchild wrote:
:>At some time later, IBM also added a special protection feature for bytes 
:>512-2047 of page 0.  This feature, described in the Principles of 
:>Operation, and which is also both hardware and software, causes a program 
:>interrupt by any attempt for a non-key-0 program to fetch any storage in 
:>the first virtual 2K, where many register save areas are located, except 
:>for bytes 0-511, which may be fetched by a non-key-0 program.  This allows 
:>the normal program to do a L instruction at location 16, which is where 
:>the address of the CVT is located.  If you try to display bytes 0-511 with 
:>TSO, you should be able to, but not bytes 512-2047.  And you can display 
:>bytes 2048-4095 with TSO.

:>Close, But not right. It is the 2nd 2K, bytes 2048-4095, that have this 
:>special attribute.

I would look at it differently.

The fetch protection on the first page is the very old fetch protection bit.
All of the 4K is fetch protected. 

Since common pointers (basically the CVT, but TOLD/TNEW/AOLD/ANEW as well) are
fetched by non-privileged callers IBM could not page protect page 0. By adding
the Fetch-Protection-Override Control feature, IBM can now fetch protect page
zero while allowing access to the common fields that are de facto part of the
MVS architecture. Thus the bytes 0-2047 have this special attribute.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-17 Thread Shmuel Metz (Seymour J.)
Pleasse send to me or to the list, not both.

In , on 12/16/2010
   at 09:54 AM, Elardus Engelbrecht 
said:

>For what? Hardware, Software or both?

The Low-Address-protection facility is part of the architecture, but
it's up to the software to set bit 3 in CR0.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-17 Thread Tom Marchant
On Fri, 17 Dec 2010 07:50:48 -0500, Peter Relson wrote:

>Bill Fairchild wrote:
>>At some time later, IBM also added a special protection feature for bytes
>>512-2047 of page 0.  This feature, described in the Principles of
>>Operation, and which is also both hardware and software, causes a program
>>interrupt by any attempt for a non-key-0 program to fetch any storage in
>>the first virtual 2K, where many register save areas are located, except
>>for bytes 0-511, which may be fetched by a non-key-0 program.  This allows
>>the normal program to do a L instruction at location 16, which is where
>>the address of the CVT is located.  If you try to display bytes 0-511 with
>>TSO, you should be able to, but not bytes 512-2047.  And you can display
>>bytes 2048-4095 with TSO.
>
>Close, But not right. It is the 2nd 2K, bytes 2048-4095, that have this
>special attribute.

Peter's reply prompted me to look it up.  If I'm looking at the right part 
of the POO, the reference is to the Fetch-Protection-Override Control. 
This applies to the first 2K of memory.  "Bit 38 of control register 0 is the 
fetch-protection override control. When the bit is one, fetch protection 
is ignored for locations at effective addresses 0-2047."  This allows the 
first page of memory to be fetch protected while allowing fetch access 
to the first 2K of the PSA.

-- 
Tom Marchant

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-17 Thread Peter Relson
Bill Fairchild wrote:
At some time later, IBM also added a special protection feature for bytes 
512-2047 of page 0.  This feature, described in the Principles of 
Operation, and which is also both hardware and software, causes a program 
interrupt by any attempt for a non-key-0 program to fetch any storage in 
the first virtual 2K, where many register save areas are located, except 
for bytes 0-511, which may be fetched by a non-key-0 program.  This allows 
the normal program to do a L instruction at location 16, which is where 
the address of the CVT is located.  If you try to display bytes 0-511 with 
TSO, you should be able to, but not bytes 512-2047.  And you can display 
bytes 2048-4095 with TSO.

Close, But not right. It is the 2nd 2K, bytes 2048-4095, that have this 
special attribute.

Peter Relson
z/OS Core Technology Design

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Bill Fairchild
IBM introduced the Low Address Protection feature in the early 1980s shortly 
before they announced S/370/XA.  It was first supported on S/370.  They even 
published a very short book describing this new feature and 3 or 4 other 
features that were being introduced at the same time.  The only other feature I 
remember was a microcoded assist for SETFRR ADD and SETFRR DELETE.  Even a key 
0 program is prevented from storing into bytes 0-511.  This feature has 
prevented an untold number of reIPLs that would have been caused by key 0 
programs that were not fully debugged, and also there were many key 0 programs 
in which a lazy programmer, after disabling the current CPU for interrupts, 
would store something "temporarily" into some reserved field in bytes 0-511.  
All those kinds of programs began ABENDing after LAP was installed.  So the fix 
was to save whatever needed to be saved temporarily into some reserved field in 
bytes 512-4095, in which there are plenty of reserved fields, or!
  at least fields that cannot be used by any part of the operating system when 
the current CPU is running disabled.

At some time later, IBM also added a special protection feature for bytes 
512-2047 of page 0.  This feature, described in the Principles of Operation, 
and which is also both hardware and software, causes a program interrupt by any 
attempt for a non-key-0 program to fetch any storage in the first virtual 2K, 
where many register save areas are located, except for bytes 0-511, which may 
be fetched by a non-key-0 program.  This allows the normal program to do a L 
instruction at location 16, which is where the address of the CVT is located.  
If you try to display bytes 0-511 with TSO, you should be able to, but not 
bytes 512-2047.  And you can display bytes 2048-4095 with TSO.

The 512-2047 byte protection was added to reduce hacking.  LAP was added to 
reduce unplanned outages that were not caused by deliberate hacking.

Bill Fairchild
Rocket Software

-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of 
Edward Jaffe
Sent: Thursday, December 16, 2010 10:58 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: Batch program to update CVTUSER

On 12/16/2010 8:00 AM, Bill Fairchild wrote:
> When LAP is enabled, any attempt by the running program to store into virtual 
> addresses 0-511 of page 0 on a CPU is prevented.

And I'll wager there's not a serious developer working today whose system has 
not been "saved" at least once by this wonderful feature!

--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
edja...@phoenixsoftware.com
http://www.phoenixsoftware.com/

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Edward Jaffe

On 12/16/2010 8:00 AM, Bill Fairchild wrote:

When LAP is enabled, any attempt by the running program to store into virtual 
addresses 0-511 of page 0 on a CPU is prevented.


And I'll wager there's not a serious developer working today whose system has 
not been "saved" at least once by this wonderful feature!


--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
edja...@phoenixsoftware.com
http://www.phoenixsoftware.com/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Elardus Engelbrecht
Bill Fairchild wrote:

>Both.

>The hardware part of it is described in the Principles of Operation.  A 
>control 
register bit, if on, enables LAP.
>The software part of it is that at NIP the operating system (z/OS) turns the 
bit on.
>When LAP is enabled, any attempt by the running program to store into 
virtual addresses 0-511 of page 0 on a CPU is prevented.

Thanks. I appreciate your excellent explanation! I know about low virtual 
addresses are protected in a special way.

All of the very best for you! And please keep up with your excellent postings!

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Bill Fairchild
Both.

The hardware part of it is described in the Principles of Operation.  A control 
register bit, if on, enables LAP.

The software part of it is that at NIP the operating system (z/OS) turns the 
bit on.

When LAP is enabled, any attempt by the running program to store into virtual 
addresses 0-511 of page 0 on a CPU is prevented.

Bill Fairchild
Rocket Software

-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of 
Elardus Engelbrecht
Sent: Thursday, December 16, 2010 9:54 AM
To: IBM-MAIN@bama.ua.edu
Subject: Re: Batch program to update CVTUSER

Shmuel Metz (Seymour J.) wrote:

>>Is low address protection a hardware or software feature?

>Yes.

For what? Hardware, Software or both?

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Elardus Engelbrecht
Shmuel Metz (Seymour J.) wrote:

>>Is low address protection a hardware or software feature?

>Yes.

For what? Hardware, Software or both?

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In , on
12/15/2010
   at 03:22 PM, Chris Craddock  said:

>Ok. "Don't do it". It is basically a bad idea. While that field was
>originally intended for "user" (i.e. "customer") use, in practice it
>is unusable.

It's perfectly usable *by the customer*. What is a bad idea is for
3rd-party softre to use CVTUSER or TCBUSER.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In <4d09210f.7090...@comcast.net>, on 12/15/2010
   at 02:11 PM, Ray Overby  said:

>Is low address protection a hardware or software feature?

Yes.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In
,
on 12/15/2010
   at 02:10 PM, "Chase, John"  said:

>Hmmm  Returns to caller in sup state and key 0  Sort of like
>a "magic SVC"?

Not really. If an unprivileged caller invokes his code, look for a
message from Dear Abby.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In ,
on 12/15/2010
   at 02:13 PM, "McKown, John"  said:

>hardware feature.

Not quite. The architecture has to support it, but the software still
has to request it.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In , on 12/15/2010
   at 10:59 PM, "Robert A. Rosenberg"  said:

>OTOH: TCBUSER is still a viable anchor point for within the address 
>space linkage

The same issue exists; it's viable *for the customer* to use it; it's
not viable for 3rd-party software to use it.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In <4d093be1.9010...@neo.tamu.edu>, on 12/15/2010
   at 04:06 PM, Richard L Peurifoy  said:

>I am curious about this. Do some vendors try to use this field?

They did, and some Dude named Dante wrote a comedy about them.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In , on
12/15/2010
   at 12:58 PM, Sam Siegel  said:

>Tom, I'm confused about your comment above.  

FLCCVT is a DS and CVTPTR is an EQU; the only difference between them
is how you establish addressability. They both refer to the CVT
pointer.

>The original post (shown below)  never loaded register 2 
>and therefore has the value provided by the caller.

The code shown below your comment includes

L R2,CVTPTR   LOAD UP CVT ADDRESS

What is that, chopped liver?

The code in Message-ID:  <4d09155b.10...@queensu.ca> not only loads
R2, but in Message-ID: 
 you
told him to replace the code with equivalent code.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In , on
12/15/2010
   at 11:33 AM, Sam Siegel  said:

>R2 is set incorrectly. 

What gives you that idea? Look at the definition of CVTPTR.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread Shmuel Metz (Seymour J.)
In <4d09155b.10...@queensu.ca>, on 12/15/2010
   at 02:22 PM, Lorne Dudley  said:

>The book says "the key of the storage area that the running program 
>tries to access is different from that of the running program".

That was true in OS/360. It hasn't been true[1] in decades. Starting
with OS/VS1 Release 1 and OS/VS2 Release 1 (SVS), IBM overloaded 0C4
with unrelated program interrupts. 

>* move 4 characters to CVTUSER

Not even close.

>  MVC   R3(4),=C'TEST'

There's your problem.

I believe that Steve offers a course in Assembler programming.

[1] There are still 0C4's that match the description, but they're
not as common as the ones that don't.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-16 Thread McKown, John
If you have a Parallel Sysplex (you have a Coupling Facility), you might want 
to consider using a new CICS facility called "named counter". It would require 
no special coding on your part at all.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFHP4B06/1.50

--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * 
john.mck...@healthmarkets.com * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

> -Original Message-
> From: IBM Mainframe Discussion List 
> [mailto:ibm-m...@bama.ua.edu] On Behalf Of Lorne Dudley
> Sent: Wednesday, December 15, 2010 5:25 PM
> To: IBM-MAIN@bama.ua.edu
> Subject: Re: Batch program to update CVTUSER
> 
> To Chris and others
> 
> I'm looking for a quick and dirty mechanism for three CICS regions 
> performing the same function to check a value and then 
> determine whether 
> to present a busy screen or allow sign-on based on the number 
> of current 
> tasks in each region.
> 
> CVTUSER (or some other global variable) will be set with the 
> "max-task" 
> value at which a busy screen will be presented.
> 
> I can use CVTUSER because I'm the system programmer and no 
> one else has 
> access to the system in this mode.  I'd love to use 
> NAMETOKENs pointing 
> to a control variable if anyone has code to share.
> 
> As has been obvious to a number of observers, it's been years since I 
> have dabbled in assembler code.  Yes, I do have a test LPAR 
> to try all 
> of this stuff out.
> 
> Regards
> 
> Lorne
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
> 
> 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Edward Jaffe

On 12/15/2010 7:59 PM, Robert A. Rosenberg wrote:


OTOH: TCBUSER is still a viable anchor point for within the address space 
linkage (you just use the one in the Job Step TCB and possibly clone it into 
any SubTask TCBs so you do not need to run the TCB chain to find the anchor 
value).


All of these "user" fields are really intended for customer use. IMHO, it would 
be a mistake for ISVs to use them.


--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
edja...@phoenixsoftware.com
http://www.phoenixsoftware.com/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Robert A. Rosenberg
At 17:10 -0600 on 12/15/2010, Chris Craddock wrote about Re: Batch 
program to update CVTUSER:



But there isn't any protocol or interface for sharing a single word with
others who would also like to use it. Heck back then we didn't even really
have the concept of an interface. So it rapidly became obvious to most folks
that the user words were in fact useless and their exploiters found another
way to do what they wanted.


OTOH: TCBUSER is still a viable anchor point for within the address 
space linkage (you just use the one in the Job Step TCB and possibly 
clone it into any SubTask TCBs so you do not need to run the TCB 
chain to find the anchor value).


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Lorne Dudley

Thanks to all who responded.

Here is the correct code.

 SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE & ID
 LRR9,R15  .SET UP ADDRESSABILITY
 USING Y,R9.SET UP ADDRESSABILITY
 USING CVT,R2  .CVT DSECT
*
 MODESET KEY=ZERO,MODE=SUP
*
* move 4 characters to CVTUSER
*
 L R2,CVTPTR
 MVC   CVTUSER,=C'TEST'
 RETURN (14,12),RC=0   .RETURN TO CALLER

This runs with zero completion code and I can see the results with REXX.

Best regards to all

Lorne

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Edward Jaffe

On 12/15/2010 3:24 PM, Lorne Dudley wrote:
... I'd love to use NAMETOKENs pointing to a control variable if anyone has 
code to share.


In the old days, we used to issue shared ENQs and then count them with GQSCAN. 
That can be done unauthorized. There was/is also the option of defining a 
subsystem and using the SSCT/SSVT to hold pointers and data. That requires 
authorization. These days Name/Token pairs are often the best approach, however 
a persistent system level pair will also require authorization.


--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
edja...@phoenixsoftware.com
http://www.phoenixsoftware.com/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Lorne Dudley

To Chris and others

I'm looking for a quick and dirty mechanism for three CICS regions 
performing the same function to check a value and then determine whether 
to present a busy screen or allow sign-on based on the number of current 
tasks in each region.


CVTUSER (or some other global variable) will be set with the "max-task" 
value at which a busy screen will be presented.


I can use CVTUSER because I'm the system programmer and no one else has 
access to the system in this mode.  I'd love to use NAMETOKENs pointing 
to a control variable if anyone has code to share.


As has been obvious to a number of observers, it's been years since I 
have dabbled in assembler code.  Yes, I do have a test LPAR to try all 
of this stuff out.


Regards

Lorne

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Chris Craddock
On Wed, Dec 15, 2010 at 4:06 PM, Richard L Peurifoy  wrote:

> On 12/15/2010 3:23 PM, Chris Craddock wrote:
>
>
>> Ok. "Don't do it". It is basically a bad idea. While that field was
>> originally intended for "user" (i.e. "customer") use, in practice it is
>> unusable. If you want to be able to anchor something globally then you
>> should probably use some common storage and create a global name/token
>> pair
>> to point to it.
>>
>>
> I am curious about this. Do some vendors try to use this field?
> If so, I guess we have been lucky in our choice of vendors.
> We have used this field to anchor a local "CVT" for over 40 years
> and have had no problems. If I were doing it now, I would probably
> use name/token, but it wasn't available then.



"back in the day..." adventurous folks like Lorne looked at the data areas
manuals or fiche and saw "USER area" and thought of interesting things to do
with that anchor (there are several scattered around the place). As a result
of that, there are probably dozens of examples of naive old-timey vendor
products that attempted to use those data areas over the years and as long a
nobody else was trying to use the same user words the products worked.

But there isn't any protocol or interface for sharing a single word with
others who would also like to use it. Heck back then we didn't even really
have the concept of an interface. So it rapidly became obvious to most folks
that the user words were in fact useless and their exploiters found another
way to do what they wanted.

Hence my question to Lorne... what are you actually trying to accomplish?


-- 
This email might be from the
artist formerly known as CC
(or not) You be the judge.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Gibney, Dave
I seem to remember COMPLETE from Software AG wanted to do this back in
the 80s. At that time, we had some local use that caused difficulties :)
I was still writing applications at the time, so I can't provide any
more details.

Now, we don't and neither do they (At least I don't believe they do, we
haven't run COMPLETE for a decade or so) . I don't think I would let
anything use it in this day and age.

Dave Gibney
Information Technology Services
Washington State University

> -Original Message-
> From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
> Behalf Of Richard L Peurifoy
> Sent: Wednesday, December 15, 2010 2:06 PM
> To: IBM-MAIN@bama.ua.edu
> Subject: Re: Batch program to update CVTUSER
> 
> On 12/15/2010 3:23 PM, Chris Craddock wrote:
> 
> >
> > Ok. "Don't do it". It is basically a bad idea. While that field was
> > originally intended for "user" (i.e. "customer") use, in practice it
> is
> > unusable. If you want to be able to anchor something globally then
> you
> > should probably use some common storage and create a global
> name/token pair
> > to point to it.
> >
> 
> I am curious about this. Do some vendors try to use this field?
> If so, I guess we have been lucky in our choice of vendors.
> We have used this field to anchor a local "CVT" for over 40 years
> and have had no problems. If I were doing it now, I would probably
> use name/token, but it wasn't available then.
> 
> --
> Richard
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Richard L Peurifoy

On 12/15/2010 3:23 PM, Chris Craddock wrote:



Ok. "Don't do it". It is basically a bad idea. While that field was
originally intended for "user" (i.e. "customer") use, in practice it is
unusable. If you want to be able to anchor something globally then you
should probably use some common storage and create a global name/token pair
to point to it.



I am curious about this. Do some vendors try to use this field?
If so, I guess we have been lucky in our choice of vendors.
We have used this field to anchor a local "CVT" for over 40 years
and have had no problems. If I were doing it now, I would probably
use name/token, but it wasn't available then.

--
Richard

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Bill Fairchild
The OP's batch program reminds me of what German physicist Wolfgang Pauli said 
upon reading a young physicist's paper:  "This isn't right, this isn't even 
wrong."

What are you trying to accomplish?  Are you trying to move some data into the 
4-byte field known as CVTUSER?  Your comment "* move 4 characters to CVTUSER" 
implies that that is your intent.  Or are you trying to move some data into the 
virtual storage whose address is in R3 at the time of the MVC instruction?  
Where did the batch program come from?  Did you write it?  If someone else 
wrote it, can you find the author and discuss it with him?  Why did you decide 
that CVTUSER would be a good place to put your data?  After your batch program 
runs, then what?  Will you look at the storage area CVTUSER to see if your data 
is in there?  If so, how do you plan to look at it?  If you succeed in moving 
your data into CVTUSER and there was something else already in there, are you 
ready for the possibly destructive consequences to your system?  The CVT is a 
part of the operating system controlled by IBM.  CVTUSER is documented as being 
"available to the user", which does not necessaril!
 y mean you.  It legally means whoever owns the license from IBM to run the 
operating system on the computer hardware, which is probably Queens University.

A long time ago, short-sighted systems programmers and/or developers used 
CVTUSER to contain the address of some dynamically acquired piece of storage 
that was used to control a vendor product, a major in-house application, or 
some other software that was not part of the IBM'S operating system.  There are 
a number of security issues involved in using this field.

Your MVC instruction is very wrong.  If you want to move something into 
CVTUSER, one way to do it is with this:  MVC   CVTUSER,=C'TEST'
Another way is with this:
 LAR3,CVTUSER
MVC   0(4,R3),=C'TEST'

If you are trying to learn how to use the Assembler language, you should not do 
so with any authorized program for a long time.

However, if you have your very own private copy of z/OS to play with (aka a 
"sandbox" system), there are no other users of your system, and it's running 
under VM, then go ahead and do anything you want, as your learning moments will 
not inconvenience anyone else when they go awry.

If you really want to move data into virtual storage address 3, we can help 
you.  You will need to alter the contents of one of the control registers, 
which you can do since your program is authorized.  But this is a really bad 
idea, as is also trying to move data into CVTUSER.

Bill Fairchild
Rocket Software

-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of 
Tom Marchant
Sent: Wednesday, December 15, 2010 3:09 PM
To: IBM-MAIN@bama.ua.edu
Subject: Re: Batch program to update CVTUSER

On Wed, 15 Dec 2010 12:58:02 -0800, Sam Siegel wrote:

>On Wed, Dec 15, 2010 at 12:40 PM, Tom Marchant wrote:
>
>> On Wed, 15 Dec 2010 11:33:18 -0800, Sam Siegel wrote:
>>
>> >R2 is set incorrectly.  It needs to be loaded as follows:
>> >   using PSA,R0  include macro: IHAPSA
>> >   LR2,FLCCVT   r2 = address of CVT
>> >   drop r0
>> > --> Delete or comment out this lineL R2,CVTPTR   LOAD
>> >UP CVT ADDRESS
>>
>> Nope.  Either code produces the same result.
>>
> Tom, I'm confused about your comment above.  The original post (shown
>below) never loaded register 2

Never loaded register 2?
What do you call this, which you quoted from the OP?

>L R2,CVTPTR   LOAD UP CVT ADDRESS

Maybe you should look up the value of CVTPTR.
Hint: It is not a field in the CVT.

--
Tom Marchant

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Chris Craddock
On Wed, Dec 15, 2010 at 1:22 PM, Lorne Dudley  wrote:

> I'm having problems getting the following batch program to run correctly.
>  It's running from an authorized library and abends with 0C4, reason code 4.
>
> The book says "the key of the storage area that the running program tries
> to access is different from that of the running program".
>
> Data Areas for CVT says
> Storage Attributes: Subpool: Nucleus
> Key: 0
> Residency: Below 16M line
>
> Any ideas appreciated.
>


Ok. "Don't do it". It is basically a bad idea. While that field was
originally intended for "user" (i.e. "customer") use, in practice it is
unusable. If you want to be able to anchor something globally then you
should probably use some common storage and create a global name/token pair
to point to it.




> LRR9,R15  .SET UP ADDRESSABILITY
> USING Y,R9.SET UP ADDRESSABILITY
> USING CVT,R2  .CVT DSECT
> *
> MODESET KEY=ZERO,MODE=SUP
> *
> L R2,CVTPTR   LOAD UP CVT ADDRESS
> L R3,CVTUSER  LOAD CVTUSER ADDRESS
>


If you wanted to alter the contents of CVTUSER (a bad idea remember) then
you should use "LA R3,CVTUSER"



> * move 4 characters to CVTUSER
> MVC   R3(4),=C'TEST'
> RETURN (14,12),RC=0   .RETURN TO CALLER
>


Not to be harsh, but you obviously don't know what you're doing.
Unfortunately what you're doing is potentially harmful.  As it is you would
get the contents of CVTUSER (i.e. zero) in R3 and your subsequent move would
fail with a S0C4-4, but only because the hardware provides low address
protection. Almost anywhere else you'd clobber whatever happened to be
there.

What problem (other than just playing around) are you really trying to
solve?


-- 
This email might be from the
artist formerly known as CC
(or not) You be the judge.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Tom Marchant
On Wed, 15 Dec 2010 12:58:02 -0800, Sam Siegel wrote:

>On Wed, Dec 15, 2010 at 12:40 PM, Tom Marchant wrote:
>
>> On Wed, 15 Dec 2010 11:33:18 -0800, Sam Siegel wrote:
>>
>> >R2 is set incorrectly.  It needs to be loaded as follows:
>> >   using PSA,R0  include macro: IHAPSA
>> >   LR2,FLCCVT   r2 = address of CVT
>> >   drop r0
>> > --> Delete or comment out this lineL R2,CVTPTR   LOAD
>> >UP CVT ADDRESS
>>
>> Nope.  Either code produces the same result.
>>
> Tom, I'm confused about your comment above.  The original post (shown
>below) never loaded register 2

Never loaded register 2?
What do you call this, which you quoted from the OP?

>L R2,CVTPTR   LOAD UP CVT ADDRESS

Maybe you should look up the value of CVTPTR.
Hint: It is not a field in the CVT.

-- 
Tom Marchant

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Sam Siegel
On Wed, Dec 15, 2010 at 12:58 PM, Sam Siegel  wrote:

>
>
> On Wed, Dec 15, 2010 at 12:40 PM, Tom Marchant 
> wrote:
>
>> On Wed, 15 Dec 2010 11:33:18 -0800, Sam Siegel wrote:
>>
>> >R2 is set incorrectly.  It needs to be loaded as follows:
>> >   using PSA,R0  include macro: IHAPSA
>> >   LR2,FLCCVT   r2 = address of CVT
>> >   drop r0
>> > --> Delete or comment out this lineL R2,CVTPTR
>> LOAD
>> >UP CVT ADDRESS
>>
>> Nope.  Either code produces the same result.
>>
>> Tom, I'm confused about your comment above.  The original post (shown
> below) never loaded register 2 and therefore has the value provided by the
> caller.  In this case, the OP indicated it is a batch job.  Wouldn't that
> tend to produce random values in R2?  Which in turn would tend to have
> CVTPTR address random storage locations?
>

My bad ... I should read the DOC ... it is an  equate to 16.

>
> Thanks,
> Sam
>
> TITLE 'CVTUSER TEST'
> CVT DSECT=YES,LIST=YES  .CVT DSECT
> YCSECT ,
> *
> *   REGISTER EQUATES
> *
> R0   EQU   0   .
> R1   EQU   1   .
> R2   EQU   2   .CVT ADDRESS
> R3   EQU   3   .CVTUSER ADDRESS
> R4   EQU   4   .
> R9   EQU   9   .BASE ADDRESS OF THIS EXIT
> R10  EQU   10  .
> R15  EQU   15  .
> *
>
> SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE & ID
> LRR9,R15  .SET UP ADDRESSABILITY
> USING Y,R9.SET UP ADDRESSABILITY
> USING CVT,R2  .CVT DSECT
> *
> MODESET KEY=ZERO,MODE=SUP
> *
>
> L R2,CVTPTR   LOAD UP CVT ADDRESS
> L R3,CVTUSER  LOAD CVTUSER ADDRESS
> * move 4 characters to CVTUSER
> MVC   R3(4),=C'TEST'
> RETURN (14,12),RC=0   .RETURN TO CALLER
> LTORG
> PATCHDC2D'0'   .16 BYTE PATCH AREA
> END
>
>
>> --
>>
>> Tom Marchant
>>
>> --
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
>> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>>
>
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Tom Marchant
On Wed, 15 Dec 2010 14:11:36 -0600, McKown, John wrote:

>And isn't he lucky that IBM implemented low-core protection? 
>In MVS, he'd be looking at an IPL at least. A hard wait or supervisor 
>program check loop at worse.

Location 0 was the restart new PSW.  You'd run just fine until someone 
caused a restart interruption.  In the old days, it was caused by 
pressing the RESTART button.  Today, it is done through the HMC.

Then, the restart would probably cause a specification exception.
After that, I'm not sure what would happen.

-- 
Tom Marchant

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Sam Siegel
On Wed, Dec 15, 2010 at 12:40 PM, Tom Marchant wrote:

> On Wed, 15 Dec 2010 11:33:18 -0800, Sam Siegel wrote:
>
> >R2 is set incorrectly.  It needs to be loaded as follows:
> >   using PSA,R0  include macro: IHAPSA
> >   LR2,FLCCVT   r2 = address of CVT
> >   drop r0
> > --> Delete or comment out this lineL R2,CVTPTR   LOAD
> >UP CVT ADDRESS
>
> Nope.  Either code produces the same result.
>
> Tom, I'm confused about your comment above.  The original post (shown
below) never loaded register 2 and therefore has the value provided by the
caller.  In this case, the OP indicated it is a batch job.  Wouldn't that
tend to produce random values in R2?  Which in turn would tend to have
CVTPTR address random storage locations?

Thanks,
Sam

TITLE 'CVTUSER TEST'
CVT DSECT=YES,LIST=YES  .CVT DSECT
YCSECT ,
*
*   REGISTER EQUATES
*
R0   EQU   0   .
R1   EQU   1   .
R2   EQU   2   .CVT ADDRESS
R3   EQU   3   .CVTUSER ADDRESS
R4   EQU   4   .
R9   EQU   9   .BASE ADDRESS OF THIS EXIT
R10  EQU   10  .
R15  EQU   15  .
*

SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE & ID
LRR9,R15  .SET UP ADDRESSABILITY
USING Y,R9.SET UP ADDRESSABILITY
USING CVT,R2  .CVT DSECT
*
MODESET KEY=ZERO,MODE=SUP
*
L R2,CVTPTR   LOAD UP CVT ADDRESS
L R3,CVTUSER  LOAD CVTUSER ADDRESS
* move 4 characters to CVTUSER
MVC   R3(4),=C'TEST'
RETURN (14,12),RC=0   .RETURN TO CALLER
LTORG
PATCHDC2D'0'   .16 BYTE PATCH AREA
END


> --
> Tom Marchant
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Tom Marchant
On Wed, 15 Dec 2010 11:33:18 -0800, Sam Siegel wrote:

>R2 is set incorrectly.  It needs to be loaded as follows:
>   using PSA,R0  include macro: IHAPSA
>   LR2,FLCCVT   r2 = address of CVT
>   drop r0
> --> Delete or comment out this lineL R2,CVTPTR   LOAD
>UP CVT ADDRESS

Nope.  Either code produces the same result.

-- 
Tom Marchant

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Binyamin Dissen
On Wed, 15 Dec 2010 12:48:13 -0700 Steve Comstock 
wrote:

:>On 12/15/2010 12:22 PM, Lorne Dudley wrote:
:>> I'm having problems getting the following batch program to run correctly. 
It's
:>> running from an authorized library and abends with 0C4, reason code 4.

:>> The book says "the key of the storage area that the running program tries to
:>> access is different from that of the running program".

:>> Data Areas for CVT says
:>> Storage Attributes: Subpool: Nucleus
:>> Key: 0
:>> Residency: Below 16M line

:>> Any ideas appreciated.

:>> The code is below, linked into an authorized library with
:>> SETCODE AC(1).

:>> 
-
:>> TITLE 'CVTUSER TEST'
:>> CVT DSECT=YES,LIST=YES .CVT DSECT
:>> Y CSECT ,
:>> *
:>> * REGISTER EQUATES
:>> *
:>> R0EQU   0 .
:>> R1EQU   1 .
:>> R2EQU   2 .CVT ADDRESS
:>> R3EQU   3 .CVTUSER ADDRESS
:>> R4EQU   4 .
:>> R9EQU   9 .BASE ADDRESS OF THIS EXIT
:>> R10   EQU   10 .
:>> R15   EQU   15 .
:>> *
:>>   SAVE (14,12),,X_V1.0_&SYSDATE   SAVE & ID
:>>   LRR9,R15 .SET UP ADDRESSABILITY
:>>   USING Y,R9 .SET UP ADDRESSABILITY
:>>   USING CVT,R2 .CVT DSECT
:>> *
:>>   MODESET KEY=ZERO,MODE=SUP
:>> *
:>>   L R2,CVTPTR  LOAD UP CVT ADDRESS
:>>   L R3,CVTUSER LOAD CVTUSER ADDRESS
:>> * move 4 characters to CVTUSER
:>>   MVC   R3(4),=C'TEST'

:>YIKES! the above says "move to a displacement of 3
:>for a length of 4 to absolute location 0, the
:>string "TEST". That is: move absolute locations 3-6
:>the string "TEST".

If you do not mind a nit - virtual location 3, and most likely not absolute
location 3.

:>You cannot use R3 to indicate a dynamic displacement.

There is no way to specify a dynamic displacement. EX alter the second byte
which never has a displacement.

:>>   RETURN (14,12),RC=0 .RETURN TO CALLER
:>>   LTORG
:>> PATCH DC 2D'0' .16 BYTE PATCH AREA
:>>   END

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread J R
> Hmmm Returns to caller in sup state and key 0 Sort of like a
> "magic SVC"?
> 
> Or does MODESET "automagically" cancel itself?

He said it's a batch program.  If that means that it's on the PGM= operand, 
then his return is to  SVC3 and no harm will result.  But, I agree, it's bad 
form.  


 
> Date: Wed, 15 Dec 2010 14:10:36 -0600
> From: jch...@ussco.com
> Subject: Re: Batch program to update CVTUSER
> To: IBM-MAIN@bama.ua.edu
> 
> > -Original Message-
> > From: IBM Mainframe Discussion List On Behalf Of Steve Comstock
> > 
> > On 12/15/2010 12:22 PM, Lorne Dudley wrote:
> > > I'm having problems getting the following batch program to run
> correctly. It's
> > > running from an authorized library and abends with 0C4, reason code
> 4.
> > >
> > > The book says "the key of the storage area that the running program
> tries to
> > > access is different from that of the running program".
> > >
> > > Data Areas for CVT says
> > > Storage Attributes: Subpool: Nucleus
> > > Key: 0
> > > Residency: Below 16M line
> > >
> > > Any ideas appreciated.
> > >
> > > The code is below, linked into an authorized library with
> > > SETCODE AC(1).
> > >
> > > Regards
> > >
> > > Lorne Dudley
> > > Queen's University
> > > Kingston, Ontario
> > >
> > >
> 
> -
> > > TITLE 'CVTUSER TEST'
> > > CVT DSECT=YES,LIST=YES .CVT DSECT
> > > Y CSECT ,
> > > *
> > > * REGISTER EQUATES
> > > *
> > > R0 EQU 0 .
> > > R1 EQU 1 .
> > > R2 EQU 2 .CVT ADDRESS
> > > R3 EQU 3 .CVTUSER ADDRESS
> > > R4 EQU 4 .
> > > R9 EQU 9 .BASE ADDRESS OF THIS EXIT
> > > R10 EQU 10 .
> > > R15 EQU 15 .
> > > *
> > > SAVE (14,12),,X_V1.0_&SYSDATE SAVE & ID
> > > LR R9,R15 .SET UP ADDRESSABILITY
> > > USING Y,R9 .SET UP ADDRESSABILITY
> > > USING CVT,R2 .CVT DSECT
> > > *
> > > MODESET KEY=ZERO,MODE=SUP
> > > *
> > > L R2,CVTPTR LOAD UP CVT ADDRESS
> > > L R3,CVTUSER LOAD CVTUSER ADDRESS
> > > * move 4 characters to CVTUSER
> > > MVC R3(4),=C'TEST'
> > 
> > YIKES! the above says "move to a displacement of 3
> > for a length of 4 to absolute location 0, the
> > string "TEST". That is: move absolute locations 3-6
> > the string "TEST".
> > 
> > You cannot use R3 to indicate a dynamic displacement.
> > 
> > 
> > > RETURN (14,12),RC=0 .RETURN TO CALLER
> > > LTORG
> > > PATCH DC 2D'0' .16 BYTE PATCH AREA
> > > END
> > >
> 
> Hmmm Returns to caller in sup state and key 0 Sort of like a
> "magic SVC"?
> 
> Or does MODESET "automagically" cancel itself?
> 
> -jc-
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
  
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread J R
> MVC R3(4),=C'TEST'

This appears not to have been written by an assembler programmer.  It tries to 
move C'TEST' to location 3.  

Try:  MVC   CVTUSER,=C'TEST'  


 
> Date: Wed, 15 Dec 2010 14:22:03 -0500
> From: dudl...@queensu.ca
> Subject: Batch program to update CVTUSER
> To: IBM-MAIN@bama.ua.edu
> 
> I'm having problems getting the following batch program to run 
> correctly. It's running from an authorized library and abends with 0C4, 
> reason code 4.
> 
> The book says "the key of the storage area that the running program 
> tries to access is different from that of the running program".
> 
> Data Areas for CVT says
> Storage Attributes: Subpool: Nucleus
> Key: 0
> Residency: Below 16M line
> 
> Any ideas appreciated.
> 
> The code is below, linked into an authorized library with
> SETCODE AC(1).
> 
> Regards
> 
> Lorne Dudley
> Queen's University
> Kingston, Ontario
> 
> -
> TITLE 'CVTUSER TEST'
> CVT DSECT=YES,LIST=YES .CVT DSECT
> Y CSECT ,
> *
> * REGISTER EQUATES
> *
> R0 EQU 0 .
> R1 EQU 1 .
> R2 EQU 2 .CVT ADDRESS
> R3 EQU 3 .CVTUSER ADDRESS
> R4 EQU 4 .
> R9 EQU 9 .BASE ADDRESS OF THIS EXIT
> R10 EQU 10 .
> R15 EQU 15 .
> *
> SAVE (14,12),,X_V1.0_&SYSDATE SAVE & ID
> LR R9,R15 .SET UP ADDRESSABILITY
> USING Y,R9 .SET UP ADDRESSABILITY
> USING CVT,R2 .CVT DSECT
> *
> MODESET KEY=ZERO,MODE=SUP
> *
> L R2,CVTPTR LOAD UP CVT ADDRESS
> L R3,CVTUSER LOAD CVTUSER ADDRESS
> * move 4 characters to CVTUSER
> MVC R3(4),=C'TEST'
> RETURN (14,12),RC=0 .RETURN TO CALLER
> LTORG
> PATCH DC 2D'0' .16 BYTE PATCH AREA
> END
  
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread McKown, John
hardware feature. I alos like that the page tables can be set so that a page is 
read-only even for PSW key 0 users.

John McKown 

Systems Engineer IV

IT

 

Administrative Services Group

 

HealthMarkets(r)

 

9151 Boulevard 26 * N. Richland Hills * TX 76010

(817) 255-3225 phone * 

john.mck...@healthmarkets.com * www.HealthMarkets.com

 

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

> -Original Message-
> From: IBM Mainframe Discussion List 
> [mailto:ibm-m...@bama.ua.edu] On Behalf Of Ray Overby
> Sent: Wednesday, December 15, 2010 2:12 PM
> To: IBM-MAIN@bama.ua.edu
> Subject: Re: Batch program to update CVTUSER
> 
> Another tactful way to say this is:
> 
> "How long would z/OS continue to run after this program is executed?"
> 
> Low address protection may cause this program to abend with a S0C4 if 
> they are lucky...
> 
> Is low address protection a hardware or software feature?
> 
> On 12/15/2010 14:06 PM, Tom Marchant wrote:
> > On Wed, 15 Dec 2010 14:22:03 -0500, Lorne Dudley wrote:
> >
> >> I'm having problems getting the following batch program to run
> >> correctly.  It's running from an authorized library and 
> abends with 0C4,
> >> reason code 4.
> >>
> >> The book says "the key of the storage area that the running program
> >> tries to access is different from that of the running program".
> >>
> >> 
> --
> ---
> >>   TITLE 'CVTUSER TEST'
> >>   CVT DSECT=YES,LIST=YES  .CVT DSECT
> >> YCSECT ,
> >> *
> >> *   REGISTER EQUATES
> >> *
> >> R0   EQU   0   .
> >> R1   EQU   1   .
> >> R2   EQU   2   .CVT ADDRESS
> >> R3   EQU   3   .CVTUSER ADDRESS
> >> R4   EQU   4   .
> >> R9   EQU   9   .BASE ADDRESS OF THIS EXIT
> >> R10  EQU   10  .
> >> R15  EQU   15  .
> >> *
> >>   SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE&  ID
> >>   LRR9,R15  .SET UP ADDRESSABILITY
> >>   USING Y,R9.SET UP ADDRESSABILITY
> >>   USING CVT,R2  .CVT DSECT
> >> *
> >>   MODESET KEY=ZERO,MODE=SUP
> >> *
> >>   L R2,CVTPTR   LOAD UP CVT ADDRESS
> >>   L R3,CVTUSER  LOAD CVTUSER ADDRESS
> >> * move 4 characters to CVTUSER
> >>   MVC   R3(4),=C'TEST'
> >>   RETURN (14,12),RC=0   .RETURN TO CALLER
> >>   LTORG
> >> PATCHDC2D'0'   .16 BYTE PATCH AREA
> >>   END
> >>
> > I don't want to be rude, but if you are not proficient at coding
> > in assembler and debugging, you really shouldn't be writing
> > authorized code.
> >
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
> 
> 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Ray Overby

Another tactful way to say this is:

"How long would z/OS continue to run after this program is executed?"

Low address protection may cause this program to abend with a S0C4 if 
they are lucky...


Is low address protection a hardware or software feature?

On 12/15/2010 14:06 PM, Tom Marchant wrote:

On Wed, 15 Dec 2010 14:22:03 -0500, Lorne Dudley wrote:


I'm having problems getting the following batch program to run
correctly.  It's running from an authorized library and abends with 0C4,
reason code 4.

The book says "the key of the storage area that the running program
tries to access is different from that of the running program".

-
  TITLE 'CVTUSER TEST'
  CVT DSECT=YES,LIST=YES  .CVT DSECT
YCSECT ,
*
*   REGISTER EQUATES
*
R0   EQU   0   .
R1   EQU   1   .
R2   EQU   2   .CVT ADDRESS
R3   EQU   3   .CVTUSER ADDRESS
R4   EQU   4   .
R9   EQU   9   .BASE ADDRESS OF THIS EXIT
R10  EQU   10  .
R15  EQU   15  .
*
  SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE&  ID
  LRR9,R15  .SET UP ADDRESSABILITY
  USING Y,R9.SET UP ADDRESSABILITY
  USING CVT,R2  .CVT DSECT
*
  MODESET KEY=ZERO,MODE=SUP
*
  L R2,CVTPTR   LOAD UP CVT ADDRESS
  L R3,CVTUSER  LOAD CVTUSER ADDRESS
* move 4 characters to CVTUSER
  MVC   R3(4),=C'TEST'
  RETURN (14,12),RC=0   .RETURN TO CALLER
  LTORG
PATCHDC2D'0'   .16 BYTE PATCH AREA
  END


I don't want to be rude, but if you are not proficient at coding
in assembler and debugging, you really shouldn't be writing
authorized code.



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread McKown, John
And isn't he lucky that IBM implemented low-core protection? In MVS, he'd be 
looking at an IPL at least. A hard wait or supervisor program check loop at 
worse.

John McKown 

Systems Engineer IV

IT

 

Administrative Services Group

 

HealthMarkets(r)

 

9151 Boulevard 26 * N. Richland Hills * TX 76010

(817) 255-3225 phone * 

john.mck...@healthmarkets.com * www.HealthMarkets.com

 

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

> -Original Message-
> From: IBM Mainframe Discussion List 
> [mailto:ibm-m...@bama.ua.edu] On Behalf Of Tom Marchant
> Sent: Wednesday, December 15, 2010 2:06 PM
> To: IBM-MAIN@bama.ua.edu
> Subject: Re: Batch program to update CVTUSER
> 
> On Wed, 15 Dec 2010 14:22:03 -0500, Lorne Dudley wrote:
> 
> >I'm having problems getting the following batch program to run
> >correctly.  It's running from an authorized library and 
> abends with 0C4,
> >reason code 4.
> >
> >The book says "the key of the storage area that the running program
> >tries to access is different from that of the running program".
> >
> >-
> 
> >  TITLE 'CVTUSER TEST'
> >  CVT DSECT=YES,LIST=YES  .CVT DSECT
> >YCSECT ,
> >*
> >*   REGISTER EQUATES
> >*
> >R0   EQU   0   .
> >R1   EQU   1   .
> >R2   EQU   2   .CVT ADDRESS
> >R3   EQU   3   .CVTUSER ADDRESS
> >R4   EQU   4   .
> >R9   EQU   9   .BASE ADDRESS OF THIS EXIT
> >R10  EQU   10  .
> >R15  EQU   15  .
> >*
> >  SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE & ID
> >  LRR9,R15  .SET UP ADDRESSABILITY
> >  USING Y,R9.SET UP ADDRESSABILITY
> >  USING CVT,R2  .CVT DSECT
> >*
> >  MODESET KEY=ZERO,MODE=SUP
> >*
> >  L R2,CVTPTR   LOAD UP CVT ADDRESS
> >  L R3,CVTUSER  LOAD CVTUSER ADDRESS
> >* move 4 characters to CVTUSER
> >  MVC   R3(4),=C'TEST'
> >  RETURN (14,12),RC=0   .RETURN TO CALLER
> >  LTORG
> >PATCHDC2D'0'   .16 BYTE PATCH AREA
> >  END
> >
> 
> I don't want to be rude, but if you are not proficient at coding 
> in assembler and debugging, you really shouldn't be writing 
> authorized code.
> 
> -- 
> Tom Marchant
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
> 
> 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Chase, John
> -Original Message-
> From: IBM Mainframe Discussion List On Behalf Of Steve Comstock
> 
> On 12/15/2010 12:22 PM, Lorne Dudley wrote:
> > I'm having problems getting the following batch program to run
correctly. It's
> > running from an authorized library and abends with 0C4, reason code
4.
> >
> > The book says "the key of the storage area that the running program
tries to
> > access is different from that of the running program".
> >
> > Data Areas for CVT says
> > Storage Attributes: Subpool: Nucleus
> > Key: 0
> > Residency: Below 16M line
> >
> > Any ideas appreciated.
> >
> > The code is below, linked into an authorized library with
> > SETCODE AC(1).
> >
> > Regards
> >
> > Lorne Dudley
> > Queen's University
> > Kingston, Ontario
> >
> >

-
> > TITLE 'CVTUSER TEST'
> > CVT DSECT=YES,LIST=YES .CVT DSECT
> > Y CSECT ,
> > *
> > * REGISTER EQUATES
> > *
> > R0EQU   0 .
> > R1EQU   1 .
> > R2EQU   2 .CVT ADDRESS
> > R3EQU   3 .CVTUSER ADDRESS
> > R4EQU   4 .
> > R9EQU   9 .BASE ADDRESS OF THIS EXIT
> > R10   EQU   10 .
> > R15   EQU   15 .
> > *
> >   SAVE (14,12),,X_V1.0_&SYSDATE   SAVE & ID
> >   LRR9,R15 .SET UP ADDRESSABILITY
> >   USING Y,R9 .SET UP ADDRESSABILITY
> >   USING CVT,R2 .CVT DSECT
> > *
> >   MODESET KEY=ZERO,MODE=SUP
> > *
> >   L R2,CVTPTR  LOAD UP CVT ADDRESS
> >   L R3,CVTUSER LOAD CVTUSER ADDRESS
> > * move 4 characters to CVTUSER
> >   MVC   R3(4),=C'TEST'
> 
> YIKES! the above says "move to a displacement of 3
> for a length of 4 to absolute location 0, the
> string "TEST". That is: move absolute locations 3-6
> the string "TEST".
> 
> You cannot use R3 to indicate a dynamic displacement.
> 
> 
> >   RETURN (14,12),RC=0 .RETURN TO CALLER
> >   LTORG
> > PATCH DC 2D'0' .16 BYTE PATCH AREA
> >   END
> >

Hmmm  Returns to caller in sup state and key 0  Sort of like a
"magic SVC"?

Or does MODESET "automagically" cancel itself?

-jc-

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Tom Marchant
On Wed, 15 Dec 2010 14:22:03 -0500, Lorne Dudley wrote:

>I'm having problems getting the following batch program to run
>correctly.  It's running from an authorized library and abends with 0C4,
>reason code 4.
>
>The book says "the key of the storage area that the running program
>tries to access is different from that of the running program".
>
>-
>  TITLE 'CVTUSER TEST'
>  CVT DSECT=YES,LIST=YES  .CVT DSECT
>YCSECT ,
>*
>*   REGISTER EQUATES
>*
>R0   EQU   0   .
>R1   EQU   1   .
>R2   EQU   2   .CVT ADDRESS
>R3   EQU   3   .CVTUSER ADDRESS
>R4   EQU   4   .
>R9   EQU   9   .BASE ADDRESS OF THIS EXIT
>R10  EQU   10  .
>R15  EQU   15  .
>*
>  SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE & ID
>  LRR9,R15  .SET UP ADDRESSABILITY
>  USING Y,R9.SET UP ADDRESSABILITY
>  USING CVT,R2  .CVT DSECT
>*
>  MODESET KEY=ZERO,MODE=SUP
>*
>  L R2,CVTPTR   LOAD UP CVT ADDRESS
>  L R3,CVTUSER  LOAD CVTUSER ADDRESS
>* move 4 characters to CVTUSER
>  MVC   R3(4),=C'TEST'
>  RETURN (14,12),RC=0   .RETURN TO CALLER
>  LTORG
>PATCHDC2D'0'   .16 BYTE PATCH AREA
>  END
>

I don't want to be rude, but if you are not proficient at coding 
in assembler and debugging, you really shouldn't be writing 
authorized code.

-- 
Tom Marchant

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Richard L Peurifoy

On 12/15/2010 1:48 PM, Sam Siegel wrote:

On Wed, Dec 15, 2010 at 11:38 AM, Richard L Peurifoy<
r-peuri...@neo.tamu.edu>  wrote:


On 12/15/2010 1:22 PM, Lorne Dudley wrote:


I'm having problems getting the following batch program to run
correctly. It's running from an authorized library and abends with 0C4,
reason code 4.





Thanks Richard, I missed that in the instructions I provided ... My bad ...
Your good.


Well it appears that in my hurried response, I missed a few things as
well.

--
Richard

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Steve Comstock

On 12/15/2010 12:22 PM, Lorne Dudley wrote:

I'm having problems getting the following batch program to run correctly. It's
running from an authorized library and abends with 0C4, reason code 4.

The book says "the key of the storage area that the running program tries to
access is different from that of the running program".

Data Areas for CVT says
Storage Attributes: Subpool: Nucleus
Key: 0
Residency: Below 16M line

Any ideas appreciated.

The code is below, linked into an authorized library with
SETCODE AC(1).

Regards

Lorne Dudley
Queen's University
Kingston, Ontario

-
TITLE 'CVTUSER TEST'
CVT DSECT=YES,LIST=YES .CVT DSECT
Y CSECT ,
*
* REGISTER EQUATES
*
R0EQU   0 .
R1EQU   1 .
R2EQU   2 .CVT ADDRESS
R3EQU   3 .CVTUSER ADDRESS
R4EQU   4 .
R9EQU   9 .BASE ADDRESS OF THIS EXIT
R10   EQU   10 .
R15   EQU   15 .
*
  SAVE (14,12),,X_V1.0_&SYSDATE   SAVE & ID
  LRR9,R15 .SET UP ADDRESSABILITY
  USING Y,R9 .SET UP ADDRESSABILITY
  USING CVT,R2 .CVT DSECT
*
  MODESET KEY=ZERO,MODE=SUP
*
  L R2,CVTPTR  LOAD UP CVT ADDRESS
  L R3,CVTUSER LOAD CVTUSER ADDRESS
* move 4 characters to CVTUSER
  MVC   R3(4),=C'TEST'


YIKES! the above says "move to a displacement of 3
for a length of 4 to absolute location 0, the
string "TEST". That is: move absolute locations 3-6
the string "TEST".

You cannot use R3 to indicate a dynamic displacement.



  RETURN (14,12),RC=0 .RETURN TO CALLER
  LTORG
PATCH DC 2D'0' .16 BYTE PATCH AREA
  END




--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

* To get a good Return on your Investment, first make an investment!
  + Training your people is an excellent investment

* Try our new tool for calculating your Return On Investment
for training dollars at
  http://www.trainersfriend.com/ROI/roi.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Sam Siegel
On Wed, Dec 15, 2010 at 11:38 AM, Richard L Peurifoy <
r-peuri...@neo.tamu.edu> wrote:

> On 12/15/2010 1:22 PM, Lorne Dudley wrote:
>
>> I'm having problems getting the following batch program to run
>> correctly. It's running from an authorized library and abends with 0C4,
>> reason code 4.
>>
>
>
Thanks Richard, I missed that in the instructions I provided ... My bad ...
Your good.
'


> Are you trying to update a field pointed to by CVTUSER, or
> are you trying to update the CVTUSER field in the CVT?
>
> If the latter, you need
>
> LAR3,CVTUSER  LOAD CVTUSER ADDRESS
>
> rather than
>
>
> L R3,CVTUSER  LOAD CVTUSER ADDRESS
>
> or
>
> MVC   CVTUSER,=C'TEST'
>
> instead of
>
>
> MVC   R3(4),=C'TEST'
>
> --
> Richard
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Richard L Peurifoy

On 12/15/2010 1:22 PM, Lorne Dudley wrote:

I'm having problems getting the following batch program to run
correctly. It's running from an authorized library and abends with 0C4,
reason code 4.


Are you trying to update a field pointed to by CVTUSER, or
are you trying to update the CVTUSER field in the CVT?

If the latter, you need

 LAR3,CVTUSER  LOAD CVTUSER ADDRESS

rather than

 L R3,CVTUSER  LOAD CVTUSER ADDRESS

or

 MVC   CVTUSER,=C'TEST'

instead of

 MVC   R3(4),=C'TEST'

--
Richard

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Batch program to update CVTUSER

2010-12-15 Thread Sam Siegel
On Wed, Dec 15, 2010 at 11:22 AM, Lorne Dudley  wrote:


>
> -
> TITLE 'CVTUSER TEST'
> CVT DSECT=YES,LIST=YES  .CVT DSECT
> YCSECT ,
> *
> *   REGISTER EQUATES
> *
> R0   EQU   0   .
> R1   EQU   1   .
> R2   EQU   2   .CVT ADDRESS
> R3   EQU   3   .CVTUSER ADDRESS
> R4   EQU   4   .
> R9   EQU   9   .BASE ADDRESS OF THIS EXIT
> R10  EQU   10  .
> R15  EQU   15  .
> *
> SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE & ID
> LRR9,R15  .SET UP ADDRESSABILITY
> USING Y,R9.SET UP ADDRESSABILITY
> USING CVT,R2  .CVT DSECT
>


*
> MODESET KEY=ZERO,MODE=SUP
> *
>

R2 is set incorrectly.  It needs to be loaded as follows:
   using PSA,R0  include macro: IHAPSA
   LR2,FLCCVT   r2 = address of CVT
   drop r0
 --> Delete or comment out this lineL R2,CVTPTR   LOAD
UP CVT ADDRESS



  L R3,CVTUSER  LOAD CVTUSER ADDRESS
> * move 4 characters to CVTUSER
> MVC   R3(4),=C'TEST'
> RETURN (14,12),RC=0   .RETURN TO CALLER
> LTORG
> PATCHDC2D'0'   .16 BYTE PATCH AREA
> END
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Batch program to update CVTUSER

2010-12-15 Thread Lorne Dudley
I'm having problems getting the following batch program to run 
correctly.  It's running from an authorized library and abends with 0C4, 
reason code 4.


The book says "the key of the storage area that the running program 
tries to access is different from that of the running program".


Data Areas for CVT says
Storage Attributes: Subpool: Nucleus
Key: 0
Residency: Below 16M line

Any ideas appreciated.

The code is below, linked into an authorized library with
SETCODE AC(1).

Regards

Lorne Dudley
Queen's University
Kingston, Ontario

-
 TITLE 'CVTUSER TEST'
 CVT DSECT=YES,LIST=YES  .CVT DSECT
YCSECT ,
*
*   REGISTER EQUATES
*
R0   EQU   0   .
R1   EQU   1   .
R2   EQU   2   .CVT ADDRESS
R3   EQU   3   .CVTUSER ADDRESS
R4   EQU   4   .
R9   EQU   9   .BASE ADDRESS OF THIS EXIT
R10  EQU   10  .
R15  EQU   15  .
*
 SAVE  (14,12),,X_V1.0_&SYSDATE  SAVE & ID
 LRR9,R15  .SET UP ADDRESSABILITY
 USING Y,R9.SET UP ADDRESSABILITY
 USING CVT,R2  .CVT DSECT
*
 MODESET KEY=ZERO,MODE=SUP
*
 L R2,CVTPTR   LOAD UP CVT ADDRESS
 L R3,CVTUSER  LOAD CVTUSER ADDRESS
* move 4 characters to CVTUSER
 MVC   R3(4),=C'TEST'
 RETURN (14,12),RC=0   .RETURN TO CALLER
 LTORG
PATCHDC2D'0'   .16 BYTE PATCH AREA
 END

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html