Actually you don't.
The only requirement is to include in the PDV (Program Data Vector) the complete dataset layout before declaring the hash. The open function will do just that, allocate in the PDV the dataset layout.
You could substitute:
dsid=open("fa_sample","i");
dsid=close(dsid);
For:
if 0 then set fa_sample;
Now, this is kind of a trick, this will set the dataset (alocate layout into the PDV) without actually reading any row from it (if 0, will always evaluate to false).
Both codes will do exactly the same.
Cheers from Portugal.
Daniel Santos @
www.cgd.pt.