Re: BSAM READ AMODE 31 RMODE 31 does I/O area have to be fixed ?

2023-03-22 Thread Joseph Reichman
Hi 

This post is somewhat related to the original 

Post I was just looking at the parameters for DCBE and one of them FIXED=USER 
with this DCBE option you assert that data areas remain fixed from the time the 
read or write is issued through the completion of WAIT or CHECK

So first I was unaware of this 

Second does  this refer to the I/O areas 
Or the control block DCB, DCBE DECB as well 

I was able to get my READ working when I chose sp=233 for the I/O area which is 
it not pageable and fixed 

Thanks 

> On Mar 22, 2023, at 8:09 AM, reichman...@gmail.com wrote:
> 
> This is the code all I did was change the ioarea from sp=0 to sp=233 
> I am running under TESTAUTH and all my routines start by establishing an
> estate 
> 
> After the balr from the read (using sp = 0) that's were it went to the estae
> 
> Checked R1-> SDWAPTR at +5  for 12 bits was 800 r15 starting at +18 from
> sdwa was a 4
> 
> thanks
>L R0,=F'31996' 
> *   
>  MVCSUP_LIST(SUP_LEN),SUP_ONMOVE CONSTANT   
> *   
>  MODESET MF=(E,SUP_LIST)   STORAGE KEY ZERO 
> *   
>  SPKA   0   
>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=(31,64),SP=233
> <--
> *LAR7,IOAREA
> *STR7,IOPTR 
> *   
>  STR7,IOBUFF
>  L R7,IOBUFF
>  MVC   OPEN_LST(OPEN_LEN),OPEN_CON  
>  OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31 
> *   
> *MVC   ADATADECB(IREADLEN),IREAD
>  TMDCBOFLGS,DCBOFOPN
>  BZEXITDEBG 
>  USING ASMADATA,R7  
> PROCADATA DS   0H   
>  READ  ADATADECB,SF,(R6),(R7),'S',MF=E  
> *   
>  CHECK ADATADECB
> *   
>  LAR7,4(,R7)
>  CHSI  ADATA_RECTYPE,ADATA_RECESD  External sym dic.
>  BNE   CKSRC
> 
> 
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of
> Binyamin Dissen
> Sent: Wednesday, March 22, 2023 5:24 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: BSAM READ AMODE 31 RMODE 31
> 
> Did you check the dump as I suggested?
> 
> If so, post your new code.
> 
> On Wed, 22 Mar 2023 03:54:37 -0400 Joseph Reichman 
> wrote:
> 
> :>This was when I used R7 R7 had the address of the IOAREA it abended 800 RC
> 4 when I got the storage from sp 233 it worked :> :>This is application code
> subpool zero shouldn't give me a problem :> :>> On Mar 22, 2023, at 2:48 AM,
> Binyamin Dissen  wrote:
> :>>
> :>> ?Because when you supply IOBUFF as the address of the buffer it will
> overlay :>> storage following that label. That includes register save areas,
> code, etc.
> :>> Any kind of abend may occur.
> :>>
> :>> Look at your dump very carefully. See if the entire working storage is
> as :>> expected.
> :>>
> :>> Look at the trace table before the abend and t6he BEA. How did you get
> there?
> :>>
> :>>
> :>> On Tue, 21 Mar 2023 21:26:20 -0400 Joseph Reichman
>  :>> wrote:
> :>>
> :>> :>This totally crazy I abended 800 RC 4 :>> :>Looked at the abend codes
> says  system EXCPVSR was trying to page fix storage :>> :> :>> :>I then got
> sp 233 says it's fixed and also key 0 :>> :>Worked :>> :> :>> :>I don't get
> it there is no reason for the IOAREA to be sp 233 subpool 0 should be good
> enough :>> :> :>> :> :>> :> :>> :>> On Mar 21, 2023, at 11:43 AM, Seymour J
> Metz  wr

Re: BSAM READ AMODE 31 RMODE 31

2023-03-22 Thread Joseph Reichman
This is the code all I did was change the ioarea from sp=0 to sp=233 
I am running under TESTAUTH and all my routines start by establishing an
estate 

After the balr from the read (using sp = 0) that's were it went to the estae

Checked R1-> SDWAPTR at +5  for 12 bits was 800 r15 starting at +18 from
sdwa was a 4

thanks
L R0,=F'31996' 
 *   
  MVCSUP_LIST(SUP_LEN),SUP_ONMOVE CONSTANT   
 *   
  MODESET MF=(E,SUP_LIST)   STORAGE KEY ZERO 
 *   
  SPKA   0   
  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=(31,64),SP=233
<--
 *LAR7,IOAREA
 *STR7,IOPTR 
 *   
  STR7,IOBUFF
  L R7,IOBUFF
  MVC   OPEN_LST(OPEN_LEN),OPEN_CON  
  OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31 
 *   
 *MVC   ADATADECB(IREADLEN),IREAD
  TMDCBOFLGS,DCBOFOPN
  BZEXITDEBG 
  USING ASMADATA,R7  
 PROCADATA DS   0H   
  READ  ADATADECB,SF,(R6),(R7),'S',MF=E  
 *   
  CHECK ADATADECB
 *   
  LAR7,4(,R7)
  CHSI  ADATA_RECTYPE,ADATA_RECESD  External sym dic.
  BNE   CKSRC


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of
Binyamin Dissen
Sent: Wednesday, March 22, 2023 5:24 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: BSAM READ AMODE 31 RMODE 31

Did you check the dump as I suggested?

If so, post your new code.

On Wed, 22 Mar 2023 03:54:37 -0400 Joseph Reichman 
wrote:

:>This was when I used R7 R7 had the address of the IOAREA it abended 800 RC
4 when I got the storage from sp 233 it worked :> :>This is application code
subpool zero shouldn't give me a problem :> :>> On Mar 22, 2023, at 2:48 AM,
Binyamin Dissen  wrote:
:>>
:>> ?Because when you supply IOBUFF as the address of the buffer it will
overlay :>> storage following that label. That includes register save areas,
code, etc.
:>> Any kind of abend may occur.
:>>
:>> Look at your dump very carefully. See if the entire working storage is
as :>> expected.
:>>
:>> Look at the trace table before the abend and t6he BEA. How did you get
there?
:>>
:>>
:>> On Tue, 21 Mar 2023 21:26:20 -0400 Joseph Reichman
 :>> wrote:
:>>
:>> :>This totally crazy I abended 800 RC 4 :>> :>Looked at the abend codes
says  system EXCPVSR was trying to page fix storage :>> :> :>> :>I then got
sp 233 says it's fixed and also key 0 :>> :>Worked :>> :> :>> :>I don't get
it there is no reason for the IOAREA to be sp 233 subpool 0 should be good
enough :>> :> :>> :> :>> :> :>> :>> On Mar 21, 2023, at 11:43 AM, Seymour J
Metz  wrote:
:>> :>>
:>> :>> ?You have to give READ the address of the buffer, not the address of
a pointer to it.
:>> :>>
:>> :>> For 64-bit there is a different DECB format; I believe that's SF64.
:>> :>>
:>> :>> 
:>> :>> From: IBM Mainframe Discussion List  on
behalf of Joseph Reichman  :>> :>> Sent: Tuesday,
March 21, 2023 11:22 AM :>> :>> To: IBM-MAIN@LISTSERV.UA.EDU :>> :>>
Subject: Re: BSAM READ AMODE 31 RMODE 31 :>> :>> :>> :>> Still have problems
:>> :>> :>> :>> With the read :>> :>> :>> :>> I tried last night and it
worked let me explain :>> :>> :>> :>> The address of the IO area I store in
a full word :>> :>> IOBUFF :>> :>> :>> :>> When I did LA R7,IOBUFF :&

Re: BSAM READ AMODE 31 RMODE 31

2023-03-22 Thread Binyamin Dissen
Did you check the dump as I suggested?

If so, post your new code.

On Wed, 22 Mar 2023 03:54:37 -0400 Joseph Reichman 
wrote:

