Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append a PC file to an MVS data set (via FTP)
Message
From
03/11/2006 16:01:21
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Append a PC file to an MVS data set (via FTP)
Miscellaneous
Thread ID:
01167038
Message ID:
01167038
Views:
59
I need to append a PC file to an MVS data set using FTP. I am using the FTP class I found on the Universal thread. I use the commands (leaving out my error checking)
loFTP = CREATEOBJECT('ftp_service')

lcAppendCmd = 'APPE ' + lcCrFile   && where lcCrfile is the MVS data set name in
                                       && quotes.
lnFTPMode tells command if it to append file in ascii or binary mode
lnFileOpen is the file handle gotten from th

=loFTP.FTPCommand(lcAppendCmd , lnFTPMode  , 0 , @lnFileOpen)

lcLine is the line being appended and lnlenline is its lenght
lnWrite = 0

=InternetWriteFile(lnfileOpen, @lcLine, lnLenLine, @lnWrite) 
My problem is that if the existing MVS data set is
line 1
line 2
and I append the lines "line 3" and "line 4" I get
line 1
line 2
line 3 line 4
instead of
line 1
line 2
line 3
line 4
I have looked at the code and here and cannot see what I am doing wrong.

Any suggestions would be appreciated.

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform