This, then, is modified slightly from Kolusu's second solution to your previous problem.
It is "two step" solution but the first step is insignificant, just generating a SYMBOL for the SYMNAMES DD statement. The SYMBOL created has the value of your filename from the input file (first record only will be read) and the trailing "+". The filename can be up to 30 characters.
The second step reads the "model" ftp control cards, when it identifies "GET " it adds, starting from position five, the SYMBOL value which was generated.
If you want it with the "splice" solution that you prefer, you'll probably end up attempting it yourself.
I feel responsible for mentioning the SPLICE. I couldn't find the IRONY tags. TS/OP had previously favoured SPLICE over simpler solutions, so I was having a pop at the idea again. Sorry for causing confusion.
I am learning DFSORT and find it interesting & fun. I have been trying to use it particularly to avoid writing unneccessay COBOL programs (used a couple of times and successful). I must say that this product is awesome and now I know that you have invented it .
I feel good that there is/was some one to correct and guide me. I am sure we all will miss you Frank. Thanks and wish you the very best for your future.
Very off topic, but last night I was telling my daughter the story of the man who introduced me to the advanced functions of DFSORT.
You ask, "Why would a 17-year-old girl be interested in that kind of thing?" Funny story. We were talking about people going insane or "losing it" at work.
This guy had gone to the main floor of our office building to get some caffeine, not sure if coffee or cola. While waiting for the VERY old elevator, a lady came up and pushed the UP button again. (These were so old they didn't light up when pressed)
My poor co-worker started berating the woman for pressing the button again and making it so the old system reset the wait time on the car and now it would be even LONGER to get a car and now he was going to be late........
Then, after the woman kind of tried to play it off, he poured his drink over her head. Right there in the lobby. Then he took off running up the stairs. However, this was no shrinking violet of a lady and she went after him. She finally found him on the sixth floor and first building security, then the police, had to come and end the situation.
So...any time I'm going through the DFSORT manual, or trying to get a tricky process to work, I think of that guy, and wonder if THIS was the thing he was trying to do when he finally cracked.