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:55:25
 
 
To
03/11/2006 16:01:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01167038
Message ID:
01167050
Views:
7
Do your lines end with a < CR > or a < CR > and < LF >? My bet is that you're ending your lines with just < CR > and need to add the < LF > (CHR(13) and CHR(10))


>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
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform