MikeS
Member
Hi - I wrote a UBE that allows me to get a file via FTP from a third party website. This is a daily process, where the file name that I need to get, changes every day so I have to change the script file for the FTP process everytime the UBE is run. I created the script file as a table in One World and populate it via my UBE based on the Processing Options.
I then use the "Call External Program" BSFN to execute a CL program on the AS400 that handles the FTP utilizing the script file. The problem however is, that the script file is worked not the way it is entered because it of course has a key and that sorts the file alphabetically when it is executed. The script file only has one field in it with ten records that contain the 10 commands necessary to do the FTP. I tried inserting a second field to key on it with a numeric counter. Now the script is worked in the correct order BUT it of course does not work since that second field also shows up and gets appended at the end of each line behind the valid commands when the script is processed and so the commands do not work.
I then thought I could insert a third field between the two which contains a "comment" character, so it would ignore the key field when running the script by commenting it out but all my google searches came out blank. It looks like there is NO comment character within FTP scripts that works.
The only option left to me I think, unless any of you have a better suggestion, is to break down and do the script file generation completely on the AS400 using RPGIII (oh no!!) and CL programs. My RPGIII is very rusty so I would have preferred the UBE method, but I guess I am out of luck.
Any help is appreciated...
Thanks and Happy Holidays to everybody on this great forum from Texas....
Mike
B7333 XE SP23_J1 AS400 V5R3
I then use the "Call External Program" BSFN to execute a CL program on the AS400 that handles the FTP utilizing the script file. The problem however is, that the script file is worked not the way it is entered because it of course has a key and that sorts the file alphabetically when it is executed. The script file only has one field in it with ten records that contain the 10 commands necessary to do the FTP. I tried inserting a second field to key on it with a numeric counter. Now the script is worked in the correct order BUT it of course does not work since that second field also shows up and gets appended at the end of each line behind the valid commands when the script is processed and so the commands do not work.
I then thought I could insert a third field between the two which contains a "comment" character, so it would ignore the key field when running the script by commenting it out but all my google searches came out blank. It looks like there is NO comment character within FTP scripts that works.
The only option left to me I think, unless any of you have a better suggestion, is to break down and do the script file generation completely on the AS400 using RPGIII (oh no!!) and CL programs. My RPGIII is very rusty so I would have preferred the UBE method, but I guess I am out of luck.
Any help is appreciated...
Thanks and Happy Holidays to everybody on this great forum from Texas....
Mike
B7333 XE SP23_J1 AS400 V5R3