:>This was when I used R7 R7 had the address of the IOAREA it abended 800 RC 4 
when I got the storage from sp 233 it worked 
:>
:>This is application code subpool zero shouldn’t give me a problem 
:>
:>> On Mar 22, 2023, at 2:48 AM, Binyamin Dissen  
wrote:
:>> 
:>> ?Because when you supply IOBUFF as the address of the buffer it will overlay
:>> storage following that label. That includes register save areas, code, etc.
:>> Any kind of abend may occur.
:>> 
:>> Look at your dump very carefully. See if the entire working storage is as
:>> expected.
:>> 
:>> Look at the trace table before the abend and t6he BEA. How did you get 
there?
:>> 
:>> 
:>> On Tue, 21 Mar 2023 21:26:20 -0400 Joseph Reichman 
:>> wrote:
:>> 
:>> :>This totally crazy I abended 800 RC 4 
:>> :>Looked at the abend codes says  system EXCPVSR was trying to page fix 
storage 
:>> :>
:>> :>I then got sp 233 says it’s fixed and also key 0 
:>> :>Worked 
:>> :>
:>> :>I don’t get it there is no reason for the IOAREA to be sp 233 subpool 0 
should be good enough 
:>> :>
:>> :>
:>> :>
:>> :>> On Mar 21, 2023, at 11:43 AM, Seymour J Metz  wrote:
:>> :>> 
:>> :>> ?You have to give READ the address of the buffer, not the address of a 
pointer to it.
:>> :>> 
:>> :>> For 64-bit there is a different DECB format; I believe that's SF64.
:>> :>> 
:>> :>> 
:>> :>> From: IBM Mainframe Discussion List  on 
behalf of Joseph Reichman 
:>> :>> Sent: Tuesday, March 21, 2023 11:22 AM
:>> :>> To: IBM-MAIN@LISTSERV.UA.EDU
:>> :>> Subject: Re: BSAM READ AMODE 31 RMODE 31
:>> :>> 
:>> :>> Still have problems
:>> :>> 
:>> :>> With the read
:>> :>> 
:>> :>> I tried last night and it worked let me explain
:>> :>> 
:>> :>> The address of the IO area I store in a full word
:>> :>> IOBUFF
:>> :>> 
:>> :>> When I did LA R7,IOBUFF
:>> :>> And then did
:>> :>> 
:>> :>> READ ADATADECB,SF,(R6),(R7),’S’,MF=E
:>> :>> 
:>> :>> It worked today morning didn’t change code had problems
:>> :>> 
:>> :>> When I did L R7,IOBUFF it didn’t
:>> :>> 
:>> :>> I know both Binyamin and Charles Mills in their example had Load but it 
doesn’t make sense
:>> :>> 
:>> :>> At +12 is the address of a pointer to the IOAREA if that were the 
address it self
:>> :>> 
:>> :>> What if you had a 64 bit pointer (which bsam supoorts) so it had to be 
a pointer to where the pointer ( in 64 bit  that would 8 bytes )
:>> :>> Thanks
:>> :>> 
:>> :>> 
:>> :>>> On Mar 20, 2023, at 3:46 PM, Seymour J Metz  wrote:
:>> :>>> 
:>> :>>> ?IMHO it's clearer to just use
:>> :>>> 
:>> :>>> READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
:>> :>>> CHECK PDSDECB
:>> :>>> 
:>> :>>> 
:>> :>>> --
:>> :>>> Shmuel (Seymour J.) Metz
:>> :>>> http://mason.gmu.edu/~smetz3
:>> :>>> 
:>> :>>> 
:>> :>>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on 
behalf of Joseph Reichman [reichman...@gmail.com]
:>> :>>> Sent: Monday, March 20, 2023 9:20 AM
:>> :>>> To: IBM-MAIN@LISTSERV.UA.EDU
:>> :>>> Subject: BSAM READ AMODE 31 RMODE 31
:>> :>>> 
:>> :>>>  Hi
:>> :>>> 
:>> :>>> 
:>> :>>> 
:>> :>>> I know Charles Mills answered my question nearly 4 weeks ago but I 
would
:>> :>>> just like to corroborate the I/O areas for the read can be 31 bit 
addressing
:>> :>>> only the dcb and decb need to be below the line
:>> :>>> 
:>> :>>> I am running AMODE 31 RMODE 31
:>> :>>> 
:>> :>>> 
:>> :>>> 
:>> :>>> The DCB is below the line as well as the DECB
:>> :>>> 
:>> :>>> 
:>> :>>> 
:>> :>>> My read returns ok
:>> :>>> 
:>> :>>> 
:>> :>>> 
:>> :>>> After I set a beak point after the CHECK I get 

Re: BSAM READ AMODE 31 RMODE 31

2023-03-22 Thread Joseph Reichman
This was when I used R7 R7 had the address of the IOAREA it abended 800 RC 4 
when I got the storage from sp 233 it worked 

This is application code subpool zero shouldn’t give me a problem 

> On Mar 22, 2023, at 2:48 AM, Binyamin Dissen  
> wrote:
> 
> Because when you supply IOBUFF as the address of the buffer it will overlay
> storage following that label. That includes register save areas, code, etc.
> Any kind of abend may occur.
> 
> Look at your dump very carefully. See if the entire working storage is as
> expected.
> 
> Look at the trace table before the abend and t6he BEA. How did you get there?
> 
> 
> On Tue, 21 Mar 2023 21:26:20 -0400 Joseph Reichman 
> wrote:
> 
> :>This totally crazy I abended 800 RC 4 
> :>Looked at the abend codes says  system EXCPVSR was trying to page fix 
> storage 
> :>
> :>I then got sp 233 says it’s fixed and also key 0 
> :>Worked 
> :>
> :>I don’t get it there is no reason for the IOAREA to be sp 233 subpool 0 
> should be good enough 
> :>
> :>
> :>
> :>> On Mar 21, 2023, at 11:43 AM, Seymour J Metz  wrote:
> :>> 
> :>> ?You have to give READ the address of the buffer, not the address of a 
> pointer to it.
> :>> 
> :>> For 64-bit there is a different DECB format; I believe that's SF64.
> :>> 
> :>> ________
> :>> From: IBM Mainframe Discussion List  on behalf 
> of Joseph Reichman 
> :>> Sent: Tuesday, March 21, 2023 11:22 AM
> :>> To: IBM-MAIN@LISTSERV.UA.EDU
> :>> Subject: Re: BSAM READ AMODE 31 RMODE 31
> :>> 
> :>> Still have problems
> :>> 
> :>> With the read
> :>> 
> :>> I tried last night and it worked let me explain
> :>> 
> :>> The address of the IO area I store in a full word
> :>> IOBUFF
> :>> 
> :>> When I did LA R7,IOBUFF
> :>> And then did
> :>> 
> :>> READ ADATADECB,SF,(R6),(R7),’S’,MF=E
> :>> 
> :>> It worked today morning didn’t change code had problems
> :>> 
> :>> When I did L R7,IOBUFF it didn’t
> :>> 
> :>> I know both Binyamin and Charles Mills in their example had Load but it 
> doesn’t make sense
> :>> 
> :>> At +12 is the address of a pointer to the IOAREA if that were the address 
> it self
> :>> 
> :>> What if you had a 64 bit pointer (which bsam supoorts) so it had to be a 
> pointer to where the pointer ( in 64 bit  that would 8 bytes )
> :>> Thanks
> :>> 
> :>> 
> :>>> On Mar 20, 2023, at 3:46 PM, Seymour J Metz  wrote:
> :>>> 
> :>>> ?IMHO it's clearer to just use
> :>>> 
> :>>> READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
> :>>> CHECK PDSDECB
> :>>> 
> :>>> 
> :>>> --
> :>>> Shmuel (Seymour J.) Metz
> :>>> http://mason.gmu.edu/~smetz3
> :>>> 
> :>>> 
> :>>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf 
> of Joseph Reichman [reichman...@gmail.com]
> :>>> Sent: Monday, March 20, 2023 9:20 AM
> :>>> To: IBM-MAIN@LISTSERV.UA.EDU
> :>>> Subject: BSAM READ AMODE 31 RMODE 31
> :>>> 
> :>>>  Hi
> :>>> 
> :>>> 
> :>>> 
> :>>> I know Charles Mills answered my question nearly 4 weeks ago but I would
> :>>> just like to corroborate the I/O areas for the read can be 31 bit 
> addressing
> :>>> only the dcb and decb need to be below the line
> :>>> 
> :>>> I am running AMODE 31 RMODE 31
> :>>> 
> :>>> 
> :>>> 
> :>>> The DCB is below the line as well as the DECB
> :>>> 
> :>>> 
> :>>> 
> :>>> My read returns ok
> :>>> 
> :>>> 
> :>>> 
> :>>> After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
> :>>> 
> :>>> 
> :>>> 
> :>>> This the example that Charles sent to me does nt say anything about the
> :>>> IOAREAS or pointers to the IOAREAS
> :>>> 
> :>>> 
> :>>> 
> :>>> LA Rn,PDSDCB
> :>>> 
> :>>> ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
> :>>> 
> :>>> L Rn,address  of READ buffer
> :>>> 
> :>>> READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
> :>>> 
> :>>> 
> :>>

Re: BSAM READ AMODE 31 RMODE 31

2023-03-21 Thread Binyamin Dissen
Because when you supply IOBUFF as the address of the buffer it will overlay
storage following that label. That includes register save areas, code, etc.
Any kind of abend may occur.

