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

Getting first record of a particular partition in IMS DB


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
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
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
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Dec 29, 2011 7:14 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts DROP & ALTER PARTITION-PBR DB2 0
Search our Forums:

Back to Top