Applies to: | Hash iterator object |
data work.astro; input obj $1-4 ra $6-12 dec $14-19; datalines; M31 00 42.7 +41 16 M71 19 53.8 +18 47 M51 13 29.9 +47 12 M98 12 13.8 +14 54 M13 16 41.7 +36 28 M39 21 32.2 +48 26 M81 09 55.6 +69 04 M100 12 22.9 +15 49 M41 06 46.0 -20 44 M44 08 40.1 +19 59 M10 16 57.1 -04 06 M57 18 53.6 +33 02 M3 13 42.2 +28 23 M22 18 36.4 -23 54 M23 17 56.8 -19 01 M49 12 29.8 +08 00 M68 12 39.5 -26 45 M17 18 20.8 -16 11 M14 17 37.6 -03 15 M29 20 23.9 +38 32 M34 02 42.0 +42 47 M82 09 55.8 +69 41 M59 12 42.0 +11 39 M74 01 36.7 +15 47 M25 18 31.6 -19 15 ;The following code sets the starting key for iteration to
'18 31.6'
:data _null_;
length obj $10;
length ra $10;
length dec $10;
declare hash myhash(hashexp: 4, dataset:"work.astro", ordered:"yes");
declare hiter iter('myhash');
myhash.defineKey('ra');
myhash.defineData('obj', 'ra');
myhash.defineDone();
call missing (ra, obj, dec);
rc = iter.setcur(key: '18 31.6');
do while (rc = 0);
put obj= ra=;
rc = iter.next();
end;
run;