On Wed, 15 Dec 2010 12:48:13 -0700 Steve Comstock <st...@trainersfriend.com>
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
:>> *
:>> 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".

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 <bdis...@dissensoftware.com>
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

Reply via email to