IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Browsing last record from KSDS in CICS program


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
murshidtp

New User


Joined: 16 Sep 2005
Posts: 1

PostPosted: Sun Feb 04, 2007 2:09 am
Reply with quote

Hi.

I want to browse the last record from a KSDS file in CICS. I used high-values as key and startbr command. But, EIBRESP is 13.

If I am trying use READNEXT or READPREV it shows EIBRESP as 16. Can anyone help me.

Thanks
Murshid
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sun Feb 04, 2007 2:59 am
Reply with quote

murshidtp wrote:
I want to browse the last record from a KSDS file in CICS. I used high-values as key and startbr command. But, EIBRESP is 13.
If I am trying use READNEXT or READPREV it shows EIBRESP as 16. Can anyone help me.
The good news is that you can do what you want.
No generic key, must be full key of X'FF' (I'm not sure if EQUAL/GTEQ has bearing). From the FM (guide):
Quote:
You can start from the end of the data set by specifying a complete key of X'FF' characters on the STARTBR or RESETBR command. This points to the last record in the file ready for a backward browse.
and
Quote:
You can use a generic key on the STARTBR command when browsing through a KSDS. However, the browse can only continue forward through the file. If you process a READPREV command during such a browse, you get the INVREQ condition.
Hope that helps, keep us posted...

Bill
Back to top
View user's profile Send private message
sachin_star3
Warnings : 1

New User


Joined: 30 Sep 2006
Posts: 78
Location: pune

PostPosted: Mon Feb 05, 2007 2:15 am
Reply with quote

USE HURBA COMMAND T TSO PROMPT
HURBA - HI USE RBA ADDERESS
================SACHIN BORASE=================
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 05, 2007 2:24 am
Reply with quote

Please respond and let us know how:
sachin_star3 wrote:
USE HURBA COMMAND T TSO PROMPT
HURBA - HI USE RBA ADDERESS
is an answer to this question:
murshidtp wrote:
I want to browse the last record from a KSDS file in CICS.
We are all awaiting your response.....
Back to top
View user's profile Send private message
Bruce Lankford

New User


Joined: 14 Aug 2014
Posts: 2
Location: USA

PostPosted: Mon Aug 18, 2014 8:55 pm
Reply with quote

This may not be your problem, unless this is a newly defined file, but it did happen to me, so it can happen. If you are doing a startbr without using generic and have all high-values in the entire key and are not using the "equal" parm. Your file will need the browse option on the file definition of course, and what happened to me, was that the system programmer that defined this new file to the CICS table (FCT I believe), fat fingered it, and pointed the DSN to a different existing file with a different key length. Assuming the file definition is correct. you should be able to execute a startbr with high-values in the key, and then read prev to get to the last record without any problem. It's kind of a long shot, but especially if it's a newly defined file, if you are having this problem when your code seems correct, you might want to double check the way the file is defined to CICS.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Aug 18, 2014 11:18 pm
Reply with quote

I hope murshidtp hasn't been waiting these 7½ years for the answer. icon_smile.gif
Back to top
View user's profile Send private message
Bruce Lankford

New User


Joined: 14 Aug 2014
Posts: 2
Location: USA

PostPosted: Tue Aug 19, 2014 1:42 am
Reply with quote

I know he's still not waiting on an answer. There is no need to try and be cute. It was just one more possibility out there for the next guy that comes along that's pulling his hair out trying to find out what the problem is. It might have saved me a couple of days of frustration, if someone else had added my answer before I figured this out. I was just trying to save the next guy some work, if that's alright with you.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts Using API Gateway from CICS program CICS 0
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top