View previous topic :: View next topic
|
Author |
Message |
saidharrao Warnings : 1 New User
Joined: 19 Feb 2005 Posts: 27 Location: hyderabad-ap-india
|
|
|
|
Hi,
I have a requirement like this.
Req: When an input is received from the screen, then search if the key is present in the database. If it is not then display a screen with all the records present in the database.
Currently I am handling in the following way:
111-db-check
----------------
call CBLTDLI USING Gu, PCB,IO,Qual SSA
If Status-code is GE
perform 112-Get-all
end-if
EXIT
112-Get-all
---------------
Perform 113-get-next until status code= GE (but as the status code is already GE from the previous para, i am not able to go into 113 at all. Hence somewhere before calling this para I have to reset to the first record. But my requirement is I have to read all the records in only 113-get-next section without losing the first record. Hence can I move Spaces to STATUS-CODE exlicitely??)
'
'
'
'
Exit
113-get-next
---------------
CALl CBLTDLI using GN bla bla Unqual SSA.
store the records in an array and increment the counter for number of records, save in spa..bla bla.
So kindly help me
1. Can I move SPACE to STATUS-CODE field explicitely to get into that para?
2. Or is there anyway to reposition the pointer to the top of the database?
Please note that i should not lose a single record and counter should be accumulated only at one place.
Thanks, |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Use an unqualified GU and you will get the first rootsegment. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
In addition to what George told you, I am adding my comments.....
1. Can I move SPACE to STATUS-CODE field explicitely to get into that para? NEVER-EVER move anything to the keyfeedback area - that belongs to IMS. IMS is always positional.
"Perform 113-get-next until status code= GE" You need to check for GB - end of database.
"If it is not then display a screen with all the records present in the database. "
How big is this database anyway? What you need to do is plan for putting out multiple screens. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
One more thing....
"If it is not then display a screen with all the records present in the database." Why? Sometimes people request things and really don't consider the implications. Perhaps, you could suggest that they ask for a range of keys? Think about a database with perhaps a million keys? |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Uhm Sandy..........do you agree my answer for positioning at the 'top' of the database will do? Moving any information to the PCB-fields after one or many calls is useless; IMS will overwrite it after the next call. It won't do any harm to IMS but IMS will ignore whatever you store in the PCB and just fill it with the results it found; status-code, key feed back area and the lot of it. So, the part of positioning I take seriously but the part about changing the content of the PCB makes me smile |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
I am glad I made you smile, George! I agree, but to position at the beginning of the database, you do not even code an ssa - just a gu. The PCB interrogation should be part of every IMS newbie training. Just like the keyfeedback area. Just like the level area - and the status code. Maybe there should be a "sticky" (and it took me a while to understand what a "sticky" was) explaining how. I will help if you want. The other thing I thought about was a "sticky" for working storage for MFS attribute bytes. I can do that. Sometimes IMS manuals are very difficult to understand - especially if you are so new that you have no idea what question to even ask. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
I just went downstairs for a cup of coffee and wondered if a discussion corner (sticky) might be of help; even took the descision to PM you. Now, reading your post I don't need to PM you. The sticky is on it's way. It should not cover all about IMS so you are invited to be the first to add points in it. I propose items like:
storing intermediate results techniques (SPA or whatever)
positioning (and remaining) in the databases (including command codes)
data- and processanalysis (including SI and bi-directional pointers)
funny stuff like formerly made mistakes
In one minute it will be there......Hope you will participate in this sticky and in fact, counting on it . |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Well, George, THANKYOU! Experience is worth a million IBM manuals - (no offense) sometimes too difficult for a lot of people to understand unless they have a background and even then - difficult. I will be more than happy to contribute ANYTHING that will help - been there and been lost. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Hmmm Sandy, I've been in IMS since 1973 so I have got the guts to say I'm experienced BTW: the sticky is operational. You are invited to be the first to make a donation |
|
Back to top |
|
|
|