May I ask what is the tool for which you created your original data file?
Anyway, most of your data can be translated to OPL in a straightforward way. For sparse sets as nx you will have to use tuples for indexing and take a short detour in the definition. A set like D can be defined in OPL as well but in that case you are probbably better off using a range.
Here is a literal translation of some of your data:
{string} S = ...;int isNightS[S] = ...;{string} C = ...;int nWE[C] = ...;{string} N = ...;{string} NS[N] = ...;tuple NX { key string nurse; key string shift; key int day; int count;}{NX} nx_data = ...;int nx[i in nx_data] = i.count;{int} D = ...;int r[D][S] = ...;This works with the attached .dat file.
Before continuing with that, I suggest to double check whether you want to rearrange your data in a way that better fits what OPL can do. At first glance it seems like OPL is more powerful than the data language you use in your original .dat file, so rearranging data may allow easier .dat files.
In general, you probably have to work through some of the more advanced OPL examples that ship with CPLEX to get used to OPL data structures etc.
------------------------------
Daniel Junglas
------------------------------