Look at your dump very carefully. See if the entire working storage is as
expected.

Look at the trace table before the abend and t6he BEA. How did you get there?


On Tue, 21 Mar 2023 21:26:20 -0400 Joseph Reichman 
wrote:

:>This totally crazy I abended 800 RC 4 
:>Looked at the abend codes says  system EXCPVSR was trying to page fix storage 
:>
:>I then got sp 233 says it’s fixed and also key 0 
:>Worked 
:>
:>I don’t get it there is no reason for the IOAREA to be sp 233 subpool 0 
should be good enough 
:>
:>
:>
:>> On Mar 21, 2023, at 11:43 AM, Seymour J Metz  wrote:
:>> 
:>> ?You have to give READ the address of the buffer, not the address of a 
pointer to it.
:>> 
:>> For 64-bit there is a different DECB format; I believe that's SF64.
:>> 
:>> 
:>> From: IBM Mainframe Discussion List  on behalf of 
Joseph Reichman 
:>> Sent: Tuesday, March 21, 2023 11:22 AM
:>> To: IBM-MAIN@LISTSERV.UA.EDU
:>> Subject: Re: BSAM READ AMODE 31 RMODE 31
:>> 
:>> Still have problems
:>> 
:>> With the read
:>> 
:>> I tried last night and it worked let me explain
:>> 
:>> The address of the IO area I store in a full word
:>> IOBUFF
:>> 
:>> When I did LA R7,IOBUFF
:>> And then did
:>> 
:>> READ ADATADECB,SF,(R6),(R7),’S’,MF=E
:>> 
:>> It worked today morning didn’t change code had problems
:>> 
:>> When I did L R7,IOBUFF it didn’t
:>> 
:>> I know both Binyamin and Charles Mills in their example had Load but it 
doesn’t make sense
:>> 
:>> At +12 is the address of a pointer to the IOAREA if that were the address 
it self
:>> 
:>> What if you had a 64 bit pointer (which bsam supoorts) so it had to be a 
pointer to where the pointer ( in 64 bit  that would 8 bytes )
:>> Thanks
:>> 
:>> 
:>>> On Mar 20, 2023, at 3:46 PM, Seymour J Metz  wrote:
:>>> 
:>>> ?IMHO it's clearer to just use
:>>> 
:>>> READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
:>>> CHECK PDSDECB
:>>> 
:>>> 
:>>> --
:>>> Shmuel (Seymour J.) Metz
:>>> http://mason.gmu.edu/~smetz3
:>>> 
:>>> 
:>>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf 
of Joseph Reichman [reichman...@gmail.com]
:>>> Sent: Monday, March 20, 2023 9:20 AM
:>>> To: IBM-MAIN@LISTSERV.UA.EDU
:>>> Subject: BSAM READ AMODE 31 RMODE 31
:>>> 
:>>>  Hi
:>>> 
:>>> 
:>>> 
:>>> I know Charles Mills answered my question nearly 4 weeks ago but I would
:>>> just like to corroborate the I/O areas for the read can be 31 bit 
addressing
:>>> only the dcb and decb need to be below the line
:>>> 
:>>> I am running AMODE 31 RMODE 31
:>>> 
:>>> 
:>>> 
:>>> The DCB is below the line as well as the DECB
:>>> 
:>>> 
:>>> 
:>>> My read returns ok
:>>> 
:>>> 
:>>> 
:>>> After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
:>>> 
:>>> 
:>>> 
:>>> This the example that Charles sent to me does nt say anything about the
:>>> IOAREAS or pointers to the IOAREAS
:>>> 
:>>> 
:>>> 
:>>> LA Rn,PDSDCB
:>>> 
:>>> ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
:>>> 
:>>> L Rn,address  of READ buffer
:>>> 
:>>> READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
:>>> 
:>>> 
:>>> 
:>>> 
:>>> 
:>>> 
:>>> 
:>>> 
:>>> 
:>>> This is my read
:>>> 
:>>> 
:>>> 
:>>> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
:>>> 
:>>> 
:>>> 
:>>> The  IOBUFF is a full word  pointer to the storage I obtain
:>>> 
:>>> 
:>>> 
:>>> 
:>>> 
:>>> Here is my code
:>>> 
:>>> 
:>>> 
:>>> LAR0,IODSECTLEN
:>>> 
:>>> STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
:>>> 
:>>> LRR9,R6
:>>> 
:>>> USING IHADCB,R9
:>>> 
:>>> USING IODSECT,R6
:>>> 
:>>> *
:>>> 
:>>> *
:>>> 
:>>&g

Re: BSAM READ AMODE 31 RMODE 31

2023-03-21 Thread Joseph Reichman
This totally crazy I abended 800 RC 4 
Looked at the abend codes says  system EXCPVSR was trying to page fix storage 

I then got sp 233 says it’s fixed and also key 0 
Worked 

I don’t get it there is no reason for the IOAREA to be sp 233 subpool 0 should 
be good enough 



> On Mar 21, 2023, at 11:43 AM, Seymour J Metz  wrote:
> 
> You have to give READ the address of the buffer, not the address of a 
> pointer to it.
> 
> For 64-bit there is a different DECB format; I believe that's SF64.
> 
> 
> From: IBM Mainframe Discussion List  on behalf of 
> Joseph Reichman 
> Sent: Tuesday, March 21, 2023 11:22 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: BSAM READ AMODE 31 RMODE 31
> 
> Still have problems
> 
> With the read
> 
> I tried last night and it worked let me explain
> 
> The address of the IO area I store in a full word
> IOBUFF
> 
> When I did LA R7,IOBUFF
> And then did
> 
> READ ADATADECB,SF,(R6),(R7),’S’,MF=E
> 
> It worked today morning didn’t change code had problems
> 
> When I did L R7,IOBUFF it didn’t
> 
> I know both Binyamin and Charles Mills in their example had Load but it 
> doesn’t make sense
> 
> At +12 is the address of a pointer to the IOAREA if that were the address it 
> self
> 
> What if you had a 64 bit pointer (which bsam supoorts) so it had to be a 
> pointer to where the pointer ( in 64 bit  that would 8 bytes )
> Thanks
> 
> 
>> On Mar 20, 2023, at 3:46 PM, Seymour J Metz  wrote:
>> 
>> IMHO it's clearer to just use
>> 
>> READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
>> CHECK PDSDECB
>> 
>> 
>> --
>> Shmuel (Seymour J.) Metz
>> http://mason.gmu.edu/~smetz3
>> 
>> 
>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>> Joseph Reichman [reichman...@gmail.com]
>> Sent: Monday, March 20, 2023 9:20 AM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: BSAM READ AMODE 31 RMODE 31
>> 
>>  Hi
>> 
>> 
>> 
>> I know Charles Mills answered my question nearly 4 weeks ago but I would
>> just like to corroborate the I/O areas for the read can be 31 bit addressing
>> only the dcb and decb need to be below the line
>> 
>> I am running AMODE 31 RMODE 31
>> 
>> 
>> 
>> The DCB is below the line as well as the DECB
>> 
>> 
>> 
>> My read returns ok
>> 
>> 
>> 
>> After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
>> 
>> 
>> 
>> This the example that Charles sent to me does nt say anything about the
>> IOAREAS or pointers to the IOAREAS
>> 
>> 
>> 
>> LA Rn,PDSDCB
>> 
>> ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
>> 
>> L Rn,address  of READ buffer
>> 
>> READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> This is my read
>> 
>> 
>> 
>> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
>> 
>> 
>> 
>> The  IOBUFF is a full word  pointer to the storage I obtain
>> 
>> 
>> 
>> 
>> 
>> Here is my code
>> 
>> 
>> 
>> LAR0,IODSECTLEN
>> 
>> STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
>> 
>> LRR9,R6
>> 
>> USING IHADCB,R9
>> 
>> USING IODSECT,R6
>> 
>> *
>> 
>> *
>> 
>> LAR7,SYSADATA
>> 
>> MVC   0(IODSECTLEN,R6),0(R7)
>> 
>> *
>> 
>> LAR7,SYSDCBE-SYSADATA(,R6)
>> 
>> STR7,DCBDCBE
>> 
>> LAR7,EX24LST-SYSADATA(,R6)
>> 
>> STCM  R7,B'0111',DCBEXLSA
>> 
>> LAR7,ABND24-SYSADATA(,R6)
>> 
>> STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)
>> 
>> LAR7,ABENDRTN
>> 
>> STR7,ABEND31-SYSADATA(,R6)
>> 
>> *
>> 
>> T  L R0,=F'31996'
>> 
>> *
>> 
>> STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0
>> 
>> *LAR7,IOAREA
>> 
>> *STR7,IOPTR
>> 
>> *
>> 
>> STR7,IOBUFF
>> 
>> MVC   OPEN_LST(OPEN_LEN),OPEN_CON
>> 
>> OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31
>> 
>> *
>> 
>> TMDCBOFLGS,DCBOFOPN
>> 
>

