As far as (batch) COBOL goes, if this is an issue for your installation,
have your marketing branch submit a "REQUEST" for IBM to implement the (well
defined, but processor dependent) feature from the ANSI/ISO 2002 Standard.
In the "REQUEST" reference the SHARE requirement

 SSLNGC0313596 RC 2002 ISO COBOL - READ PREVIOUS & START LESS THAN 

The current IBM response of RC (Recognized) is defined as:

"IBM agrees with the request and a solution appears to be a desirable
objective.  A solution, however, may not presently appear feasible or
implementable.  No IBM commitment is made  or implied as  to the eventual
delivery of an acceptable solution. "

<[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
>  
> Don't know about COBOL, but in assembler (batch) all you have to do to
find 
> the last record in a VSAM data set is issue the GET macro with the RPL  
> pointed to by the GET macro containing the OPTCD=(LRD,BWD) parameter.
>  
> See the "DFSMS Macro Instructions for Data Sets" manual -> "VSAM Macro  
> Descriptions and Examples" chapter -> "RPL" topic.
>  
> Regards,
> Ira
>  
> In a message dated 2/8/2006 3:03:51 P.M. Central Standard Time,  
> [EMAIL PROTECTED] writes:
> 
> 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.

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

Reply via email to