trouble with savePICT

I was wondering if I can get your inputs on the following problem.

In a program, I need to output 2 layouts as .jpeg (E=-6)

    SavePICT/EF=1/P=home/E=-6/WIN=layout0 as patient_number+"_"+patient_ID+"_"+testDate+"_01"
    SavePICT/EF=1/P=home/E=-6/WIN=layout1 as patient_number+"_"+patient_ID+"_"+testDate+"_02"

However, the program always output two files (not sure what format they are) when I run the first time. Running gain will output the .jpeg file correctly.

Thanks,

Judy

 

snapshot

You need to include the file name extension with the file name parameter.

I would do it like this which is easier to read and debug:

String baseName = patient_number + "_" + patient_ID + "_" + testDate
String fileName1 = baseName + "_01.jpg"
SavePICT/EF=1/P=home/E=-6/WIN=layout0 as fileName1
String fileName2 = baseName + "_02.jpg"
SavePICT/EF=1/P=home/E=-6/WIN=layout1 as fileName2