Re: BSAM READ AMODE 31 RMODE 31

2023-03-21 Thread Joseph Reichman
All I want to say then is the comment next to the ST Rx,12(R1) says store 64 
bit pointer not saying  you are not right

Thank you 

> On Mar 21, 2023, at 11:43 AM, Seymour J Metz  wrote:
> 
> You have to give READ the address of the buffer, not the address of a 
> pointer to it.
> 
> For 64-bit there is a different DECB format; I believe that's SF64.
> 
> 
> From: IBM Mainframe Discussion List  on behalf of 
> Joseph Reichman 
> Sent: Tuesday, March 21, 2023 11:22 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: BSAM READ AMODE 31 RMODE 31
> 
> Still have problems
> 
> With the read
> 
> I tried last night and it worked let me explain
> 
> The address of the IO area I store in a full word
> IOBUFF
> 
> When I did LA R7,IOBUFF
> And then did
> 
> READ ADATADECB,SF,(R6),(R7),’S’,MF=E
> 
> It worked today morning didn’t change code had problems
> 
> When I did L R7,IOBUFF it didn’t
> 
> I know both Binyamin and Charles Mills in their example had Load but it 
> doesn’t make sense
> 
> At +12 is the address of a pointer to the IOAREA if that were the address it 
> self
> 
> What if you had a 64 bit pointer (which bsam supoorts) so it had to be a 
> pointer to where the pointer ( in 64 bit  that would 8 bytes )
> Thanks
> 
> 
>> On Mar 20, 2023, at 3:46 PM, Seymour J Metz  wrote:
>> 
>> IMHO it's clearer to just use
>> 
>> READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
>> CHECK PDSDECB
>> 
>> 
>> --
>> Shmuel (Seymour J.) Metz
>> http://mason.gmu.edu/~smetz3
>> 
>> 
>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>> Joseph Reichman [reichman...@gmail.com]
>> Sent: Monday, March 20, 2023 9:20 AM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: BSAM READ AMODE 31 RMODE 31
>> 
>>  Hi
>> 
>> 
>> 
>> I know Charles Mills answered my question nearly 4 weeks ago but I would
>> just like to corroborate the I/O areas for the read can be 31 bit addressing
>> only the dcb and decb need to be below the line
>> 
>> I am running AMODE 31 RMODE 31
>> 
>> 
>> 
>> The DCB is below the line as well as the DECB
>> 
>> 
>> 
>> My read returns ok
>> 
>> 
>> 
>> After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
>> 
>> 
>> 
>> This the example that Charles sent to me does nt say anything about the
>> IOAREAS or pointers to the IOAREAS
>> 
>> 
>> 
>> LA Rn,PDSDCB
>> 
>> ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
>> 
>> L Rn,address  of READ buffer
>> 
>> READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> This is my read
>> 
>> 
>> 
>> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
>> 
>> 
>> 
>> The  IOBUFF is a full word  pointer to the storage I obtain
>> 
>> 
>> 
>> 
>> 
>> Here is my code
>> 
>> 
>> 
>> LAR0,IODSECTLEN
>> 
>> STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
>> 
>> LRR9,R6
>> 
>> USING IHADCB,R9
>> 
>> USING IODSECT,R6
>> 
>> *
>> 
>> *
>> 
>> LAR7,SYSADATA
>> 
>> MVC   0(IODSECTLEN,R6),0(R7)
>> 
>> *
>> 
>> LAR7,SYSDCBE-SYSADATA(,R6)
>> 
>> STR7,DCBDCBE
>> 
>> LAR7,EX24LST-SYSADATA(,R6)
>> 
>> STCM  R7,B'0111',DCBEXLSA
>> 
>> LAR7,ABND24-SYSADATA(,R6)
>> 
>> STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)
>> 
>> LAR7,ABENDRTN
>> 
>> STR7,ABEND31-SYSADATA(,R6)
>> 
>> *
>> 
>> T  L R0,=F'31996'
>> 
>> *
>> 
>> STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0
>> 
>> *LAR7,IOAREA
>> 
>> *STR7,IOPTR
>> 
>> *
>> 
>> STR7,IOBUFF
>> 
>> MVC   OPEN_LST(OPEN_LEN),OPEN_CON
>> 
>> OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31
>> 
>> *
>> 
>> TMDCBOFLGS,DCBOFOPN
>> 
>> BZEXITDEBG
>&

Re: BSAM READ AMODE 31 RMODE 31

2023-03-21 Thread Seymour J Metz
You have to give READ the address of the buffer, not the address of a pointer 
to it.

For 64-bit there is a different DECB format; I believe that's SF64.


From: IBM Mainframe Discussion List  on behalf of 
Joseph Reichman 
Sent: Tuesday, March 21, 2023 11:22 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: BSAM READ AMODE 31 RMODE 31

Still have problems

With the read

I tried last night and it worked let me explain

The address of the IO area I store in a full word
IOBUFF

When I did LA R7,IOBUFF
And then did

READ ADATADECB,SF,(R6),(R7),’S’,MF=E

It worked today morning didn’t change code had problems

When I did L R7,IOBUFF it didn’t

I know both Binyamin and Charles Mills in their example had Load but it doesn’t 
make sense

At +12 is the address of a pointer to the IOAREA if that were the address it 
self

What if you had a 64 bit pointer (which bsam supoorts) so it had to be a 
pointer to where the pointer ( in 64 bit  that would 8 bytes )
Thanks


> On Mar 20, 2023, at 3:46 PM, Seymour J Metz  wrote:
>
> IMHO it's clearer to just use
>
> READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
> CHECK PDSDECB
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Joseph Reichman [reichman...@gmail.com]
> Sent: Monday, March 20, 2023 9:20 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: BSAM READ AMODE 31 RMODE 31
>
>   Hi
>
>
>
> I know Charles Mills answered my question nearly 4 weeks ago but I would
> just like to corroborate the I/O areas for the read can be 31 bit addressing
> only the dcb and decb need to be below the line
>
> I am running AMODE 31 RMODE 31
>
>
>
> The DCB is below the line as well as the DECB
>
>
>
> My read returns ok
>
>
>
> After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
>
>
>
> This the example that Charles sent to me does nt say anything about the
> IOAREAS or pointers to the IOAREAS
>
>
>
> LA Rn,PDSDCB
>
> ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
>
> L Rn,address  of READ buffer
>
> READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
>
>
>
>
>
>
>
>
>
> This is my read
>
>
>
> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
>
>
>
> The  IOBUFF is a full word  pointer to the storage I obtain
>
>
>
>
>
>  Here is my code
>
>
>
>  LAR0,IODSECTLEN
>
>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
>
>  LRR9,R6
>
>  USING IHADCB,R9
>
>  USING IODSECT,R6
>
> *
>
> *
>
>  LAR7,SYSADATA
>
>  MVC   0(IODSECTLEN,R6),0(R7)
>
> *
>
>  LAR7,SYSDCBE-SYSADATA(,R6)
>
>  STR7,DCBDCBE
>
>  LAR7,EX24LST-SYSADATA(,R6)
>
>  STCM  R7,B'0111',DCBEXLSA
>
>  LAR7,ABND24-SYSADATA(,R6)
>
>  STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)
>
>  LAR7,ABENDRTN
>
>  STR7,ABEND31-SYSADATA(,R6)
>
> *
>
> T  L R0,=F'31996'
>
> *
>
>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0
>
> *LAR7,IOAREA
>
> *STR7,IOPTR
>
> *
>
>  STR7,IOBUFF
>
>  MVC   OPEN_LST(OPEN_LEN),OPEN_CON
>
>  OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31
>
> *
>
>  TMDCBOFLGS,DCBOFOPN
>
>  BZEXITDEBG
>
>  USING ASMADATA,R7
>
>  L R10,IOBUFF
>
> PROCADATA DS   0H
>
>  READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
>
> *
>
>  CHECK ADATADECB
>
> *
>
> OPEN_CON OPEN (*-*,INPUT),MF=L,MODE=31
>
> SYSADATA DCB DDNAME=SYSADATA,RECFM=VB,MACRF=RP,DSORG=PS,DCBE=SYSDCBE,EXX
>
>   LST=EX24LST
>
>
>
>  IHADECB DSECT=NO
>
> DECBLEN  EQU   *-DECB
>
> SYSDCBE  DCBE EODAD=FIN,GETSIZE=YES,LOC=ANY,RMODE31=BUFF,SYNAD=SYNAD,VEX
>
>   RSION=1
>
> EX24LSTDS  0F
>
> ADATAEXLST DC  AL1(EXLDCBAB+X'80')
>
> ABND24ADR  DS  AL3
>
> ABND24 DS  0H
>
>   L   R15,ABEND31-SYSADATA(,R15)
>
>   BSM 0,R15
>
> ABEND31DS  XL4
>
> STROGE24   EQU *-EX24LST
>
> *
>
>  IODSECT   DSECT
>
> ADATADCB  DSCL(DCBLNGBS)
>
> ADATADECB DSCL(DECBLEN)
>
> ADATADCBE DSCL(DCBELENV1)
>
>  DS0F
>
> INST31DSCL(STROGE24)
>
> IODSECT

