Page 2 of 2

Re: Display msglines

PostPosted: Mon May 30, 2011 1:36 pm
by Julie
Finally I used the following code to navigate between MSGLINEs.
Five lines of code are displayed before the MSGLINE except when there are fewer than five lines between two MSGLINEs.
    ADDRESS ISPEXEC "CONTROL ERRORS RETURN"                                 
    "ISREDIT SEEK P'=' 1 NEXT"       
    "ISREDIT LOCATE NEXT MSGLINE"         
     IF RC=4 THEN DO                                                       
      'ISPEXEC SETMSG MSG(MONER008)'                                       
      EXIT                                                                 
     END                                                                   
    "ISREDIT SEEK P'=' 1 NEXT"
    "ISREDIT DOWN CURSOR"
    "ISREDIT (LT) = LINENUM .ZCSR"                                         
    "ISREDIT LOCATE NEXT MSGLINE"                                           
     IF RC=4 THEN DO                         
      'ISPEXEC SETMSG MSG(MONER008)'                                       
      LN = LT-5                                                             
      "ISREDIT LOCATE &LN"                                                 
     END                                                                   
    ELSE DO                                                                 
     "ISREDIT (LN) = LINENUM .ZCSR"                                         
     LN = LN-5           
     DO WHILE LN<LT           
      LN = LN+1                                                             
     END                                                                   
     "ISREDIT LOCATE &LN"                                                   
    END                                                                     

Thanks again Steve.