1827802 Members
2297 Online
109969 Solutions
New Discussion

Re: FTP problem

 
Patrick Wallek
Honored Contributor

FTP problem

I am attempting to write a script to get EDI acknowledgements off our banks ftp machine. With the software they are using and the frequency of our EDI submissions, there is the possibility that there could be 2 "batches" available for retrieval at the same time. Unfortunately their software gives each "batch" the same file name and can differentiate between the two files.

My contact at the bank has given me the following command to use to retrieve one "batch" at one time:

get "$$ ID=UPREDIOO BID='PGP EDI OUTBND NCFSJ2S' ONEBATCH=Y" filename

I have tried escaping the $$, to no avail. I have tried both "\$$" and "\$\$" and have not had any luck. The error I get is:

200 PORT command successful.
550 $$ command missing or syntax error -> <{$$} ID=ID BID='PGP EDI OUTBND NCFSJ2S' ONEBATCH=Y>

I am fairly certain that the error is coming from the bank.

Any ideas?
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: FTP problem

Hi Patrick:

Does the command behave any differently interactively?

Error 550 is "requested action not taken; file unavailable, not found, no access".

...?....

...JRF...
Patrick Wallek
Honored Contributor

Re: FTP problem

OK. I have figured it out. I had to define a macro in my .netrc that has the get command in it, with the \$\$ to escape the $ signs. When I log on to the ftp site and execute the macro it works like a charm.

Apparently, for some reason, it does not like trying to use the $ signs or escape the $ signs outside of a macro.

I don't understand why it makes a difference, but it is working now and I am happy!
John Townley_2
New Member

Re: FTP problem

Patrick,

Could you provide me with some more information on how you resolved this problem (I know it's been a long time)???

I am having the exact same problem with some bank batches, and would like to know more about how you solved this....

Thanks for your help,

John Townley
Computer Sciences Corporation
Patrick Wallek
Honored Contributor

Re: FTP problem

John,

Hmmm....This has been a while. I have switched jobs since this post as well.

But if I recall correctly, I had use a .netrc file in the users home directory that was running this and make the above referenced "get" action a macro in the .netrc. I then connected to the FTP site and ran the macro.

Since this was for a previous job, I don't have access to the macro anymore.