Re: BSAM READ AMODE 31 RMODE 31

2023-03-21 Thread Joseph Reichman
Forgot to mention the DECB is RMODE 24

> On Mar 20, 2023, at 3:46 PM, Seymour J Metz  wrote:
> 
> IMHO it's clearer to just use
> 
> READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
> CHECK PDSDECB 
> 
> 
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
> 
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Joseph Reichman [reichman...@gmail.com]
> Sent: Monday, March 20, 2023 9:20 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: BSAM READ AMODE 31 RMODE 31
> 
>   Hi
> 
> 
> 
> I know Charles Mills answered my question nearly 4 weeks ago but I would
> just like to corroborate the I/O areas for the read can be 31 bit addressing
> only the dcb and decb need to be below the line
> 
> I am running AMODE 31 RMODE 31
> 
> 
> 
> The DCB is below the line as well as the DECB
> 
> 
> 
> My read returns ok
> 
> 
> 
> After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
> 
> 
> 
> This the example that Charles sent to me does nt say anything about the
> IOAREAS or pointers to the IOAREAS
> 
> 
> 
> LA Rn,PDSDCB
> 
> ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
> 
> L Rn,address  of READ buffer
> 
> READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This is my read
> 
> 
> 
> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
> 
> 
> 
> The  IOBUFF is a full word  pointer to the storage I obtain
> 
> 
> 
> 
> 
>  Here is my code
> 
> 
> 
>  LAR0,IODSECTLEN
> 
>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
> 
>  LRR9,R6
> 
>  USING IHADCB,R9
> 
>  USING IODSECT,R6
> 
> *
> 
> *
> 
>  LAR7,SYSADATA
> 
>  MVC   0(IODSECTLEN,R6),0(R7)
> 
> *
> 
>  LAR7,SYSDCBE-SYSADATA(,R6)
> 
>  STR7,DCBDCBE
> 
>  LAR7,EX24LST-SYSADATA(,R6)
> 
>  STCM  R7,B'0111',DCBEXLSA
> 
>  LAR7,ABND24-SYSADATA(,R6)
> 
>  STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)
> 
>  LAR7,ABENDRTN
> 
>  STR7,ABEND31-SYSADATA(,R6)
> 
> *
> 
> T  L R0,=F'31996'
> 
> *
> 
>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0
> 
> *LAR7,IOAREA
> 
> *STR7,IOPTR
> 
> *
> 
>  STR7,IOBUFF
> 
>  MVC   OPEN_LST(OPEN_LEN),OPEN_CON
> 
>  OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31
> 
> *
> 
>  TMDCBOFLGS,DCBOFOPN
> 
>  BZEXITDEBG
> 
>  USING ASMADATA,R7
> 
>  L R10,IOBUFF
> 
> PROCADATA DS   0H
> 
>  READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
> 
> *
> 
>  CHECK ADATADECB
> 
> *
> 
> OPEN_CON OPEN (*-*,INPUT),MF=L,MODE=31
> 
> SYSADATA DCB DDNAME=SYSADATA,RECFM=VB,MACRF=RP,DSORG=PS,DCBE=SYSDCBE,EXX
> 
>   LST=EX24LST
> 
> 
> 
>  IHADECB DSECT=NO
> 
> DECBLEN  EQU   *-DECB
> 
> SYSDCBE  DCBE EODAD=FIN,GETSIZE=YES,LOC=ANY,RMODE31=BUFF,SYNAD=SYNAD,VEX
> 
>   RSION=1
> 
> EX24LSTDS  0F
> 
> ADATAEXLST DC  AL1(EXLDCBAB+X'80')
> 
> ABND24ADR  DS  AL3
> 
> ABND24 DS  0H
> 
>   L   R15,ABEND31-SYSADATA(,R15)
> 
>   BSM 0,R15
> 
> ABEND31DS  XL4
> 
> STROGE24   EQU *-EX24LST
> 
> *
> 
>  IODSECT   DSECT
> 
> ADATADCB  DSCL(DCBLNGBS)
> 
> ADATADECB DSCL(DECBLEN)
> 
> ADATADCBE DSCL(DCBELENV1)
> 
>  DS0F
> 
> INST31DSCL(STROGE24)
> 
> IODSECTLEN EQU  *-IODSECT
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BSAM READ AMODE 31 RMODE 31

2023-03-21 Thread Joseph Reichman
Still have problems 

With the read 

I tried last night and it worked let me explain 

The address of the IO area I store in a full word 
IOBUFF

When I did LA R7,IOBUFF  
And then did 

READ ADATADECB,SF,(R6),(R7),’S’,MF=E

It worked today morning didn’t change code had problems 

When I did L R7,IOBUFF it didn’t 

I know both Binyamin and Charles Mills in their example had Load but it doesn’t 
make sense 

At +12 is the address of a pointer to the IOAREA if that were the address it 
self 

What if you had a 64 bit pointer (which bsam supoorts) so it had to be a 
pointer to where the pointer ( in 64 bit  that would 8 bytes ) 
Thanks 


> On Mar 20, 2023, at 3:46 PM, Seymour J Metz  wrote:
> 
> IMHO it's clearer to just use
> 
> READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
> CHECK PDSDECB 
> 
> 
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
> 
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Joseph Reichman [reichman...@gmail.com]
> Sent: Monday, March 20, 2023 9:20 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: BSAM READ AMODE 31 RMODE 31
> 
>   Hi
> 
> 
> 
> I know Charles Mills answered my question nearly 4 weeks ago but I would
> just like to corroborate the I/O areas for the read can be 31 bit addressing
> only the dcb and decb need to be below the line
> 
> I am running AMODE 31 RMODE 31
> 
> 
> 
> The DCB is below the line as well as the DECB
> 
> 
> 
> My read returns ok
> 
> 
> 
> After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
> 
> 
> 
> This the example that Charles sent to me does nt say anything about the
> IOAREAS or pointers to the IOAREAS
> 
> 
> 
> LA Rn,PDSDCB
> 
> ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
> 
> L Rn,address  of READ buffer
> 
> READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This is my read
> 
> 
> 
> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
> 
> 
> 
> The  IOBUFF is a full word  pointer to the storage I obtain
> 
> 
> 
> 
> 
>  Here is my code
> 
> 
> 
>  LAR0,IODSECTLEN
> 
>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
> 
>  LRR9,R6
> 
>  USING IHADCB,R9
> 
>  USING IODSECT,R6
> 
> *
> 
> *
> 
>  LAR7,SYSADATA
> 
>  MVC   0(IODSECTLEN,R6),0(R7)
> 
> *
> 
>  LAR7,SYSDCBE-SYSADATA(,R6)
> 
>  STR7,DCBDCBE
> 
>  LAR7,EX24LST-SYSADATA(,R6)
> 
>  STCM  R7,B'0111',DCBEXLSA
> 
>  LAR7,ABND24-SYSADATA(,R6)
> 
>  STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)
> 
>  LAR7,ABENDRTN
> 
>  STR7,ABEND31-SYSADATA(,R6)
> 
> *
> 
> T  L R0,=F'31996'
> 
> *
> 
>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0
> 
> *LAR7,IOAREA
> 
> *STR7,IOPTR
> 
> *
> 
>  STR7,IOBUFF
> 
>  MVC   OPEN_LST(OPEN_LEN),OPEN_CON
> 
>  OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31
> 
> *
> 
>  TMDCBOFLGS,DCBOFOPN
> 
>  BZEXITDEBG
> 
>  USING ASMADATA,R7
> 
>  L R10,IOBUFF
> 
> PROCADATA DS   0H
> 
>  READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
> 
> *
> 
>  CHECK ADATADECB
> 
> *
> 
> OPEN_CON OPEN (*-*,INPUT),MF=L,MODE=31
> 
> SYSADATA DCB DDNAME=SYSADATA,RECFM=VB,MACRF=RP,DSORG=PS,DCBE=SYSDCBE,EXX
> 
>   LST=EX24LST
> 
> 
> 
>  IHADECB DSECT=NO
> 
> DECBLEN  EQU   *-DECB
> 
> SYSDCBE  DCBE EODAD=FIN,GETSIZE=YES,LOC=ANY,RMODE31=BUFF,SYNAD=SYNAD,VEX
> 
>   RSION=1
> 
> EX24LSTDS  0F
> 
> ADATAEXLST DC  AL1(EXLDCBAB+X'80')
> 
> ABND24ADR  DS  AL3
> 
> ABND24 DS  0H
> 
>   L   R15,ABEND31-SYSADATA(,R15)
> 
>   BSM 0,R15
> 
> ABEND31DS  XL4
> 
> STROGE24   EQU *-EX24LST
> 
> *
> 
>  IODSECT   DSECT
> 
> ADATADCB  DSCL(DCBLNGBS)
> 
> ADATADECB DSCL(DECBLEN)
> 
> ADATADCBE DSCL(DCBELENV1)
> 
>  DS0F
> 
> INST31DSCL(STROGE24)
> 
> IODSECTLEN EQU  *-IODSECT
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BSAM READ AMODE 31 RMODE 31

