Question

Status:Closed    Asked:Jan 14, 2018 - 06:18 PM

SPSS Mac change directory issue

I'm trying to import a dataset into SPSS 24 for the Mac. For the life of me I cannot get a simple cd command to work. Here's my syntax:


cd "

/Volumes/Tonys Passport 3tb/DocumentsPassport/___NHISdata/".

Yes, i've tried all the variations I can think of up to and including MacBook Pro (2)/ and Users/Tony/

And, yes, I will post this question in the SPSS forums, too. Will post back here if I get an answer there.

Many thanks,

Tony Lima

 
Do you have the same question? Follow this Question
 

Staff Answer

Glad to hear your were able to find a solution to run the SPSS syntax. As Mr. Peck pointed out, your original cd command appears to be on two lines, where it should be a singular line or utilize the multi-line prompt.

Feel free to reach out if you have any questions in the future.

 

Jan 16, 2018 - 08:25 AM

0
0
Report it

Answers

I have no idea what's going on. But I tried the following and it worked. I would swear that I tried this at least once before and it failed. But, for better or worse, I didn't log my various attempts.


cd "/Volumes/Tonys Passport 3tb/DocumentsPassport/___NHISdata/".


Thanks to @jkpeck over on the IBM boards for pointing out the multi-line issue. I'll give credit to that as an answer, even though I truly don't know why this finally worked. I believe Mr. Keck may have powers beyond simply giving answers on this board.


Here is Mr. Keck's explanation of how to handle multi-line literals in SPSS:


To continue a literal across lines, end each segment with a closing quote, and join them with +. For example,
"Abcd" +
"Efgh"


Best, Tony

Source: https://developer.ibm.com/answers/que...

 

Jan 15, 2018 - 12:09 PM

0
0
Report it

OTHER QUESTIONS NEEDING ANSWERS

SPSS CD command won't work
Login   |   Register

Recently Active Members

View More »

Share |