I actually call it from a stored procedure:

*(Sp_GetTemp  auth mbyerley 011505)
*(Use only 2 Ret VarNames vRetText and vRetInt)
*(Input Params should be of: pt1,pt2, for text pi1,pi2 for Int)
CLEAR VAR stp_return
SET VAR vrettext = (ENVVAL('TEMP'))
IF (SGET(.vrettext,1,(SLEN(.vrettext)))) <> '\' THEN
  SET VAR vrettext = (.vrettext + '\')
ENDIF
RETURN .vrettext


The IF / ENDIF checks for trailing backslash to add if missing, prepping the 
pathname for the addition of whatever...

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Michael
> J. Sinclair
> Sent: Friday, July 17, 2015 5:44 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: Code quit working
> 
> Mike,
> How do you grab the path of the windows temp folder?
> Mike
> 
> ________________________________
> 
> From: MikeB <[email protected]>
> To: RBASE-L Mailing List <[email protected]>
> Sent: Friday, July 17, 2015 10:53 AM
> Subject: [RBASE-L] - Re: Code quit working
> 
> 
> Why fight city hall?
> 
> I gave up on this issue several years back and just grab the path of
> the windows temp folder for the current user, which always guarantees
> read/write permissions.
> 
> 
> 
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]] On Behalf Of Karen
> > Tellef
> > Sent: Friday, July 17, 2015 10:30 AM
> > To: RBASE-L Mailing List
> > Subject: [RBASE-L] - Re: Code quit working
> >
> > Same thing happened to me when a client had a windows update...  A
> > program regularly saved to a file called File.Txt.  All of a sudden
> > that file became super-protected and could not be overwritten or
> > viewed.  An administrator had to delete the file, then the program
> > would work once but again the file would be super-protected.  Believe
> > it or not:  I changed the program to save to a file named File2.txt,
> > and it works every time....  Don't ask me why...  So try changing the
> > name of the file.
> >
> > Karen
> >
> >
> >
> > -----Original Message-----
> > From: Michael J. Sinclair <[email protected]>
> > To: RBASE-L Mailing List <[email protected]>
> > Sent: Fri, Jul 17, 2015 9:00 am
> > Subject: [RBASE-L] - Code quit working
> >
> >
> > Hi all,
> > The following code was working perfectly, 2 days ago after a windows
> > update, it stopped working. The error message is...
> >
> > Can not find the U:\note.txt file
> >
> > Strange, it works when I trace it.
> >
> > --offnote.cmd
> > SET VAR vpnum REAL
> > IF vpnum IS NULL OR vpnum = 0 THEN
> >  GOTO END
> > ENDIF
> > SET HEADINGS OFF
> > DROP TABLE offnotes_dup
> > PROJECT TEMPORARY offnotes_dup FROM offnotes USING * + WHERE patnumbr
> =
> > .vpnum UPDATE offnotes_dup SET dictdata = +
> >
> '######################################################################
> > ######' + WHERE dictdata = 'DICTATED BUT NOT READ TO EXPEDITE FILING'
> > OUTPUT u:\note.txt
> > SELECT dictdata FROM offnotes_dup +
> > WHERE patnumbr = .vpnum ORDER BY rdate_=D linenum=A OUTPUT SCREEN
> > LAUNCH u:\note.txt ERASE u:\note.txt LABEL END RETURN
> >
> > What am I doing wrong?
> 
> 
> 


Reply via email to