prt_api_modify_item_att

Name

prt_api_modify_item_att

Purpose

Modify item tracking data attributes.

Description

This routine provides a mechanism to modify Serialized Item attributes. The calling routine receives back a status indicating the success or failure of the request.

Syntax

int prt_api_modify_item_att ( timestamp, region_id, item_id,

                              reference_id, num_atts_valid,

                              item_att_list, comment,

                              user_or_svc_id, retstat)

cor_time_t        timestamp;

char          region_id[PRT_REGION_ID_LEN + 1];

char          item_id[PRT_ITEM_ID_LEN + 1];

char          reference_id[PRT_ITEM_ID_LEN + 1];

COR_I1        num_atts_valid;

PRT_ITEM_ATT  item_att_list[PRT_NUM_ATTRIBUTES];

char          comment[SC_DESCRIPTION_LEN + 1];

char          user_or_svc_id[SERVICE_ID_LEN + 1];

COR_STATUS    *retstat;

Data Structures

typedef struct

{

  char att_name[PRT_ATTRIBUTE_LEN + 1] - item attribute name

  char att_value[PRT_ATTRIBUTE_LEN + 1] - item attribute value

} PRT_ITEM_ATT

Arguments

Argument

Description

Input

 

Serialized Items Only

 

Timestamp

The time the item was last moved or modified. The timestamp is used to ensure that, when attempting to modify an item's attributes, the item has not changed (or moved) between the time when information was last obtained for that item and the attempt to modify it. (One of the fields in the structure which returns data on an item is the last_mod_time field, which indicates the time at which the item was last moved or modified.) If the timestamp argument provided to this function is older than the timestamp associated with the item at the time of the attempted modification, then the modification is not performed and a warning returned. If the timestamp argument passed to this function is zero, the operation is performed without any timestamp checking.

region_id

Region where item last resided (required)

item_id

Unique identifier of a Serialized Item (optional if reference id specified)

reference_id

Secondary identifier of a Serialized Item (optional if item id specified)

num_atts_valid

Number of item attributes valid; this specifies the number of array elements in the item attribute list that contain valid data.

item_att_list

Item Attributes pertain to Serialized Items. (required)

comment

Comment to be recorded in PRT history log file. (optional)

user_or_svc_id

User or service identifier (optional)

Output

 

*retstat

Pointer to COR_STATUS structure

Return Value

Either COR_SUCCESS, COR_WARNING, or COR_FAILURE.

If the function returns COR_WARNING or COR_FAILURE, additional error information can be found in the COR_STATUS structure.

Error Codes

PRTI_NUM_ATTS_INVALID

Invalid number of item attributes specified (Warning)

PRTC_INVALID_ITEM_TYPE

Invalid item type specified (Warning)

PRTC_CANT_MATCH_BOTH

Item/XREF entry mismatch (Warning)

PRTC_ITEM_NOT_FOUND

Item ID not found (Warning)

PRTC_REF_NOT_FOUND

Reference ID not found (Warning)

PRTC_BAD_REG_SPEC

Bad region specified (Warning)

PRTC_ITEM_STAMP_TOO_NEW

An affected item has changed since the last display (Warning)

PRTI_ITEM_TYPE_NDEF

Item type identifier not valid (Warning)

PRTI_SER_NO_ID

Serialized item missing both item id and reference id (Warning)

PRTI_REG_ID_NULL

Region identifier NULL (Warning)

PRTI_REG_ID_NDEF

Region identifier not valid (Warning)

PRTI_ITEM_TYPE_NULL

Item type identifier NULL (Warning)

PRTI_ITEM_TYPE_NDEF

Item type identifier not valid (Warning)

PRTI_MF_INIT_ERR

Error initializing segment (Failure)

PRTI_CRESEG_ERR

Error creating segment (Failure)

More information

Application subroutines.