View previous topic :: View next topic
|
Author |
Message |
prashanth1
New User
Joined: 27 Sep 2006 Posts: 47 Location: Hyderabad
|
|
|
|
Hi,
Please help me.
I have a requirement to initialize the newly added fileds in IMS database.
for example, A and B are two segments in my database and B segment is child to Segment A.
I have added one filed in Segment A and one filed in Segment B.
Now my requirement is to initialize these fields in Segment A and Segment B.
Here my doubt is ,
Shall I read each record in parent segment i.e. Segment A and intialize the newly added variable and continue this till end of the segment
and after that I read child segment i.e. Segment B and perform the initilization. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If there are millions and millions of segments, i'd consider unloading the data, making the changes to the sequential data, and then reloading.
This should make controlling the process more straightforward and improve performance. |
|
Back to top |
|
|
prashanth1
New User
Joined: 27 Sep 2006 Posts: 47 Location: Hyderabad
|
|
|
|
Thanks d.sch
Yes there are millions of records in the segments. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
prashanth1 wrote: |
Shall I read each record in parent segment i.e. Segment A and intialize the newly added variable and continue this till end of the segment |
What exactly do you mean by "record"? In IMS the smallest unit the program will read is a 'segment' - so you read segment/s and then all the values in that segments are available to you -- so no-records, as such, you talk about from IMS per se.
GN in a loop till you get GB/GE should work for you. Keep in mind, IMS will go down the hirerachy, front to back and left to right. If you have millions of records (which possibly a big count for you) -- you might use the concept of AREAs (but if your IMS is not designed that way, it's a moot point here), on the other hand you can break your process in multiple Jobs, let's say you want a seprate job for every 100,000 segments of type A -- that way first job would update first 100,000 segments of type-A, second will start from 100,000 to 200,000 and so on.
Per your description, your IMS must be oraganised on some key in segement-A, in Job-1 use a qualifed SSA to position the control for segment-A and read it till you get a key match for the 100,000th segment-A. in Job-2 use a qualifed SSA to position the control for segment-A at position 100,000, issue GN till you get a key match for the 200,000th segment-A... |
|
Back to top |
|
|
|