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

How to get RRN from RRDS file in CICS?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Fri Aug 05, 2011 7:08 am
Reply with quote

Hi,
My requirement is to display records from a VSAM RRDS file along with corresponding RRN number based on some search field on the screen.

Eg: In CICS, Date is entered as search field, I need to retrieve the records starting from the date is being entered on the screen. Also, I need to display RRN of corresponding each records too on the screen.

How to retrieve the RRN number/what is the logic to implement?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 05, 2011 7:28 am
Reply with quote

Did you check the description of the RIDFLD and RRN options of the READ command in the CICS Application Programming Reference manual?
Back to top
View user's profile Send private message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Fri Aug 05, 2011 7:46 am
Reply with quote

Thanks for the response. Yes,I did read the reference manual but not sure on it since,could not find any sample logic over there.

So,just wanted explore many inputs from the forum to get some better idea icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Aug 05, 2011 1:17 pm
Reply with quote

Quote:
Eg: In CICS, Date is entered as search field, I need to retrieve the records starting from the date is being entered on the screen.

review Your wording and logic ...
A RRDS does not have a key, so to scan/search for some content pattern You will have to start always from the beginning

there is no logic to implement... just start reading records and compare the relevant fields

unless naturally You forgot to tell something important icon_evil.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Aug 05, 2011 3:43 pm
Reply with quote

And, to add the obvious, as you are sequentially processing the file to do any sort of "search", starting from the first record, you always have it within your power to know the RRN of the current or any other record that you feel like bothering with.

If you have a lot of records and are planning user-driver serial searches in CICS, I suggest you tear up what you have so far, start again, and do a bit more thinking this time.
Back to top
View user's profile Send private message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Sat Aug 06, 2011 12:35 am
Reply with quote

enrico-sorichetti wrote:
Quote:
Eg: In CICS, Date is entered as search field, I need to retrieve the records starting from the date is being entered on the screen.

review Your wording and logic ...
A RRDS does not have a key, so to scan/search for some content pattern You will have to start always from the beginning

there is no logic to implement... just start reading records and compare the relevant fields

unless naturally You forgot to tell something important icon_evil.gif


Thanks for your reply. Thats what I wanted too, but what is the significance of the RIDFIELD when setting up startpoint anywhere in the file using STARTBR command. If that is the case how do I know the corresponding RRN value of the date is being searched.
Back to top
View user's profile Send private message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Sat Aug 06, 2011 12:38 am
Reply with quote

Bill Woodger wrote:
And, to add the obvious, as you are sequentially processing the file to do any sort of "search", starting from the first record, you always have it within your power to know the RRN of the current or any other record that you feel like bothering with.

If you have a lot of records and are planning user-driver serial searches in CICS, I suggest you tear up what you have so far, start again, and do a bit more thinking this time.


Thanks Bill!! How do I get the RRN of corresponding each record, or the commands to get the RRN value?

This is what all I want to know.
Back to top
View user's profile Send private message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Sat Aug 06, 2011 12:46 am
Reply with quote

Hey All,
I found/understood that RIDFLD in READNEXT/READPREV command will give the RRN and INTO field wiill give the actul value of the record.

I was certainly not sure on this command and while reading and replying on this forum I understood cleary and slowly now!!!

Please correct me if still am wrong anything!!!!
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Using API Gateway from CICS program CICS 0
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top