View previous topic :: View next topic
|
Author |
Message |
janmejay Warnings : 1 New User
Joined: 22 Jun 2007 Posts: 85 Location: bangalore
|
|
|
|
Hello
I need to create a sort card where in my input files are having data like below.
sftp> ls -1
file1.zip
file2.zip
sftp> QUIT
I want the output file to contain as many as GET command as the number of zip files are present input file. Provided output file should look like as below-
Get file1.zip /path1
Get file2.zip /path2
Now if the input file contain 3 files the number of GET command sould be 3. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Use INCLUDE with SS to do a substring search for .zip.
The you can use a literal for the Get, and whatever magic you need for the /path.
I doubt that ftp will mind about any trailing blanks, but if you want it to look neater you can give it a bit of a SQZ afterwards. |
|
Back to top |
|
|
janmejay Warnings : 1 New User
Joined: 22 Jun 2007 Posts: 85 Location: bangalore
|
|
|
|
For the path actually i would like to see them as below over unix mainframe.
Get file1.zip /path/file1.zip
Get file2.zip /path/file2.zip |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If the output path is constant, just insert it as a literal when writing your output. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You'll need to know the maximum lengths of the fielname and pathname. You will then have to SQZ to make a valid filename including the path. |
|
Back to top |
|
|
janmejay Warnings : 1 New User
Joined: 22 Jun 2007 Posts: 85 Location: bangalore
|
|
|
|
Thanks Dick, thanks Bill .
Let me check, I will get back agaun. |
|
Back to top |
|
|
janmejay Warnings : 1 New User
Joined: 22 Jun 2007 Posts: 85 Location: bangalore
|
|
|
|
Hey Dick , hey Bill,
SQZ worked well for me. thanks |
|
Back to top |
|
|
|