Cursor positioning

Hi there

There is a way to position the cursor in same position on array field (Option) that was selected. Example:

Option Description
[ ] XXXXXXXXXXX
[ ] XXXXXXXXXXX
XXXXXXXXXXX
[ ] XXXXXXXXXXX
[ ] XXXXXXXXXXX

After option selection do some processing then return to same position that was selected, in this case Option(3)

Thanks in advance

Boy, does any one ever read the manual anymore:

DEFINE DATA LOCAL                              
1 #SEL              (A1/5)                     
1 #MARK             (P1)                       
END-DEFINE                                     
*                                              
REPEAT                                         
  INPUT MARK #MARK                             
      'Option Description' /                   
      '------ -----------' /                   
      ' ' #SEL(1)(AD=M'_') 4X 'Option 1' /     
      ' ' #SEL(2)(AD=M'_') 4X 'Option 2' /     
      ' ' #SEL(3)(AD=M'_') 4X 'Option 3' /     
      ' ' #SEL(4)(AD=M'_') 4X 'Option 4' /     
      ' ' #SEL(5)(AD=M'_') 4X 'Option 5' /     
  /*                                           
  EXAMINE #SEL(*) FOR 'X' GIVING INDEX #MARK   
END-REPEAT                                     
END                                            

If some of the input lines contain multiple modifiable fields, calculate the #MARK field with the POS function.

DEFINE DATA LOCAL                       
1 #SEL              (A1/5)              
1 #PARM             (A3/3)              
1 #MARK             (I4)                
END-DEFINE                              
*                                       
REPEAT                                  
  INPUT (AD=MT'_' IP=F) MARK #MARK      
        'Option Description'            
      / '------ -----------'            
      / ' ' #SEL (1) 4X 'Option 1'       
        'Sub parms:' #PARM (1)          
                     #PARM (2)          
                     #PARM (3)          
      / ' ' #SEL (2) 4X 'Option 2'       
      / ' ' #SEL (3) 4X 'Option 3'       
      / ' ' #SEL (4) 4X 'Option 4'       
      / ' ' #SEL (5) 4X 'Option 5'       
  /*                                    
  EXAMINE #SEL(*) 'X' GIVING INDEX #MARK
  ASSIGN #MARK = POS (#SEL (#MARK))
END-REPEAT                         
END