Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Repositioning to first record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
saidharrao
Warnings : 1

New User


Joined: 19 Feb 2005
Posts: 27
Location: hyderabad-ap-india

PostPosted: Wed Sep 19, 2007 2:44 pm    Post subject: Repositioning to first record
Reply with quote

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
View user's profile Send private message

Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Wed Sep 19, 2007 2:52 pm    Post subject:
Reply with quote

Use an unqualified GU and you will get the first rootsegment.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Sep 19, 2007 6:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Sep 19, 2007 7:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Sep 20, 2007 12:29 am    Post subject:
Reply with quote

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 icon_wink.gif
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Sep 20, 2007 12:46 am    Post subject:
Reply with quote

I am glad I made you smile, George! icon_surprised.gif 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. icon_eek.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Sep 20, 2007 1:17 am    Post subject:
Reply with quote

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 icon_wink.gif




In one minute it will be there......Hope you will participate in this sticky and in fact, counting on it icon_lol.gif .
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Sep 20, 2007 1:30 am    Post subject:
Reply with quote

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. icon_biggrin.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Sep 20, 2007 1:36 am    Post subject:
Reply with quote

Hmmm Sandy, I've been in IMS since 1973 so I have got the guts to say I'm experienced icon_wink.gif BTW: the sticky is operational. You are invited to be the first to make a donation icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us