Converting Windows (DOS) script & FTP to WinSCP
Objective:
Want to move script (See figure 1) to WinSCP so we can trap for errors when connection to mainframe fails
Environment: Windows 2003 Server, WinSCP 4.3.5
Context:
AS2 EDI application, receiving data from trading partner and FTP's to mainframe for processing. Presence of received files in AS2 triggers a Windows (DOS) script to run that;
– Consolidates multiple inbound files, date & time stamps the file
– Builds a "job card" containing (among other things)the name of the date/time stamped data file
-– Build the FTP script to contain the date/time stamped files name
The current process has a
Question:
How to handle the
Figure 1: Existing FTP Script **
Want to move script (See figure 1) to WinSCP so we can trap for errors when connection to mainframe fails
Environment: Windows 2003 Server, WinSCP 4.3.5
Context:
AS2 EDI application, receiving data from trading partner and FTP's to mainframe for processing. Presence of received files in AS2 triggers a Windows (DOS) script to run that;
– Consolidates multiple inbound files, date & time stamps the file
– Builds a "job card" containing (among other things)the name of the date/time stamped data file
-– Build the FTP script to contain the date/time stamped files name
The current process has a
QUOTE SITE
command in the FTP script that sets up how the file is handled on the mainframe. The date/time stamped file is then uploaded via FTP. Another QUOTE SITE
command sets up for the following "job card" file to be handled differently prior to it being FTP uploaded to the mainframe.
Question:
How to handle the
QUOTE SITE
commands in WinSCP script?
Figure 1: Existing FTP Script **
X
is replaced by DOS script with current system time and date
open mainframe username userpwd quote site lrecl=2000 recfm=fb pri=50 sec=50 cylinder put PDBKS.PRODEDI.DXXXXXX.TXXXXXX 'PDBKS.PRODEDI.DXXXXXX.TXXXXXX' quote site filetype=jes lrecl=80 put edijcl.txt quit