スパース キーを定義するには、次のように記述します。
file control.
select fd_name
assign to "user.dat"
organization is indexed
record key is fd-name-key
alternate record key is fd-name-alt-key
with duplicates
suppress when all "A".
...
fd fd-name.
01 fd-name-record.
03 fd-name-key pic X(3).
この例では、副キーの値がすべて A であるレコードが書き込まれた場合には、実際のキーの値は索引ファイルに格納されません。