This has to be a dumb question, but how do I append to an existing text file in NetRexx. (That is, can I open a file for Append rather then Write). Probably more of a Java question then NetRexx, but I can't seem to figger it out. Thanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
> This has to be a dumb question, but how do I append to an existing text
> file in NetRexx. (That is, can I open a file for Append rather then > Write). Probably more of a Java question then NetRexx, but I can't seem > to figger it out. Using RXFile (http://www.geocities.com/SiliconValley/Park/4218), whenever you open a file you are defaulted to appending data, as in classic Rexx. Actually, you can use the very same syntax you were accustomed to use in classic Rexx for every file-related issue. Max ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
In reply to this post by Bruce Weise
>
>This has to be a dumb question, but how do I append to an existing text >file in NetRexx. (That is, can I open a file for Append rather then >Write). Probably more of a Java question then NetRexx, but I can't seem to >figger it out. > >Thanks > Hi Bruce, Read up on RandomAccessFile. It has all you want in reguards to file I/O. -- /-------------------------------------\ | Jerry McBride | | | | ([hidden email] | \-------------------------------------/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
In reply to this post by Bruce Weise
Things that make you go 'Doh!' When I went back to the documentation, there it was -- somebody musta written it in last night!<G> Oh well, open up another Jolt Cola B >| This has to be a dumb question, but how do I append to an existing text >| file in NetRexx. (That is, can I open a file for Append rather then >| Write). Probably more of a Java question then NetRexx, but I can't seem >to >| figger it out. >The java.io.FileWriter class has a constructor that takes a flag for >append: > >bw = BufferedWriter(FileWriter("C:\\CONFIG.SYS", 1)) -- 1 is for append, >0 is for overwrite >bw.write("REM This is a test") > >Better yet, use Max M's RxFile classes....Max? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
In reply to this post by Massimiliano Marsiglietti
I was just wondering if anyone can tell me why the
following code generates an array of of bounds exception? loop i = 1 to fontlist[fontlist.length] Say "The font list includes:" fontlist[i] end _________________________________________________ TeamOS/2 RexxLA V.O.I.C.E "Yes, Virginia, there is a better choice." Warpstock '98 http://www.warpstock.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
Unfortunately arrays in Java start at 0, not 1. Hence the following should
work better: loop i = 0 for fontlist.length Say "The font list includes:" fontlist[i] end (your original code doesn't even seem to use a number for its TO phrase?) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mike Cowlishaw, IBM Fellow, IBM UK Laboratories mailto:[hidden email] [http://www2.hursley.ibm.com] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to [hidden email] with the following message in the body of the note unsubscribe ibm-netrexx <e-mail address> |
Free forum by Nabble | Edit this page |