9 replies
Two solutions:
First, is the M/F file text only? If so, you should transfer it with the ASCII option which would remove/translate the null bytes for you.
The other option is to open the file in binary mode, read a block of bytes into an array and scan for the CR/LF.
Ralph
by wessir
by tduval
Don't read strings, Ie reading into memory until 0x0d/0x0a.
Read char by char, until EOF (End Of File).
So, you'll be able to manage any character read.
by wessir
OK, Sorry, I'll try again. What method are you using to transfer the file from the mainframe (M/F) to the PC? You have the choice of Binary or ASCII mode. In either an FTP or a 3270 client you should be able to specify parameters for the IND$ program to tell it to translate EBCDIC to ASCII including CR/LF (CarriageReturn/LineFeed).
Give us some more info and we'll be able to help you.
Ralph
by wessir
by rrv
As i have experience with ASCII and EBCDIC i have solution. First thing is to set your CCSID in both windows and MF environment to 37 (US). Then use either ADODB or FileSystemObject from VB to retieve your file from MF. Use Replace function in VB to replace all nulls [vbNull - Constant] to spaces. This logic works fine.
RV
by wessir
by wessir
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending