[progress Communities] [progress Openedge Abl] Forum Post: Re: 11.5: Read And Write A File 1:1

  • Thread starter Thread starter Patrick Tingen
  • Start date Start date
Status
Not open for further replies.
P

Patrick Tingen

Guest
James' answer is not so bad either. I have taken this approach more than once myself too. Something along the lines of the below code to adjust the line you read in on the fly and write it back to disk. DEFINE VARIABLE cDataIn AS LONGCHAR NO-UNDO. DEFINE VARIABLE cDataOut AS LONGCHAR NO-UNDO. DEFINE VARIABLE cLine AS CHARACTER NO-UNDO. DEFINE VARIABLE iLine AS INTEGER NO-UNDO. COPY-LOB FILE "c:\temp\data-in.txt" TO cDataIn. DO iLine = 1 TO NUM-ENTRIES(cDataIn,'~n'): cLine = ENTRY(iLine,cDataIn,'~n'). IF THEN DO: END. cDataOut = cDataOut + cLine + '~n'. END. COPY-LOB cDataOut TO FILE "c:\temp\data-out.txt".

Continue reading...
 
Status
Not open for further replies.
Back
Top