hello,
want to follow up on this, and perhaps raise a different issue. the "dozens of sps files" i referred to in the original message were dozens of calls to the same macro. the macro receives many parameters, but one of them is the file name where to find the data (see "file" argument in macros below).
i was initially trying to call the macro iteratively, but was getting messages related to invalid characters in a command. specifically the "\" that is part of the directory where the file is located. so instead i opted for writing individual syntax files and tried to send them through the production facility.
however, i came back to trying to call the macro iteratively within another macro, and came across the following. below, !mac1 is the macro i want to call iteratively. and it works. when i call it within !mac2, where !file is "hard coded" within the macro, i get warnings about the "\", but !mac2 the macro actually does what i expect it to do. when i call it within !mac3 where i send !file as a parameter it also works and i get no warnings. i include below the code to replicate the behavior.
define !mac1 (var = !charend('/') /
file = !charend('/') ).
echo !quote(!concat(!var," in file ",!file)).
!enddefine.
!mac1 var = v / file = c:\temp\dir.
echo "* *".
echo "Now process MAC2".
* this one gives me a warning, but ends up working...
define !mac2 (vars = !charend('/')).
!do !v !in(!vars)
!mac1 var = !v / file = c:\temp\dir.
!doend
!enddefine.
!mac2 vars = a b c.
echo "* *".
echo "Now process MAC3".
* this one works no problem.
define !mac3(vars = !charend('/') /
file = !charend('/') ).
!do !v !in(!vars)
!mac1 var = !v / file = !file.
!doend
!enddefine.
!mac3 vars = x y z / file = c:\temp\dir.
------------------------------
Eugenio Gonzalez
------------------------------
Original Message:
Sent: Fri January 15, 2021 09:36 AM
From: Eugenio Gonzalez
Subject: processing many files with the production facility
Thank you Rick. I am not familiar with bash scripts, and could not find much info on SPSSINC PROCESS FILES. Instead I went over to SAS and created one very long syntax that included the 77 versions and used that instead.
Thanks for your helps anyway.
This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
Thank you for your compliance.
Original Message:
Sent: 1/15/2021 12:25:00 AM
From: Rick Marcantonio
Subject: RE: processing many files with the production facility
Attached please find a ZIP containing a bash script I wrote (this evening) that does what I think you want. It also has a template SPJ file that you will need.
It should be easy to configure. Just set the arguments at the top of the script to the paths you want to read syntax files from and the path where you want the results. The output can be SPV or TXT. Also, point the template argument to the attached SPJ file.
Any questions, let me know.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
Original Message:
Sent: Thu January 14, 2021 07:23 PM
From: Eugenio Gonzalez
Subject: processing many files with the production facility
Hello,
I need to run dozens SPS files, preferably in batch mode. I see there is the production facility, but from what I can tell, I need to add these files one by one. Any other suggestions? I tried figuring how to run from the command prompt, but all roads lead back to the production facility...
Thanks!
This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
Thank you for your compliance.
#SPSSStatistics