/* Display some helpful information for APPEND. */ Parse Arg line1 '/' line2 'COMMAND EXTRACT /CMDLINE/RESERVED */LSCREEN/MSGLINE/' res_list = '' middle = lscreen.1 % 2 /* Middle line of screen */ Do ctr = 1 To reserved.0 /* Find already reserved line #'s*/ res_line = Word(reserved.ctr,1) Select When Pos('M',res_line) > 0 then Do /* Offset from middle of screen*/ Parse Var res_line . 2 sign 3 num . Select When num = '' then res_line = middle When sign = '-' then res_line = middle - num Otherwise res_line = middle + num End End When res_line < 0 then res_line = lscreen.1 + res_line + 1 Otherwise Nop /* Absolute format */ End res_list = res_list res_line End If msgline.1 = 'ON' & msgline.4 ^= 'OVERLAY' Then res_list = res_list msgline.2 /* Don't use MSGLINE */ If Length(line1' 'line2) <= 78 then lines = 1 /* Reserve just one line */ Else lines = 2 /* Reserve two adjacent lines */ If cmdline.2 < 6 then Do ctr = lscreen.1 To 2 By -1 /* CMDLINE TOP */ If Find(res_list,ctr) > 0 then Iterate If lines = 2 & Find(res_list,ctr-1) > 0 then Iterate Leave End Else Do ctr = 2 To lscreen.1 /* CMDLINE ON, OFF, or BOTTOM */ If Find(res_list,ctr) > 0 then Iterate If lines = 2 & Find(res_list,ctr+1) > 0 then Iterate If lines = 2 then ctr = ctr + 1 /* Don't overwrite IDLINE */ Leave End If ctr >= 2 & ctr <= lscreen.1 then Do If lines = 1 then 'COMMAND SET RESERVED' ctr 'HIGH' line1' 'line2 Else Do 'COMMAND SET RESERVED' ctr-1 'HIGH' Center(line1,78) 'COMMAND SET RESERVED' ctr 'HIGH' Center(line2,78) End End Exit