2023-03-20 Thread Seymour J Metz
IMHO it's clearer to just use

 READ  PDSDECB,SF,PDSDCB,address _of_READ_buffer,MF=E
 CHECK PDSDECB 


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Joseph Reichman [reichman...@gmail.com]
Sent: Monday, March 20, 2023 9:20 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: BSAM READ AMODE 31 RMODE 31

   Hi



I know Charles Mills answered my question nearly 4 weeks ago but I would
just like to corroborate the I/O areas for the read can be 31 bit addressing
only the dcb and decb need to be below the line

I am running AMODE 31 RMODE 31



The DCB is below the line as well as the DECB



My read returns ok



After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP



This the example that Charles sent to me does nt say anything about the
IOAREAS or pointers to the IOAREAS



LA Rn,PDSDCB

ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB

L Rn,address  of READ buffer

READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB









This is my read



 READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E



The  IOBUFF is a full word  pointer to the storage I obtain





  Here is my code



  LAR0,IODSECTLEN

  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0

  LRR9,R6

  USING IHADCB,R9

  USING IODSECT,R6

 *

 *

  LAR7,SYSADATA

  MVC   0(IODSECTLEN,R6),0(R7)

 *

  LAR7,SYSDCBE-SYSADATA(,R6)

  STR7,DCBDCBE

  LAR7,EX24LST-SYSADATA(,R6)

  STCM  R7,B'0111',DCBEXLSA

  LAR7,ABND24-SYSADATA(,R6)

  STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)

  LAR7,ABENDRTN

  STR7,ABEND31-SYSADATA(,R6)

 *

T  L R0,=F'31996'

 *

  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0

 *LAR7,IOAREA

 *STR7,IOPTR

 *

  STR7,IOBUFF

  MVC   OPEN_LST(OPEN_LEN),OPEN_CON

  OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31

 *

  TMDCBOFLGS,DCBOFOPN

  BZEXITDEBG

  USING ASMADATA,R7

  L R10,IOBUFF

 PROCADATA DS   0H

  READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E

 *

  CHECK ADATADECB

 *

OPEN_CON OPEN (*-*,INPUT),MF=L,MODE=31

SYSADATA DCB DDNAME=SYSADATA,RECFM=VB,MACRF=RP,DSORG=PS,DCBE=SYSDCBE,EXX

   LST=EX24LST



  IHADECB DSECT=NO

DECBLEN  EQU   *-DECB

SYSDCBE  DCBE EODAD=FIN,GETSIZE=YES,LOC=ANY,RMODE31=BUFF,SYNAD=SYNAD,VEX

   RSION=1

EX24LSTDS  0F

ADATAEXLST DC  AL1(EXLDCBAB+X'80')

ABND24ADR  DS  AL3

ABND24 DS  0H

   L   R15,ABEND31-SYSADATA(,R15)

   BSM 0,R15

ABEND31DS  XL4

STROGE24   EQU *-EX24LST

*

  IODSECT   DSECT

ADATADCB  DSCL(DCBLNGBS)

ADATADECB DSCL(DECBLEN)

ADATADCBE DSCL(DCBELENV1)

  DS0F

INST31DSCL(STROGE24)

IODSECTLEN EQU  *-IODSECT





















































--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BSAM READ AMODE 31 RMODE 31

2023-03-20 Thread Joseph Reichman
Thanks
 
 MVC   0(IODSECTLEN,R6),SYSADATA 
 
 LAR7,SYSDCBE
 STR7,DCBDCBE
 LAR7,EX24LST
 STCM  R7,B'0111',DCBEXLSA   
 LAR7,ABND24 
 STCM  R7,B'0111',ABND24ADR-SYSADATA(R6) 
 LAR7,ABENDRTN   
 STR7,ABEND31-SYSADATA(,R6)  
 

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of
Seymour J Metz
Sent: Monday, March 20, 2023 11:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: BSAM READ AMODE 31 RMODE 31

That doesn't explain why you had LA R7 in places where you didn't need a
pointer, 

  LAR7,SYSADATA
  MVC   0(IODSECTLEN,R6),0(R7)

Instead of the clearer

  MVC   0(IODSECTLEN,R6),SYSADATA

Side issue are why you had separate moves for initialization instead of one
big move and why you didn't just use symbolic names in your E-form macros
instead of register form parameters with an otherwise extraneous LA.

You might want to read up on dependent and labelled USING pseudo-ops.

Only the WAIT service should be storing an RB address in an ECB; the ECB
that you provide in the DECB should initially have a high bit of 0. Also,
the completion code is 31 bits, and a lot of system services have codes with
the lower 24 bits zero or containig a context for the code in bits 0-7. In
particular, Many services use 7F in the high byte for normal completion.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of
Joseph Reichman [reichman...@gmail.com]
Sent: Monday, March 20, 2023 10:10 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: BSAM READ AMODE 31 RMODE 31

Ok

Thanks
The reason I had the LA R7

I first had to get 24 bit storage for 1) dcb 2) decb though I realize it can
live in 31 bit
3) decb it has to live in 31 bit 4) initial exit code has to be 24 bit

Once moved I had to get the proper pointers
24 bit pointers for exlst , decb

Let me corroborate I understand why I got the error

After the read the first full word should be for the ECB so the low order
should have an RB Or if it already posted should have the first byte x'40'
followed by completion code which could be zeros what a saw in the ECB
address was the first byte x'7F'

Anyway I have to fix the read thank you

> On Mar 20, 2023, at 9:52 AM, Binyamin Dissen 
wrote:
>
> First of all, the buffer address specified on READ MF=E is an RX 
> address, not an indirect address.
>
> So the read will overlay from IOBBUFF. That could cause strange 
> results,
>
> You would need
>
>  L  Rx,IOBUFF
>  READ  ADATADECB,SF,(R6),(Rx),'S',MF=E
>
>
> Also, I do not understand why you use IHADECB in your work area rather 
> than a
>
> READ label,SF,1-1,2-2,'S',MF=L
>
> which will reserve the storage of the appropriate size.
>
> I would recommend against altering the DECB directly, as the READ 
> macro takes care of it.
>
> Very strange to STORAGE OBTAIN,ADDR=(R7) followed by a LA R7
>
> Back to the drawing board.
>
> On Mon, 20 Mar 2023 09:20:39 -0400 Joseph Reichman 
> 
> wrote:
>
> :>   Hi
> :>
> :>
> :>
> :>I know Charles Mills answered my question nearly 4 weeks ago but I 
> would :>just like to corroborate the I/O areas for the read can be 31 
> bit addressing :>only the dcb and decb need to be below the line :> 
> :>I am running AMODE 31 RMODE 31 :> :> :> :>The DCB is below the line 
> as well as the DECB :> :> :> :>My read returns ok :> :> :> :>After I 
> set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP :> 
> :> :> :>This the example that Charles sent to me does nt say anything 
> about the :>IOAREAS or pointers to the IOAREAS :> :> :> :>LA Rn,PDSDCB 
> :> :>ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB :> :>L Rn,address  of 
> READ buffer :> :>READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB :> :> :> :> 
> :> :> :> :> :> :>This is my read :> :> :> :> READ  
> ADATADECB,SF,(R6),IOBUFF,'S',MF=E :> :> :> :>The  IOBUFF is a full 
> word  pointer to the storage I obtain :> :> :> :> :> :>  Here is my 
> code :> :> :>
> :>  LAR0,IODSECTLEN
> :>
> :>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
> :>
> :>  LRR9,R6
> :>
> :>  USING IHADCB,R9
> :>
> :>  USING IODSECT

Re: BSAM READ AMODE 31 RMODE 31

