First in your COBOL-IMS program you can issue DL/I calls to retrive the segment fields from the

IMS database. In your DL/I call, you specify PCB-MASK, which is relates to your Linkage sectio n of the program, through ENTRY statement, which you coded as first statement in your procedure division. IMS take care of retriving the database for your DL/I call. In PSB, you have to specify the PCB field and SEGM( also FIELD SENSEG) fields. Suppose Parent segment contain Student Rec & child is having course details. First stmt in procedure division will be ENTRY stmt mentioning PCB's. Then Suppose you want to access rec for some perticular stuadent. You have to give a GU call after moving that perticular Student ID to KEY VALUE Field of that PCB. If RC from Call is SPACES you got that rec. in same way, If you want to access Courses rec., will issue an GNP Cal l....P represents PARENTAGE.....which means all value of child linked to the par ent. again if you get SPACES as retrieved a child for that STUDENT ID....sim ilar way you can give continue GNP calls to access all the child.

Sign up to vote on this title
UsefulNot useful