Processing records
Message | Short description | Origin |
---|---|---|
pAll_For_Parent_Relation | All child records for a parent in a relation | Child DDO |
pAll_For_Parent | All child records for a parent | Child DDO |
pAll_Children_Relation | All child records in a specific file from a parent by a relation | Parent DDO |
pAll_Children_Child | All child records in a specific file from a parent | Parent DDO |
pAll_Children | All child record from a parent | Parent DDO |
pChild_Count | Count the number of child records for current parent | Parent DDO |
pChild_Count_Relation | Count the number of child records for current parent in a specific relation | Parent DDO |
pDelete_Children | Delete all children from current parent | Parent DDO |
pDelete_Children_Child | Delete all children from current parent record in a child file | Parent DDO |
pDelete_Children_Relation | Delete all children from current parent using a specific relation | Parent DDO |
pCheck_Children | Delete all children from current parent | Parent DDO |
pCheck_Children_Child | Delete all children from current parent record in a child file | Parent DDO |
pCheck_Children_Relation | Delete all children from current parent using a specific relation | Parent DDO |
pCopy_Record | Copy the current record | Parent DDO |
pCopy_Children | Copy the children for a specified record | Parent DDO |
pCopy_Children_Child | Copy the child records for the current record in a specific child file | Parent DDO |
pCopy_Children_Relation | Copy the child records for the current record for a specific relation | Parent DDO |
pChange_Key | Change the key for a specific record and its children | Parent DDO |
All child records for a specific parent/relation
pAll_For_Parent_Relation ; Integer Pre_Message ; Integer Main_Message ; Integer Post_Message ; String Parameter ; Integer Stop_On_Error ; Integer Busy_Counter ; Integer Parent_File ; Integer Relation_Code ; String Parent_Value ; Integer Recurse ; Returns Integer
Process all child records for a given parent in a given relationships. The pre-messages is executed once prior to processing the children. The post message is executed after all children are processed.
The parameter is passed to pre, main and post. Main should return 0 for success, non zero for error.
Stop_On_Error indicates whether an error should stop processing or whether it should continue processing. Valid choices:
- 0: Report errors, do not stop
- 1: Do not report errors, do not stop
- 2: Do not report errors, but stop
- 3: Do report errors and stop
Busy_Counter indicates the number of the busy counter to update; -1 indicates no busy counter to be updated.
The return value is either the number of records processed, or a negative number indicating an error.
This message is processed in/send to the data dictionary of the child file.
If the Recurse parameter is True, the message will be processed for all grandchildren by any relation. However, only the Main_Message will recurse. If you need to execute pre- or post-messages on other levels, you will need to perform the recursion in your own main message.
All child records for a specific parent
pAll_For_Parent ; Integer Init_Message ; Integer Pre_Message ; Integer Main_Message ; Integer Post_Message ; Integer Term_Message ; String Parameter ; Integer Stop_On_Error ; Integer Busy_Counter ; Integer Parent_File ; String Parent_Value ; Integer Recurse ; Returns Integer
Identical to the message pAll_For_Parent_Relation, but this works on all the relationships to the parent. The Init_Message is send prior to all the relationships, the Pre_Message is send at the start of the handling of every specific relation. Likewise, the Term_Message is send at the conclusion of all the relationships, whereas the Post_Message is send at the end of every set of related records
All child records for a specific parent by a specific relation
pAll_Children_Relation ; Integer Buffer_Id Integer Pre_Message ; Integer Main_Message ; Integer Post_Message ; String Parameter ; Integer Stop_On_Error ; Integer Busy_Counter ; Integer Child_File ; Integer Relation_Code ; Integer Recurse ; Returns Integer
This message processes all the child records in the specified child file for the current record in the specified buffer, using the specified relationship. This message is effectively identical to pAll_For_Parent_Relation, except that this message is issued to the parent data dictionary rather than to the child data dictionary.
Buffer_Id should contain the ID of the buffer that holds the current record (0 = global buffer). The child file specifies the number of the file in which the children should be processed.
All child records for a specific parent
pAll_Children_Child ; Integer Buffer_Id Integer Init_Message ; Integer Pre_Message ; Integer Main_Message ; Integer Post_Message ; Integer Term_Message ; String Parameter ; Integer Stop_On_Error ; Integer Busy_Counter ; Integer Child_File ; Integer Recurse ; Returns Integer
As pAll_Children_Relation, but now use all the relationships to the specified child file.
All child records
pAll_Children ; Integer Buffer_Id Integer Init_Message ; Integer Pre_Message ; Integer Main_Message ; Integer Post_Message ; Integer Term_Message ; String Parameter ; Integer Stop_On_Error ; Integer Busy_Counter ; Integer Recurse ; Returns Integer
As pAll_Children_Parent, but now all the relationships from this parent are processed.
Count child records
pChild_Count ; Integer Buffer_Id ; Integer Busy_Counter ; Returns Integer
Count all the child records for a specific parent record. The return value is the record count. Busy_Counter as with all other messages.
Count child records in a relation
pChild_Count_Relation ; Integer Buffer_Id ; Integer Child_File ; Integer Relation_Id ; Integer Busy_Counter ; Returns Integer
Count the children in a specific relation.
Delete child records
pDelete_Children ; Integer Buffer_Id ; Integer Busy_Counter ; Returns Integer
Delete all child records for the current record in the specified buffer. The return value, if positive, is the number of deleted records. If negative, it is an errorcode.
Delete child records in specific file
pDelete_Children_Child ; Integer Child_File ; Integer Buffer_Id ; Integer Busy_Counter ; Returns Integer
Delete all the children in a specified child file for the record in the current buffer.
Delete child records for a specific relation
pDelete_Children_Relation ; Integer Child_File ; Integer Relation_Number ; Integer Buffer_Id ; Integer Busy_Counter ; Returns Integer
Delete all the children by a specified relation for the record in the current buffer.
Check to delete child records
pCheck_Children ; Integer Buffer_Id ; Integer Busy_Counter ; Returns Integer
Check whether it is okay to delete all child records for the current record in the specified buffer. A zero return value means ok, a non zero value means fail.
Check to delete child records in specific file
pCheck_Children_Child ; Integer Child_File ; Integer Buffer_Id ; Integer Busy_Counter ; Returns Integer
Check whether it is ok to delete all the children in a specified child file for the record in the current buffer.
Delete child records for a specific relation
pCheck_Children_Relation ; Integer Child_File ; Integer Relation_Number ; Integer Buffer_Id ; Integer Busy_Counter ; Returns Integer
Check whether it is ok to delete all the children by a specified relation for the record in the current buffer.
Copy a record
pCopy_Record ; Integer Buffer_Id ; String New_Key Integer Busy_Counter ; Integer Recurse ; Returns Integer
Copy the record in the specified buffer to a new record using the specified new key. If recurse is specified, all child records are copied as well.
Copy a record by value
pCopy_Record_By_Value ; String Org_Key String New_Key Integer Busy_Counter ; Integer Recurse ; Returns Integer
Copy the record with the specified key to a new record using the specified new key. If recurse is specified, all child records are copied as well. The return value is either the number of records copied or a negative errorflag.
Copy children in a specific child file
pCopy_Children_Child ; String Org_Key ; String New_Key ; Integer Child_File ; Integer Busy_Counter ; Returns Integer
Copy all the child recods from parent Org_Key to New_Key in the specified Child_File. The return value is the number of records copied or a negative value indicating an error.
Copy children in a specific relation
pCopy_Children_Child ; String Org_Key ; String New_Key ; Integer Child_File ; Integer Relation_Id ; Integer Busy_Counter ; Returns Integer
Copy all the child recods from parent Org_Key to New_Key in the specified relation.
Change a key
pChange_Key ; String Org_Key String New_Key Integer Busy_Counter ; Returns Integer
Change the key of a record from Org_Key to New_Key and process this throughout the database. A negative value indicates failure, a positive return value specifies the number of records updated.