Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!ll-xn!husc6!bbn!rochester!kodak!ektools!barrett From: barrett@ektools.UUCP (Chris Barrett) Newsgroups: comp.sys.amiga.tech Subject: Re: Having trouble with the Execute() dos call Summary: Give this a try. Keywords: AmigaBasic Message-ID: <1241@ektools.UUCP> Date: 24 May 88 16:19:09 GMT References: <24869@bbn.COM> Organization: Eastman Kodak, Dept. 47, Rochester N.Y. Lines: 26 In article <24869@bbn.COM>, cosell@bbn.com (Bernie Cosell) writes: > what went wrong. I tried something REAL simple like: > library "dos.library" > declare function Execute&() library > Execute& (sadd ("date > ram:junk"), 0&, 0&) > Guru-central. If I try the above with the "> ram:junk" left out, I I believe the problem that you ar having is that BASIC doesn't append a null character to the end of a string, so AmigaDOS keeps trucking through the name you passed in intil it find a 0x00. Give this a try: DECLARE FUNCTION Execute& LIBRARY LIBRARY "dos.library" command$ = "date > ram:junk" + CHR$(0) status = Execute& (SADD(command$), 0&, 0&) I don't know how the Execute command handles the redirection of your date command, you could try using a file handle for the output file. Good luck! Chris. ...rochester!kodak!ektools!barrett