GetChildrenParentsRelationShip

Cache, Get Parents/Children Relationship

Minor Business Rule

Object Name: B1200200

Parent DLL: CAEC

Location: Client/Server

Language: C

Functional Description

Purpose

This function display the Parents/Children Relationship of F1201.


Setup Notes and Prerequisites

It has to be used with business function B1200050 and B1200100.


Special Logic




Technical Specification


If it is the fist item

Get the record from cache and return the record

else

If LinkListPtr=0
   1. Create linked list LPLINKLIST lpTempList

  The Linked list Data Struct (dsTempNode) is





B1200200 

  2. Store Data Pointer

Else
  Retrieve Data pointer

End if

Set NoMoreRecords to '0'
Get- Call business function B1200100 to Get items from Cache with Level, Parent and 

Sequentialfetch (='1') as passed parameters


If Get is successful
Let current item of Linked List is the first item of the linked list

  Add  to the linked List as first element

 Return Cache record: Level, Asset Number, Sequence Number and Parent

Else
  Set Flag to zero

  While flag is equal to zero

Retrieve first Linked List element

If retrieve is success

Get Next - Call Business Function B1200100 to get next item from Linked 
Listwith Parent and Level of the linked list item as parameters 

If Get next is successful 

Add to the linked list as first element

Return cache record, Level, Sequence Number and Parent

Set Flag to 1.

Else

Close cursor and free data pointer by calling B1200100

End if

Else

Set Flag to '1'

NomoreRecords = '1'

Destroy Linked List and remove Data Pointor

End if

End while

End
End




Data Structure

D1200200 - Cache, Get Parents/Children Relationship

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAssetItemNumberNUMBMATH_NUMERICNONENONE

An 8-digit number that uniquely identifies an asset.

nLevelINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

mnParentMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnSequenceNumberMATH02MATH_NUMERICNONENONE

- - - Good Performance High Value. 

idLinkListPtrGENLNGIDNONENONE

General purpose ID variable.

cNoMoreRecordsEV01charNONENONE

An option that specifies the type of processing for an event.

cIfFirstItemEV02charNONENONE

'1' = First item
^

nDisplayLevelINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

szCacheNameOrNumberJOBcharOPTNONE

Job Number

Related Functions

B1200050 F1201, Create Parent Child Asset Cache
B1200100 Cache, Process Asset Tree

Related Tables

None