Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:18:57+00:00 2026-06-04T03:18:57+00:00

I’m trying to use a vim script that issues commands to sas, When i

  • 0

I’m trying to use a vim script that issues commands to sas,
When i try to run the script i receive an error

“Can’t open file ..path.. /AppData/Local/Temp/ .. temp file .. “

this is the path and file name returned by :tempname()

After navigating to the appdata temp files directory, the temp file does not exist.

I’ve tried manually changing the backup directory with set backupdir=~\tmp
(a directory I created)
but that doesn’t change the return value of :tempname() nor does the tempfile actually exist.

Two questions,
1. Is there a way to ensure vim is writing the file the script seems to need
2. can i rewrite the script to avoid needing a temp file? (just pass the path to the actual file to sas?)

the relevant part of the script is

    let returntxt = system("\"" .
    \ shellescape("C:\\Program\ Files\\SAS\\SASFoundation\\9.2\\sas.exe") .
    \ "\ -nosplash" . "\ -sysin" . "\ " .
    \ shellescape(expand("%:p")) .  "\"") 

" Shows the return messages from the SAS commandline (may be useful
" if no log produced)
:echo "*** SAS commandline: " . returntxt
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:18:57+00:00Added an answer on June 4, 2026 at 3:18 am

    Option ‘backupdir’ contains a list of directories where backup files are generated, it has nothing to do with temporary directory (except that it depends on where it is located, opposite is not true). You should try using %TMP% or %TEMP% environment variable, either from vim using

    let $TMP=expand('~/tmp')
    

    or before vim is launched (don’t know how to do this on windows). Using let $TMP does work for me under wine, but only for existing temporary directories.

    Note that your system() call is rather strange: shellescape() should already add all needed quotes so that surrounding "\"" are not required (if it does not you should properly configure ‘shell*’ options). You also don’t need to escape spaces: "\ " and " " are exactly the same strings.

    About second question: you can try passing file contents as a second argument to system(), but if file may contain NULLs it is not going to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.