> -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[EMAIL PROTECTED] On Behalf Of Stephen M. Wiegand > Sent: Wednesday, February 08, 2006 3:00 PM > To: [email protected] > Subject: READPREV in batch > > > In CICS you can do a STARTBR on a VSAM KSDS or ESDS file and then > issue a READPREV to get the previous record from the key you started > at. However, this function is not available to COBOL or IBM > Assembler in batch. We have an issue where we need to know what the > last RBA is in an ESDS file. It would be nice if we could do a > STARTBR with a key of high-values and then do a READPREV. > > Has only via the mother of invention, found a way to do this that is > fast? I know we could do a startbr at the begging or somewhere in > the middle, do READNEXT saving off the keys until we hit EOF at which > point the saved key would be the highest RBA. But we have a huge > file and this way would take too much time. > > Thanks in advance for any suggestions. > > Steve Wiegand >
I've not tried this, but have you considered OPTCD=(LRD,BWD) in the RPL macro? I don't know how to specify this in COBOL. -- John McKown Senior Systems Programmer UICI Insurance Center Information Technology This message (including any attachments) contains confidential information intended for a specific individual and purpose, and its content is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this transmission, or taking any action based on it, is strictly prohibited. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

