Hi,

I have a trouble transform a column into a table within a short time.

Set i /1*365/; (day)
Set j /1*288/; (5-min in a day)

Set k /1*105120/; (5-min in a year)

I have a data parameter column DataColumn(k) and I would like to transform DataColumn(k) into DataTable(i, j).

for example, k=1 means day 1 and 0:05. and k=2 means day 1 and 0:10.

Also, k=289 means day 1 and 0:05, and so on.

Here is what I try:

loop(k,

temp_day = trunc((ord(k) - 1)/card(j)) + 1;

- get quotient of k divided by 288

temp_min = mod(ord(k), card(j)); - get remainder of k divided by 288

if(temp_min = 0, temp_min = card(j);

DataTable(i, j)$(ord(i) = temp_day and ord(j) = temp_min) = DataColumn(k);

);

But it takes so much time, for me it takes 10 minutes to fully complete the codes.

Is there any efficient way to transform?

Best,