Primary Key Specification

The primary key is optional and inferred from the input when there's only a single input. For PRIVATE VERSIONED datasets, which do not require PRIMARYKEY, you must explicitly define a primary key for a multi-input dataset.

Syntax:
primary_key_specification ::= PRIMARYKEY column_list ;
entity_id_specification ::= ENTITYID column_list ; (internal)
column_list ::= '[' column_name [, column_name]… ']'
Example:
IMPORT SOURCE CUSTOMERS
DEFINE DATASET CUSTOMERS_D 
 ROWSOURCE CUSTOMERS;
 THIS = CUSTOMERS;
 PRIMARYKEY[CUST_ID];
END