Format control on Save translate command

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Format control on Save translate command

Maguin, Eugene

I’m using save translate to export a text (csv) file and I’d like to control formats in the output file so I specified formats for the to-be output vars. So …, per the save translate documentation (p 1698, just above ‘Exceloptions subcommand’) I should get what I specified; however, I didn’t. I got 12 or 16 decimal places rather than my desired F7.5. Could there be a mismatch between command functioning and command documentation?

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Format control on Save translate command

Jon Peck
According to the doc, you should specify /TEXTOPTIONS FORMAT=VARIABLE to use the variable print formats.  You can check those with DISPLAY DICT.  Is that what you did?

On Wed, Oct 4, 2017 at 7:43 AM, Maguin, Eugene <[hidden email]> wrote:

I’m using save translate to export a text (csv) file and I’d like to control formats in the output file so I specified formats for the to-be output vars. So …, per the save translate documentation (p 1698, just above ‘Exceloptions subcommand’) I should get what I specified; however, I didn’t. I got 12 or 16 decimal places rather than my desired F7.5. Could there be a mismatch between command functioning and command documentation?

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Format control on Save translate command

Rick Oliver
This seems to work correctly...

data list list /v1 v2 v3.
begin data
1.234567 1.234567 1.234567
end data.
formats v1 (f7.3) v2 (f7.4) v3 (f7.5).
save translate /outfile='c:\temp\formats.csv'
  /type=csv /textoptions format=variable.


Virus-free. www.avg.com

On Wed, Oct 4, 2017 at 8:51 AM, Jon Peck <[hidden email]> wrote:
According to the doc, you should specify /TEXTOPTIONS FORMAT=VARIABLE to use the variable print formats.  You can check those with DISPLAY DICT.  Is that what you did?

On Wed, Oct 4, 2017 at 7:43 AM, Maguin, Eugene <[hidden email]> wrote:

I’m using save translate to export a text (csv) file and I’d like to control formats in the output file so I specified formats for the to-be output vars. So …, per the save translate documentation (p 1698, just above ‘Exceloptions subcommand’) I should get what I specified; however, I didn’t. I got 12 or 16 decimal places rather than my desired F7.5. Could there be a mismatch between command functioning and command documentation?

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Format control on Save translate command

Maguin, Eugene
In reply to this post by Jon Peck

No, I did not include Textoptions format=variable.

I did read the that section and I didn’t understand what was being said. The example given focused on the treatment of a dollar format and effect of the two options was clear. So, my misunderstanding. Thank you for correcting me.

Gene Maguin

 

 

From: Jon Peck [mailto:[hidden email]]
Sent: Wednesday, October 4, 2017 9:51 AM
To: Maguin, Eugene <[hidden email]>
Cc: SPSS List <[hidden email]>
Subject: Re: [SPSSX-L] Format control on Save translate command

 

According to the doc, you should specify /TEXTOPTIONS FORMAT=VARIABLE to use the variable print formats.  You can check those with DISPLAY DICT.  Is that what you did?

 

On Wed, Oct 4, 2017 at 7:43 AM, Maguin, Eugene <[hidden email]> wrote:

I’m using save translate to export a text (csv) file and I’d like to control formats in the output file so I specified formats for the to-be output vars. So …, per the save translate documentation (p 1698, just above ‘Exceloptions subcommand’) I should get what I specified; however, I didn’t. I got 12 or 16 decimal places rather than my desired F7.5. Could there be a mismatch between command functioning and command documentation?

Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD