Any help would be appreciated....I have the following code\syntax.....which runs, however the supposed excel files can't be read by excel....indicates wrong format or the file is corrupted. Looked at it using "Notepad" and it is gobbly-gook, although I
saw the word "workbook" in the mess of gobbly-gook. Thanks for any assistance...... SPSSINC PROCESS FILES INPUTDATA="C:\state_files\*.SAV" SYNTAX="C:/state_files//TransFiles2.sps" OUTPUTDATADIR="C:/temp/testONE/Completed/" VIEWERFILE= "C:/temp/testONE/OUTPUT.SPV" LOGFILE="C:/temp/testONE/log.txt" MACRONAME="!JOB" LOGFILEMODE=APPEND /MACRODEFS ITEMS. Here is the translate code\syntax....TransFiles2.sps GET FILE = "job_inputfile". SAVE TRANSLATE OUTFILE=!Out /TYPE=XLS /VERSION=12 /MAP /REPLACE /FIELDNAMES /CELLS=LABELS /KEEP=state fipscode. exe. define !out () !quote(!concat(!unquote(!eval(!job_outputdatadir)), "/", !unquote(!eval(!job_datafileroot)), ".xls")) !enddefine. ===================== 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 |
Excel files are binary, so they should look like "gobbly_gook" in a text editor. Two suggestions: try running one file manually to see what it produces. Is it possible that the output file names being produced are different from the ones you expected? Run SET MPRINT ON before this code so you can see better what is being generated. On Thu, Sep 14, 2017 at 10:31 AM, SUBSCRIBE SPSSX-JohnF <[hidden email]> wrote: Any help would be appreciated....I have the following code\syntax.....which runs, however the supposed excel files can't be read by excel....indicates wrong format or the file is corrupted. Looked at it using "Notepad" and it is gobbly-gook, although I |
In reply to this post by SUBSCRIBE SPSSX-JohnF
Thank you....problem solved the definition for macro !OUT was misplaced......
GET FILE = "job_inputfile". define !out () !quote(!concat(!unquote(!eval(!job_outputdatadir)), "/", !unquote(!eval(!job_datafileroot)), ".xlsx")) !enddefine. SAVE TRANSLATE OUTFILE=!Out /TYPE=XLS /VERSION=12 /MAP /REPLACE /FIELDNAMES /CELLS=LABELS /KEEP=state fipscode recnumbr date_of_discharge discharge_reason. exe. ===================== 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 |
Free forum by Nabble | Edit this page |