To define a primary key:
file control. select fd-name assign to "user.dat" organization is indexed record key is fd-name-key. ... fd fd-name. 01 fd-name-record. 03 fd-name-key pic X(5).