How can I read a file,
test the contents to a variable in a while loop and if the contents differ. decrement the lines of the file to another variable and write a line of text on the line directly above the variable. e.g.
for(
String line; (line = lrdr.readLine()) != null {
System.out.println(lrdr.getLineNumber() + ":\t" + line);
if(br.readLine().startsWith("0TRADER:") == true){
prevTrader = br.readLine().substring(19,22);
if(br.readLine().startsWith("1")){ onelineNo = lrdr.getLineNumber(); if(br.readLine().startsWith("0TRADER:") == true){ curTrader = br.readLine().substring(19,22); if(curTrader.compareTo(prevTrader) != 0){ --onelineNo; System.out.println("$DJDE FORMS=PARIB6 FORMAT=PARCIX DUPLEX=NO FEED=BLUE SIDE=(NUFRONT,NOFFSET) MODIFY=NONE END;");
[ October 27, 2006: Message edited by: Jim Yingst ]