Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Identification Division.
Program-ID. FTP-COB.
Author. James C. Fairfield
Date-Written. 03/30/07
*>
*> A COBOL program to generate a batch file to initiate
*> an FTP process with a date-specific file name.
*>
Select BATCH-FILE Assign to 'FTP2.BAT'.
01 BATCH-LINE.
05 Pic X(13) Value 'CALL FTP.BAT '.
05 BATCH-DATE Pic 9(08).
100-BUILD-TEXT-FILE-1.
200-BUILD-TEXT-FILE-2.
300-BUILD-BATCH-FILE.
Move PROCESS-DATE to BATCH-DATE
Open Output BATCH-FILE
Write BATCH-RECORD from BATCH-LINE
Close BATCH-FILE
.
@Echo OFF
Cd ftp-folder
Del *.txt
Del *.zip
Cd ..
Del FTP2.BAT
FTP-COB
If errorlevel 2 Goto end
If not exist FTP2.BAT Goto end
If not exist ftp-folder\FILE1.TXT Goto end
If not exist ftp-folder\FILE2.TXT Goto end
Call FTP2.BAT
:end
Rem
Cd ftp-folder
If %1.==. Goto end
If not exist WORK.FTP Goto end
If not exist FILE1.TXT Goto end
If not exist FILE2.TXT Goto end
Pkzip %1 FILE1.TXT FILE2.TXT
If not exist %1.ZIP Goto end
Ftp -s:WORK.FTP
:end
Cd ..
OPEN site-name port-number
user-id
password
CD INBOX
BINARY
PUT *.ZIP
CLOSE
bye