Example of using !SPECIAL,SAVE_TEXT_LINE_TO_DATA questions
The attached spec SPC9.QPX has 2 examples using an SPECIAL,SAVE_TEXT_LINE_TO_DATA question to greatly reduce the code that might be needed to otherwise do this.
1) Suppose you have two string fields like first name and last name and want to create a third sting which is the combination of the two, but with the spaces in the middle removed. You can use back references, and the special,save_text_line_to_data to combine them.
2) Suppose you have a large list of numbers that need to be recoded to another set of numbers. You can use a field,use_previous_answer, back references, and an special,save_text_line_to_data to do this. The real advantage of this over a series of Gen statements is that is will not compile much much faster, but it will also execute substantially faster during the interview as well.
>PurgeSame~Prep Compile[SPC9]'Example 1 - Combing two fields { WhichOne:Which example of the special,save_text_line_to_data do you want to see this time? !FIELD(Skipto FName) 1 Combing two strings into one(Skipto Val1) 2 Recoding a set of numbers into a different set of numbers } { Fname: Enter in your First Name Here !Variable,,20,2 } { Lname:Enter in your Last Name Here!Variable,,20,2 }''special,save_text_line_to_data Stores the text on the first line in both the data and the answer array. You can use this feature to back ''reference both of the original questions and have the back references strip out the trailing blanks in the first name so that the ''combined data only has 1 space (the explicit one put between the two back references below). Be sure to leave enough data space to store the entire string you are trying to get.{ FullName: .30:Fname :Lname!Special,save_text_line_to_data } { ShowDat1:First Name: