by Sandy Zimmer » Wed Jul 23, 2008 5:46 pm
Ritwik, Your application dictates how you code the calls. I have dealt with all situations. Let's do a little psuedo code...
You know the org and dept - the SSA for both will be qualified - you will have a loop until you get a GE or GB - if you get a GE while executing this loop, you need to check the segment level and concatenated key in your PCB to determine what key. If you no longer have the org or dept that you want, you are done.
ORGANIZATION | _ There can be many other root segments.
|
v
DEPARTMENT | There can be many child department segments under each org.
|
v
EMPLOYEE | This will be your main loop. You will use the org and dept qualified and GN your employee segments. When you have a successful call, you will then build your qualified SSA for employee and execute your loop to retrieve all dependant segments for this particular employee. There may one employee or 500 employee - how ever many are on the database.
|
v
DEPENDANTS | When you get a GB or GE, return control back to the employee loop. Use an unqualified SSA to get your next employee.