1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
* Allocate dummy variables to 24 hours.

* rlevesque@videotron.ca.
* Run syntax and look at data editor to see the purpose.

DATA LIST LIST /caseid(F8) start(F8.2) end(F8.2). 
BEGIN DATA. 
1 0710 0730 
1 0805 0900 
2 0650 0759 
3 0925 1010 
3 0605 0805 
4 0730 0735 
5 0724 0800 
6 0552 0910
7 0759 0859
8 0800 0859
9 0800 0900
10 0759 0859
END DATA. 
LIST.

COMPUTE s=TRUNC(start/100)-.1.
COMPUTE e=TRUNC((end+1.1)/100)+.1.
VECTOR v(24).
LOOP  #cnt=1 TO 24.
COMPUTE v(#cnt)=RANGE(#cnt,s,e).
END LOOP.
EXECUTE.