Boa Tarde
E possivel transformar uma arquivo posicional em sequencial exemplo:
Arquivo horiginal
$DJDE$ FORMS=SHT001,FEED=TWO2,FORMAT=SVT01L,DUPLEX=NO,END;
PAG.: 01
ETQ.: 1
21 - PARANAGUA 3
0120 - ANTONINA 3
00014 - MOYSES LUPION, C E - E FUND 3
0120 - ANTONINA 3
Novo Arquivo
SHT001TWO2D6; PAG.:01;ETQ.:1; 21;PARANAGUA;0120;ANTONINA;00014;MOYSES LUPION, C E - E FUND;0120;ANTONINA
O que eu consegui ate o momento e ler o arquivo e gerar um novo ja e um começo segue o codigo:
import java.io.*;
public class ProcessadorTexto
{
// java ProcessadorTexto arquivo.txt novoArquivo.txt
public static void main (String [] args) throws Exception{
if(args.length != 2){
System.out.println("uso: java ProcessamentoTexto arquivo.txt novoArquivo.txt");
System.exit(1);
}
FileInputStream stream = new FileInputStream(args[0]);
InputStreamReader streamReader = new InputStreamReader(stream);
BufferedReader reader = new BufferedReader(streamReader);
FileWriter fileWriter = new FileWriter(args[1]);
PrintWriter writer = new PrintWriter(fileWriter);
// Neste while lemos o arquivo linha a linha
String line = null;
while( (line=reader.readLine() ) != null ) {
}
writer.close();
fileWriter.close();
reader.close();
streamReader.close();
stream.close();
}
}
Se perguntarem não e trabalho de Facul e arquivos mainframe indo para Plataforma Baixa sendo Tranformados de posicionais para Seguenciais.