View previous topic :: View next topic
|
Author |
Message |
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
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 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
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 |
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 |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
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 |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
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 |
|
|
|