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

Initialization


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prashanth1

New User


Joined: 27 Sep 2006
Posts: 47
Location: Hyderabad

PostPosted: Thu Jul 28, 2011 9:44 pm
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 28, 2011 10:08 pm
Reply with quote

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

New User


Joined: 27 Sep 2006
Posts: 47
Location: Hyderabad

PostPosted: Thu Jul 28, 2011 10:57 pm
Reply with quote

Thanks d.sch

Yes there are millions of records in the segments.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Aug 02, 2011 8:57 pm
Reply with quote

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
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 % free space issue of the Storage Gro... JCL & VSAM 6
No new posts CICS logoff and commare initialization CICS 1
No new posts Variable initialization error COBOL Programming 8
No new posts Initialization of DS and DC variable ... PL/I & Assembler 7
No new posts Question on initialization COBOL Programming 10
Search our Forums:

Back to Top