Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mainframe File Transfer Control

Status
Not open for further replies.

kimr

Programmer
Jun 12, 2001
16
US
I am trying to ftp a pc data file to a mainframe dataset using the OBJECTX File Transfer Control (WDFTXCTL.OCX). Has anyone ever used this? I cannot find any help or examples anywhere. I don't know if there is anything that needs to be installed on my pc to use the control.

I am using the code bHmsvFTP = frmFTP.HmsvFTP.Transfer to actually execute the transfer. I get the following error:
Compile Error: Argument Not Optional. When I run the help on this error, it tells me that there is a parameter (that I omitted) that is not optional in a user-defined procedure. This is not a user defined procedure though.

Any advice?
 
Hi,

I'm using an script and run it from the command line.
This is perhaps not the best way, but it's working fine. I call the batch file from VB and than search in the log file to the 226 Transfer successfully.

This is the content of the batch script



@REM *********************************************************
@REM * This script is written to send a file to an remote *
@REM * host with the specifications expressed in the *
@REM * command line of the script *
@REM * *
@REM * Usage : MSO_FTP 1 2 3 4 5 *
@REM * *
@REM * 1 Host name of ip-address of the host *
@REM * 2 Username used to logon on the ftp session *
@REM * 3 Password used to logon on the ftp session *
@REM * 4 Datafile to send/receive *
@REM * 5 Logfile name + path *
@REM * 6 Checkfile name + path *
@REM * *
@REM *********************************************************
@REM * Author : Marc Seys, aOP *
@REM * Date : 08/03/2001 *
@REM *********************************************************
@REM * Please change only the 'SET' AND NOT THE SCRIPT *
@REM *********************************************************
@REM ******************** SET SECTION ************************
@set ftp_script_file=C:\MSP_LAB\BIN\SEND.TXT
@set ftp_log_file= %5
@set ftp_global_log_file =C:\MSO_SCAN\LOGBOOK\FTP_LOG.TXT
@set ftp_data_file= %4
@set ftp_check_file=%6
@set ftp_username=%2
@set ftp_password=%3
@set ftp_host=%1
@REM ********************* SCRIPT SECTION ********************
@REM **** Prepare : Deleting old files ****
@if exist %ftp_script_file% del /q %ftp_script_file%
@REM **** Make sure that the data file exists ***
@if exist %ftp_data_file% goto step1
@exit1
@:step1
@REM *** Creation of script file ***
@ECHO open %ftp_host% >%ftp_script_file%
@ECHO user %ftp_username% %ftp_password% >>%ftp_script_file%
@ECHO bell >>%ftp_script_file%
@ECHO cd pizaop01/WILLETT/BE1001 >>%ftp_script_file%
@ECHO put %ftp_data_file%>>%ftp_script_file%
@ECHO quit >>%ftp_script_file%

@REM *** EXECUTION SCRIPT FILE ***
@:step2
echo step2
ftp -n -i -s:%ftp_script_file% >%ftp_log_file%
date /t >%ftp_check_file%
time /t >>%ftp_check_file%
@findstr "226" %ftp_log_file% >>%ftp_check_file%
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top