I am trying to read a file and print him... for tests and i don´t understand why don´t print...
a piece of the code :
ON ENDFILE (MYSORTO) W_END_FILE = '1'B;
OPEN FILE (SYSPRINT);
OPEN FILE (MYSORTO);
READ FILE (MYSORTO) INTO (ESTRUT);
PUT SKIP EDIT('PLANET = ',PLANET) (A);
IF W_END_FILE = '1' THEN DO;
PUT SKIP EDIT('ARQUIVO VAZIO!!!') (A);
STOP;
END;
ELSE DO;
DO WHILE(W_END_FILE);
READ FILE (MYSORTO) INTO (ESTRUT);
ESTRUT = ' ';
END;
END;
PUT SKIP EDIT('PLANET = ',PLANET) (A);
CLOSE FILE(MYSORTO);
OPEN FILE (SYSPRINT);
OPEN FILE (MYSORTO);
READ FILE (MYSORTO) INTO (ESTRUT);
PUT SKIP EDIT('PLANET = ',PLANET) (A);
IF W_END_FILE = '1' THEN DO;
PUT SKIP EDIT('ARQUIVO VAZIO!!!') (A);
STOP;
END;
ELSE DO;
DO WHILE(W_END_FILE);
READ FILE (MYSORTO) INTO (ESTRUT);
ESTRUT = ' ';
END;
END;
PUT SKIP EDIT('PLANET = ',PLANET) (A);
CLOSE FILE(MYSORTO);
when i put the "put skips" in "do while" don´t print anything...
why????
Thanks for helps!!!