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
 

 

Getting first record of a particular partition in IMS DB

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

New User


Joined: 22 May 2007
Posts: 8
Location: Mumbai

PostPosted: Tue Dec 20, 2011 10:36 pm    Post subject: Getting first record of a particular partition in IMS DB
Reply with quote

Hi,
I have a HALDB Databse that has 84 partitions with key record as YYMMXXXXXXXXXXXXX. it also has a secondary index.

Partitions are based on YYMM varying from 0000 to 0612. X is a alphanumeric .
I wish to delete everything residing in a particular partition say 0301. In my program i issue a qualified SSA with GHN using PCB of primary index. SSA is defined on partial index with value varying from 0301x'0000000000000' to 0301x'FFFFFFFFFFFFF'. This is to have all records which falls under this range in 0301 partition.
After this GHN i issue a DLET call and later on I issue a unqualified GHN to get next record in database. this is followed by DLET call.
This process is repeated untill I find a record with different partition number.

Now the problem I'm facing is with the first qualified GHN call. It seems that call does not point to first record from 0301 partition, as once the job was complete, i could still see records from 0301 partition.

Could you please let me know how can I get first record from the partition?

Thanks in advance

Paresh
Back to top
View user's profile Send private message

Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Dec 21, 2011 9:28 pm    Post subject:
Reply with quote

If the database in an HDAM and not a HIDAM, then the root keys will not be in sequence inside the database. They will be randomized.

Unless you use that partition selection parm in the DFSVSAMP input file, an IMS program will treat the database as if it was one single partition.

You might want to consider something like initializing the single partition and rebuilding the index (all indexes). That would probably be faster, but you'd need to get exclusive access to do it.
Back to top
View user's profile Send private message
manikawnth

New User


Joined: 07 Feb 2007
Posts: 61
Location: Mumbai

PostPosted: Thu Dec 29, 2011 2:54 pm    Post subject: @Paresh
Reply with quote

HI PJ,

As Ed told, HDAM database roots are stored randomly indexed by root anchor points which were generated by randomizing module.

The simple approach left for you is to hit all GHU calls
varying from 0301x'0000000000000' to 0301x'FFFFFFFFFFFFF' and delete them...
Back to top
View user's profile Send private message
manikawnth

New User


Joined: 07 Feb 2007
Posts: 61
Location: Mumbai

PostPosted: Thu Dec 29, 2011 4:28 pm    Post subject: @A;;
Reply with quote

Correct me if I'm wrong:
Can't it be run in a DLI mode bringing down the d/bs and just giving the selected partition in DD name?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Thu Dec 29, 2011 7:14 pm    Post subject: Reply to: Getting first record of a particular partition in
Reply with quote

just a philosophical/general remark...
if You delete all the database records within a certain key range x'0301zzz' ( x'00...00' <= zzz <= x'ff..ff' )
the partition where they reside should be irrelevant to the process
and finding some of them after the <delete> is just a symptom of some glitch in the process
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 Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm


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