Hello All,
I am trying to use the Production Facility to split a large file into sub-files based on a user specified code. All is working well with the Production Facility selecting the appropriate cases and saving the file. However, I need the name of the saved file to identify the appropriate sub-file. This is the save line currently in my syntax SAVE OUTFILE='C:\DATA\Sample\[hidden email]' /COMPRESSED. I need the macro symbol to work in the save line. Currently, it generates an SPSS file named 'File_2007@syscode' I want it to generate a file that is named 'File_2007_999'. (The 999 is a 3 digit code). Any ideas would be greatly appreciated. Thanks! Amanda Ferster Assessment Specialist, Research & Development Testing Division Georgia Department of Education Office: 404-463-0164 [hidden email] |
Are you running your production job from the command line or from within the production mode application?
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of <Amanda Ferster> Sent: Tuesday, March 27, 2007 10:42 AM To: [hidden email] Subject: Utilizing a macro symbol within a file save Hello All, I am trying to use the Production Facility to split a large file into sub-files based on a user specified code. All is working well with the Production Facility selecting the appropriate cases and saving the file. However, I need the name of the saved file to identify the appropriate sub-file. This is the save line currently in my syntax SAVE OUTFILE='C:\DATA\Sample\[hidden email]' /COMPRESSED. I need the macro symbol to work in the save line. Currently, it generates an SPSS file named 'File_2007@syscode' I want it to generate a file that is named 'File_2007_999'. (The 999 is a 3 digit code). Any ideas would be greatly appreciated. Thanks! Amanda Ferster Assessment Specialist, Research & Development Testing Division Georgia Department of Education Office: 404-463-0164 [hidden email] |
Hi,
Does the code below do what you want? set mprint = yes. define mymacro (). !do !syscode = 1 !to 100. temporary. select if criterion = !cnt. save outfile = !quote(!concat('C:\DATA\Sample\File_2007_',!syscode,'.sav')) / compressed. !doend. !enddefine. mymacro. Cheers!! Albert-Jan --- "Beadle, ViAnn" <[hidden email]> wrote: > Are you running your production job from the command > line or from within the production mode application? > > -----Original Message----- > From: SPSSX(r) Discussion > [mailto:[hidden email]] On Behalf Of > <Amanda Ferster> > Sent: Tuesday, March 27, 2007 10:42 AM > To: [hidden email] > Subject: Utilizing a macro symbol within a file save > > Hello All, > > I am trying to use the Production Facility to split > a large file into > sub-files based on a user specified code. > All is working well with the Production Facility > selecting the appropriate > cases and saving the file. > > However, I need the name of the saved file to > identify the appropriate > sub-file. > > This is the save line currently in my syntax > > SAVE OUTFILE='C:\DATA\Sample\[hidden email]' > /COMPRESSED. > > I need the macro symbol to work in the save line. > > Currently, it generates an SPSS file named > 'File_2007@syscode' > I want it to generate a file that is named > 'File_2007_999'. (The 999 is a > 3 digit code). > > > Any ideas would be greatly appreciated. > Thanks! > > Amanda Ferster > Assessment Specialist, Research & Development > Testing Division > Georgia Department of Education > Office: 404-463-0164 > [hidden email] > Cheers! Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Did you know that 87.166253% of all statistics claim a precision of results that is not justified by the method employed? [HELMUT RICHTER] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ____________________________________________________________________________________ Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html |
In reply to this post by <Amanda Ferster>
I've used the free SPSS-Python interface to do exactly that, using the
spss.submit() command. Dan Williams Forecasting, Research and Analysis Office Department of Human Services State of Oregon, USA 503 947 5354 >>> "<Amanda Ferster>" <[hidden email]> 3/27/2007 8:41 AM >>> Hello All, I am trying to use the Production Facility to split a large file into sub-files based on a user specified code. All is working well with the Production Facility selecting the appropriate cases and saving the file. However, I need the name of the saved file to identify the appropriate sub-file. This is the save line currently in my syntax SAVE OUTFILE='C:\DATA\Sample\[hidden email]' /COMPRESSED. I need the macro symbol to work in the save line. Currently, it generates an SPSS file named 'File_2007@syscode' I want it to generate a file that is named 'File_2007_999'. (The 999 is a 3 digit code). Any ideas would be greatly appreciated. Thanks! Amanda Ferster Assessment Specialist, Research & Development Testing Division Georgia Department of Education Office: 404-463-0164 [hidden email] |
Free forum by Nabble | Edit this page |