test: proc options (main); declare menu(4) character(100) varying static initial ( 'fee fie', 'huff and puff', 'mirror mirror', 'tick tock'); declare (i, k) fixed binary; do i = lbound(menu,1) to hbound(menu,1); put skip edit (trim(i), ': ', menu(i) ) (a); end; put skip list ('please choose an item number'); get list (k); if k >= lbound(menu,1) & k <= hbound(menu,1) then put skip edit ('you chose ', menu(k)) (a); else put skip list ('Could not find your phrase'); end test;