2023-03-20 Thread Joseph Reichman
You are correct sir 

Will make Binyamin changes and try it tonite 

> On Mar 20, 2023, at 11:07 AM, Seymour J Metz  wrote:
> 
> That doesn't explain why you had LA R7 in places where you didn't need a 
> pointer, 
> 
>  LAR7,SYSADATA
>  MVC   0(IODSECTLEN,R6),0(R7)
> 
> Instead of the clearer
> 
>  MVC   0(IODSECTLEN,R6),SYSADATA
> 
> Side issue are why you had separate moves for initialization instead of one 
> big move and why you didn't just use symbolic names in your E-form macros 
> instead of register form parameters with an otherwise extraneous LA.
> 
> You might want to read up on dependent and labelled USING pseudo-ops.
> 
> Only the WAIT service should be storing an RB address in an ECB; the ECB that 
> you provide in the DECB should initially have a high bit of 0. Also, the 
> completion code is 31 bits, and a lot of system services have codes with the 
> lower 24 bits zero or containig a context for the code in bits 0-7. In 
> particular, Many services use 7F in the high byte for normal completion.
> 
> 
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
> 
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Joseph Reichman [reichman...@gmail.com]
> Sent: Monday, March 20, 2023 10:10 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: BSAM READ AMODE 31 RMODE 31
> 
> Ok
> 
> Thanks
> The reason I had the LA R7
> 
> I first had to get 24 bit storage for 1) dcb 2) decb though I realize it can 
> live in 31 bit
> 3) decb it has to live in 31 bit 4) initial exit code has to be 24 bit
> 
> Once moved I had to get the proper pointers
> 24 bit pointers for exlst , decb
> 
> Let me corroborate I understand why I got the error
> 
> After the read the first full word should be for the ECB so the low order 
> should have an RB
> Or if it already posted should have the first byte x’40’ followed by 
> completion code which could be zeros what a saw in the ECB address was the 
> first byte x’7F’
> 
> Anyway I have to fix the read thank you
> 
>> On Mar 20, 2023, at 9:52 AM, Binyamin Dissen  
>> wrote:
>> 
>> First of all, the buffer address specified on READ MF=E is an RX address, not
>> an indirect address.
>> 
>> So the read will overlay from IOBBUFF. That could cause strange results,
>> 
>> You would need
>> 
>> L  Rx,IOBUFF
>> READ  ADATADECB,SF,(R6),(Rx),'S',MF=E
>> 
>> 
>> Also, I do not understand why you use IHADECB in your work area rather than a
>> 
>> READ label,SF,1-1,2-2,'S',MF=L
>> 
>> which will reserve the storage of the appropriate size.
>> 
>> I would recommend against altering the DECB directly, as the READ macro takes
>> care of it.
>> 
>> Very strange to STORAGE OBTAIN,ADDR=(R7) followed by a LA R7
>> 
>> Back to the drawing board.
>> 
>> On Mon, 20 Mar 2023 09:20:39 -0400 Joseph Reichman 
>> wrote:
>> 
>> :>   Hi
>> :>
>> :>
>> :>
>> :>I know Charles Mills answered my question nearly 4 weeks ago but I would
>> :>just like to corroborate the I/O areas for the read can be 31 bit 
>> addressing
>> :>only the dcb and decb need to be below the line
>> :>
>> :>I am running AMODE 31 RMODE 31
>> :>
>> :>
>> :>
>> :>The DCB is below the line as well as the DECB
>> :>
>> :>
>> :>
>> :>My read returns ok
>> :>
>> :>
>> :>
>> :>After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
>> :>
>> :>
>> :>
>> :>This the example that Charles sent to me does nt say anything about the
>> :>IOAREAS or pointers to the IOAREAS
>> :>
>> :>
>> :>
>> :>LA Rn,PDSDCB
>> :>
>> :>ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
>> :>
>> :>L Rn,address  of READ buffer
>> :>
>> :>READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
>> :>
>> :>
>> :>
>> :>
>> :>
>> :>
>> :>
>> :>
>> :>
>> :>This is my read
>> :>
>> :>
>> :>
>> :> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
>> :>
>> :>
>> :>
>> :>The  IOBUFF is a full word  pointer to the storage I obtain
>> :>
>> :>
>> :>
>> :>
>> :>
>> :>  Here is my code
>> :>
>> :>
&g

Re: BSAM READ AMODE 31 RMODE 31

2023-03-20 Thread Seymour J Metz
That doesn't explain why you had LA R7 in places where you didn't need a 
pointer, 

  LAR7,SYSADATA
  MVC   0(IODSECTLEN,R6),0(R7)

Instead of the clearer

  MVC   0(IODSECTLEN,R6),SYSADATA

Side issue are why you had separate moves for initialization instead of one big 
move and why you didn't just use symbolic names in your E-form macros instead 
of register form parameters with an otherwise extraneous LA.

You might want to read up on dependent and labelled USING pseudo-ops.

Only the WAIT service should be storing an RB address in an ECB; the ECB that 
you provide in the DECB should initially have a high bit of 0. Also, the 
completion code is 31 bits, and a lot of system services have codes with the 
lower 24 bits zero or containig a context for the code in bits 0-7. In 
particular, Many services use 7F in the high byte for normal completion.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Joseph Reichman [reichman...@gmail.com]
Sent: Monday, March 20, 2023 10:10 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: BSAM READ AMODE 31 RMODE 31

Ok

Thanks
The reason I had the LA R7

I first had to get 24 bit storage for 1) dcb 2) decb though I realize it can 
live in 31 bit
3) decb it has to live in 31 bit 4) initial exit code has to be 24 bit

Once moved I had to get the proper pointers
24 bit pointers for exlst , decb

Let me corroborate I understand why I got the error

After the read the first full word should be for the ECB so the low order 
should have an RB
Or if it already posted should have the first byte x’40’ followed by completion 
code which could be zeros what a saw in the ECB address was the first byte x’7F’

Anyway I have to fix the read thank you

> On Mar 20, 2023, at 9:52 AM, Binyamin Dissen  
> wrote:
>
> First of all, the buffer address specified on READ MF=E is an RX address, not
> an indirect address.
>
> So the read will overlay from IOBBUFF. That could cause strange results,
>
> You would need
>
>  L  Rx,IOBUFF
>  READ  ADATADECB,SF,(R6),(Rx),'S',MF=E
>
>
> Also, I do not understand why you use IHADECB in your work area rather than a
>
> READ label,SF,1-1,2-2,'S',MF=L
>
> which will reserve the storage of the appropriate size.
>
> I would recommend against altering the DECB directly, as the READ macro takes
> care of it.
>
> Very strange to STORAGE OBTAIN,ADDR=(R7) followed by a LA R7
>
> Back to the drawing board.
>
> On Mon, 20 Mar 2023 09:20:39 -0400 Joseph Reichman 
> wrote:
>
> :>   Hi
> :>
> :>
> :>
> :>I know Charles Mills answered my question nearly 4 weeks ago but I would
> :>just like to corroborate the I/O areas for the read can be 31 bit addressing
> :>only the dcb and decb need to be below the line
> :>
> :>I am running AMODE 31 RMODE 31
> :>
> :>
> :>
> :>The DCB is below the line as well as the DECB
> :>
> :>
> :>
> :>My read returns ok
> :>
> :>
> :>
> :>After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP
> :>
> :>
> :>
> :>This the example that Charles sent to me does nt say anything about the
> :>IOAREAS or pointers to the IOAREAS
> :>
> :>
> :>
> :>LA Rn,PDSDCB
> :>
> :>ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
> :>
> :>L Rn,address  of READ buffer
> :>
> :>READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB
> :>
> :>
> :>
> :>
> :>
> :>
> :>
> :>
> :>
> :>This is my read
> :>
> :>
> :>
> :> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E
> :>
> :>
> :>
> :>The  IOBUFF is a full word  pointer to the storage I obtain
> :>
> :>
> :>
> :>
> :>
> :>  Here is my code
> :>
> :>
> :>
> :>  LAR0,IODSECTLEN
> :>
> :>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
> :>
> :>  LRR9,R6
> :>
> :>  USING IHADCB,R9
> :>
> :>  USING IODSECT,R6
> :>
> :> *
> :>
> :> *
> :>
> :>  LAR7,SYSADATA
> :>
> :>  MVC   0(IODSECTLEN,R6),0(R7)
> :>
> :> *
> :>
> :>  LAR7,SYSDCBE-SYSADATA(,R6)
> :>
> :>  STR7,DCBDCBE
> :>
> :>  LAR7,EX24LST-SYSADATA(,R6)
> :>
> :>  STCM  R7,B'0111',DCBEXLSA
> :>
> :>  LAR7,ABND24-SYSADATA(,R6)
> :>
> :>  STCM  R7,B'0111',ABND

