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 <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Joseph Reichman <reichman...@gmail.com>
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 <sme...@gmu.edu> 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
>
>
>
>          LA    R0,IODSECTLEN
>
>          STORAGE OBTAIN,LENGTH=(R0),ADDR=(R6),LOC=BELOW,SP=0
>
>          LR    R9,R6
>
>          USING IHADCB,R9
>
>          USING IODSECT,R6
>
> *
>
> *
>
>          LA    R7,SYSADATA
>
>          MVC   0(IODSECTLEN,R6),0(R7)
>
> *
>
>          LA    R7,SYSDCBE-SYSADATA(,R6)
>
>          ST    R7,DCBDCBE
>
>          LA    R7,EX24LST-SYSADATA(,R6)
>
>          STCM  R7,B'0111',DCBEXLSA
>
>          LA    R7,ABND24-SYSADATA(,R6)
>
>          STCM  R7,B'0111',ABND24ADR-SYSADATA(R6)
>
>          LA    R7,ABENDRTN
>
>          ST    R7,ABEND31-SYSADATA(,R6)
>
> *
>
> T                  L     R0,=F'31996'
>
> *
>
>          STORAGE OBTAIN,LENGTH=(R0),ADDR=(R7),LOC=RES,SP=0
>
> *        LA    R7,IOAREA
>
> *        ST    R7,IOPTR
>
> *
>
>          ST    R7,IOBUFF
>
>          MVC   OPEN_LST(OPEN_LEN),OPEN_CON
>
>          OPEN  ((R6),INPUT),MF=(E,OPEN_LST),MODE=31
>
> *
>
>          TM    DCBOFLGS,DCBOFOPN
>
>          BZ    EXITDEBG
>
>          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
>
> EX24LST        DS  0F
>
> ADATAEXLST     DC  AL1(EXLDCBAB+X'80')
>
> ABND24ADR      DS  AL3
>
> ABND24         DS  0H
>
>               L   R15,ABEND31-SYSADATA(,R15)
>
>               BSM 0,R15
>
> ABEND31        DS  XL4
>
> STROGE24       EQU *-EX24LST
>
> *
>
>  IODSECT   DSECT
>
> ADATADCB  DS    CL(DCBLNGBS)
>
> ADATADECB DS    CL(DECBLEN)
>
> ADATADCBE DS    CL(DCBELENV1)
>
>          DS    0F
>
> INST31    DS    CL(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


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

Reply via email to