Example of Creating a New Index File
78 close-file value x"fa80"
78 open-new-index value x"0007".
78 get-next-rec value x"0008".
78 add-key-value value x"0009".
...
move open-new-index to fh-opcode
perform extfh-op
move get-next-rec to fh-opcode
perform extfh-op
perform until fcd-status (1:1) not = "0"
perform varying fcd-key-id from 0 by 1
until fcd-key-id = key-count
or fcd-status (1:1) not = "0"
move add-key-value to fh-opcode
perform extfh-op
end-perform
move get-next-rec to fh-opcode
perform extfh-op
end-perform
move close-file to fh-opcode
perform extfh-op
...
extfh-op.
call "EXTFH" using fh-opcode, fcd
if fcd-status of fcd (1:1) = "1"
move 1 to return-code
end-if.