Re: BSAM READ AMODE 31 RMODE 31

2023-03-20 Thread Joseph Reichman
Ok 

Thanks 
The reason I had the LA R7

I first had to get 24 bit storage for 1) dcb 2) decb though I realize it can 
live in 31 bit 
3) decb it has to live in 31 bit 4) initial exit code has to be 24 bit 

Once moved I had to get the proper pointers 
24 bit pointers for exlst , decb 

Let me corroborate I understand why I got the error 

After the read the first full word should be for the ECB so the low order 
should have an RB 
Or if it already posted should have the first byte x’40’ followed by completion 
code which could be zeros what a saw in the ECB address was the first byte x’7F’

Anyway I have to fix the read thank you  

> On Mar 20, 2023, at 9:52 AM, Binyamin Dissen  
> wrote:
> 
> First of all, the buffer address specified on READ MF=E is an RX address, not
> an indirect address.
> 
> So the read will overlay from IOBBUFF. That could cause strange results, 
> 
> You would need 
> 
>  L  Rx,IOBUFF
>  READ  ADATADECB,SF,(R6),(Rx),'S',MF=E 
> 
> 
> Also, I do not understand why you use IHADECB in your work area rather than a 
> 
> READ label,SF,1-1,2-2,'S',MF=L
> 
> which will reserve the storage of the appropriate size.
> 
> I would recommend against altering the DECB directly, as the READ macro takes
> care of it.
> 
> Very strange to STORAGE OBTAIN,ADDR=(R7) followed by a LA R7
> 
> Back to the drawing board.
> 
> On Mon, 20 Mar 2023 09:20:39 -0400 Joseph Reichman 
> wrote:
> 
> :>   Hi 
> :>
> :> 
> :>
> :>I know Charles Mills answered my question nearly 4 weeks ago but I would
> :>just like to corroborate the I/O areas for the read can be 31 bit addressing
> :>only the dcb and decb need to be below the line
> :>
> :>I am running AMODE 31 RMODE 31 
> :>
> :> 
> :>
> :>The DCB is below the line as well as the DECB
> :>
> :> 
> :>
> :>My read returns ok 
> :>
> :> 
> :>
> :>After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP  
> :>
> :> 
> :>
> :>This the example that Charles sent to me does nt say anything about the
> :>IOAREAS or pointers to the IOAREAS  
> :>
> :> 
> :>
> :>LA Rn,PDSDCB 
> :>
> :>ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
> :>
> :>L Rn,address  of READ buffer
> :>
> :>READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB 
> :>
> :> 
> :>
> :> 
> :>
> :> 
> :>
> :> 
> :>
> :>This is my read
> :>
> :>  
> :>
> :> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E 
> :>
> :> 
> :>
> :>The  IOBUFF is a full word  pointer to the storage I obtain
> :>
> :> 
> :>
> :> 
> :>
> :>  Here is my code 
> :>
> :> 
> :>
> :>  LAR0,IODSECTLEN   
> :>
> :>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0   
> :>
> :>  LRR9,R6   
> :>
> :>  USING IHADCB,R9   
> :>
> :>  USING IODSECT,R6  
> :>
> :> *  
> :>
> :> *  
> :>
> :>  LAR7,SYSADATA 
> :>
> :>  MVC   0(IODSECTLEN,R6),0(R7)  
> :>
> :> *  
> :>
> :>  LAR7,SYSDCBE-SYSADATA(,R6)
> :>
> :>  STR7,DCBDCBE  
> :>
> :>  LAR7,EX24LST-SYSADATA(,R6)
> :>
> :>  STCM  R7,B'0111',DCBEXLSA 
> :>
> :>  LAR7,ABND24-SYSADATA(,R6) 
> :>
> :>  STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)   
> :>
> :>  LAR7,ABENDRTN 
> :>
> :>  STR7,ABEND31-SYSADATA(,R6)
> :>
> :> *  
> :>
> :>T  L R0,=F'31996'   
> :>
> :> * 
> :>
> :>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0
> :>
> :> *LAR7,IOAREA  
> :>
> :> *STR7,IOPTR   
> :>
> :> * 
> :>
> :>  STR7,IOBUFF  
> :>
> :>  MVC   OPEN_LST(OPEN_LEN),OPEN_CON
> :>
> :>  OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31   
> :>
> :> * 
> :>
> :>  TMDCBOFLGS,DCBOFOPN  
> :>
> :>  BZEXITDEBG

Re: BSAM READ AMODE 31 RMODE 31

2023-03-20 Thread Binyamin Dissen
First of all, the buffer address specified on READ MF=E is an RX address, not
an indirect address.

So the read will overlay from IOBBUFF. That could cause strange results, 

You would need 

  L  Rx,IOBUFF
  READ  ADATADECB,SF,(R6),(Rx),'S',MF=E 


Also, I do not understand why you use IHADECB in your work area rather than a 

READ label,SF,1-1,2-2,'S',MF=L

which will reserve the storage of the appropriate size.

I would recommend against altering the DECB directly, as the READ macro takes
care of it.

Very strange to STORAGE OBTAIN,ADDR=(R7) followed by a LA R7

Back to the drawing board.

On Mon, 20 Mar 2023 09:20:39 -0400 Joseph Reichman 
wrote:

:>   Hi 
:>
:> 
:>
:>I know Charles Mills answered my question nearly 4 weeks ago but I would
:>just like to corroborate the I/O areas for the read can be 31 bit addressing
:>only the dcb and decb need to be below the line
:>
:>I am running AMODE 31 RMODE 31 
:>
:> 
:>
:>The DCB is below the line as well as the DECB
:>
:> 
:>
:>My read returns ok 
:>
:> 
:>
:>After I set a beak point after the CHECK I get As S0D9 ABEND with a SDUMP  
:>
:> 
:>
:>This the example that Charles sent to me does nt say anything about the
:>IOAREAS or pointers to the IOAREAS  
:>
:> 
:>
:>LA Rn,PDSDCB 
:>
:>ST Rn,PDSDECB+8 PLACE DCB ADDRESS IN DECB
:>
:>L Rn,address  of READ buffer
:>
:>READ PDSDECB,SF,,(Rn),MF=E CHECK PDSDECB 
:>
:> 
:>
:> 
:>
:> 
:>
:> 
:>
:>This is my read
:>
:>  
:>
:> READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E 
:>
:> 
:>
:>The  IOBUFF is a full word  pointer to the storage I obtain
:>
:> 
:>
:> 
:>
:>  Here is my code 
:>
:> 
:>
:>  LAR0,IODSECTLEN   
:>
:>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0   
:>
:>  LRR9,R6   
:>
:>  USING IHADCB,R9   
:>
:>  USING IODSECT,R6  
:>
:> *  
:>
:> *  
:>
:>  LAR7,SYSADATA 
:>
:>  MVC   0(IODSECTLEN,R6),0(R7)  
:>
:> *  
:>
:>  LAR7,SYSDCBE-SYSADATA(,R6)
:>
:>  STR7,DCBDCBE  
:>
:>  LAR7,EX24LST-SYSADATA(,R6)
:>
:>  STCM  R7,B'0111',DCBEXLSA 
:>
:>  LAR7,ABND24-SYSADATA(,R6) 
:>
:>  STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)   
:>
:>  LAR7,ABENDRTN 
:>
:>  STR7,ABEND31-SYSADATA(,R6)
:>
:> *  
:>
:>T  L R0,=F'31996'   
:>
:> * 
:>
:>  STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0
:>
:> *LAR7,IOAREA  
:>
:> *STR7,IOPTR   
:>
:> * 
:>
:>  STR7,IOBUFF  
:>
:>  MVC   OPEN_LST(OPEN_LEN),OPEN_CON
:>
:>  OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31   
:>
:> * 
:>
:>  TMDCBOFLGS,DCBOFOPN  
:>
:>  BZEXITDEBG   
:>
:>  USING ASMADATA,R7
:>
:>  L R10,IOBUFF 
:>
:> PROCADATA DS   0H 
:>
:>  READ  ADATADECB,SF,(R6),IOBUFF,'S',MF=E  
:>
:> * 
:>
:>  CHECK ADATADECB  
:>
:> * 
:>
:>OPEN_CON OPEN (*-*,INPUT),MF=L,MODE=31  
:>
:>SYSADATA DCB DDNAME=SYSADATA,RECFM=VB,MACRF=RP,DSORG=PS,DCBE=SYSDCBE,EXX
:>
:>   LST=EX24LST  
:>
:>
:>
:>  IHADECB DSECT=NO  
:>
:>DECBLEN  EQU   *-DECB   
:>
:>SYSDCBE  DCBE EO