Greetings,
We script the upload of EDI files to our back office system however the back office system sometimes attempts to process a partially uploaded file. I am unable to use the OK file method so I am thinking either write the files to a temp dir on the remote server and then move them once uploaded to the remote processing directory or upload them with a .temp extension on them and remove the .temp extension on successful upload.
Which is the best method and would anyone be so kinds as to provide an example?
The current script I use also moves a local copy once uploaded for historic reference
Thanks in advance!
We script the upload of EDI files to our back office system however the back office system sometimes attempts to process a partially uploaded file. I am unable to use the OK file method so I am thinking either write the files to a temp dir on the remote server and then move them once uploaded to the remote processing directory or upload them with a .temp extension on them and remove the .temp extension on successful upload.
Which is the best method and would anyone be so kinds as to provide an example?
The current script I use also moves a local copy once uploaded for historic reference
Code: Select all
OPENHOST("server_name","user","passwd")
CHDIR ("\EDI_IN")
# Change working directory
LOCALCHDIR("C:\EDI_Outbound")
# Retrieve the file listing
$result=GETLIST($list,LOCAL_FILES,"*.*")
# If GETLIST failed stop the script
IF($result!="OK")
STOP
END IF
# For each file in $list...
FOREACH $item IN $list
# Upload the file
$result=PUTFILE($item)
# If the file has been succesfully uploaded
# delete the local copy of the file
IF($result=="OK")
EXEC('move "'.$item.'" "C:\EDI_Outbound\processed"')
END IF
END FOREACH
Thanks in advance!
so I am thinking either write the files to a temp dir on the remote server and then move them once uploaded to the remote processing directory or upload them with a .temp extension on them and remove the .temp extension on successful upload.Actually, this is what ScriptFTP actually does by defualt, but instead of using .temp it uses the .part.
liked Script FTP? Try our other product Email Parser
Is there a way to turn off this?
Here's how it's giving us fits.
How can I tell the software we are just not cool enough to use it's built in error correction?
thanks so much!
Here's how it's giving us fits.
Code: Select all
PUTFILE2("icd8000.0157","PEC.TF01.R0ECDOHC.ICLFILE(+1)")
Uploading.................   icd8000.0157 as PEC.TF01.R0ECDOHC.ICLFILE(+1)
DELE icd8000.0157.part
500 User Exit denies Userid 'OHCS0101' from using Command 'DELE'.
PASV
227 Entering Passive Mode (10,33,55,136,234,75)
Opening data connection to 10.33.55.136 Port: 59979
STOR PEC.TF01.R0ECDOHC.ICLFILE(+1).part
501 Invalid data set name "PEC.TF01.R0ECDOHC.ICLFILE(+1).part". Use MVS Dsname conventions.
***** PUTFILE2 Error #17501: Cannot upload local file icd8000.0157.
***** The server said: Invalid data set name "PEC.TF01.R0ECDOHC.ICLFILE(+1).part". Use MVS Dsname conventions.
CWD 'FTOHCS01.'
How can I tell the software we are just not cool enough to use it's built in error correction?
thanks so much!
And, for the second time today, I have solved my own problem I am my best tech support.
Using the SETUPLOADMODE(mode) with the (mode) set to (DIRECT) should do the trick, I think.
I won't be able to test till tomorrow's production day, but I think that solves that issue.
Using the SETUPLOADMODE(mode) with the (mode) set to (DIRECT) should do the trick, I think.
I won't be able to test till tomorrow's production day, but I think that solves that issue.
Yes, that solves your problem. Using SETUPLOADMODE(DIRECT) makes ScriptFTP to upload the files without the ".part" after the file name.
If you have any further questions feel free to ask by email (However I usually check the forum on a daily basis)
If you have any further questions feel free to ask by email (However I usually check the forum on a daily basis)
liked Script FTP? Try our other product Email Parser
- All times are UTC -