Below is my scenario, I am doing FTP from mainframe to Unix.
My input file will be having file names, for that I need to create FTP cards.
My outfile should be
PUT AAAA.BBBB.CCCC AAAA.BBBB.CCCC
PUT AAAA12.CCCCC.HHHH AAAA12.CCCCC.HHHH
PUT BBBB.UUUUU.FFFFF BBBB.UUUUU.FFFFF
While creating the FTP cards, I need to add Time stamp to the Directory names, I know the starting position of the files names in infile but I don know the length. Can anyone please help me to get this out. Is it possible in sort or Icetool?
PUT XXXXXXX.XXXX.YYYY.ZZZZ XXXXXXX.XXXX.YYYY.ZZZZ
The file name is getting truncated in all the 3 lines.
Here the problem is on line3 because the file name truncating in LINE3.In line3 the whole file name should be present . Because I am going to FTP that file from mainframe to unix. But I am not know the length of my input file names.
I will use the sort step output file is my input to FTP step.
You didn't say how long your names could be, but all of the names in your example had three nodes so I assumed the names could be at most 30 characters (based on 8.8.8 = 26 so I used 30).
is 23 characters so it works fine. When I run my job with that name, I get the following output:
PUT XXXXXXX.XXXX.YYYY.ZZZZA XXXXXXX.XXXX.YYYY.ZZZZA
If you're getting truncation, then you either changed my job or are doing something else you're not telling me about.
I am not know the length of my input file names.
You'd need to be able to tell me the maximum length of the names in order for me to give you a solution that would work for the longest name. Since you said the LRECL is 80, the name couldn't be larger than that, but an 80-byte name would certainly result in an output record greater than 80 bytes. So I assume the maximum name would actually be less than 80 bytes. What length would you want me to use, and if it resulted in an output record greater than 80 bytes, would that be a problem?
Frank again my requirement has been changed now. Can you please help me out.
Here also I am going to create FTP control Cards,
My Infile1 is - Lrecl = (252 + 4) = 256, Format = VB.
My infile2 is - 125 VB
Infile1 Contains below,
IPadd :- Start pos - (190 + 4), len - 20
User Name :- Start pos - (220 + 4), len - 8,
Pass /- Start pos - (240 + 4), len - 8,
Path :- Start pos - (130 + 4), len - 48,
Path maximum length is 48 but it may decrease. I am not know the exact position.
My infile2 contains:- Filenames :- Start pos - (3 + 4), len - 44,
I will be having more than n number of files and also length of the files will vary from file to file.
My output is 125 VB. it should contain
Username (3 ,8)
password ( 3,8)
PUT 'AAAA.YYYYY.ZZZZZ' 'AAAA.YYYYY.ZZZZZ'
IN MK and CD I need to add sdir.&time as suffix. &TIME is system defined time.
In PUT i will be having N number of files to ftp. But my infile and outfile name is same.
Last line i need to add 'QUIT'
Please show an example of the records in your input file covering all of the significant variations and what you expect for output. Where the length of a "field" or "fields" can vary, give the maximum length possible.