So implementing asynchronous I/O in  QSAM is as simple as having BUFNO= the
right number

thanks   

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
Michael Stein
Sent: Sunday, March 21, 2021 5:41 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Overlapped I/O completion

On Sun, Mar 21, 2021 at 04:54:45PM -0400, Joseph Reichman wrote:
>  Just to make sure I am understanding correctly I use GETPOOL/GETBUFF  
> with QSAM it will use Asynchronous/overlapped i/o right ?

You should only need DCB/OPEN/CLOSE/GET.  

Let most everything default, QSAM knows what to do for a DASD dataset.
The RECFM/BLKSIZE/LRECL will be obtained during OPEN from the existing
dataset.

xx    DCB   DSORG=PS,MACRF=GL,EODAD=myeof,DDNAME=mydd

Do set BUFNO= to some number, perhaps the number of *blocks* in a cylinder
via the DCB keyword, dynamic allocation, or JCL DD DCB=BUFNO=.

Use MACRF=GL, get locate mode.  On a GET call, QSAM returns the address of
the next *record* (not block) in R1 (R1 points to the RDW if RECFM V).

You can reference this record until you issue the next GET for this DCB.
Locate mode avoids anyone having to copy the data -- it's in QSAM's I/O
buffer.

If you don't need the storage, for a first try, just run R24/A24.

Then you don't need to deal with things like the DCB has to be R24 and need
the DCBE for various A31 things (EOD/SYNAD A31, buffers above the line,
etc).

For A31 access you will likely need a DCBE and more care with which mode
(OPEN/CLOSE MODE=31, calling GET A31, still need DCB in R24 storage).

The related manuals are (the QSAM related sections of):

  z/OS DFSMS Using Data Sets
  z/OS Macro Instructions for Data Sets

----------------------------------------------------------------------
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