Thread: FTP Issue

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    FTP Issue


    I am FTPing 6 Miliion + records from Mainframe to server. When I recieve the file on the server trying to open with a text editor. I am seeing only 700,000 records. When I open the file in the EM Editor I see a message pop "Null Characters 00H in the file. When I hit continue I am able to see all the 6 Million+. I did a save as new file name I am seeing all the 6 Million written. How does FTP handle Data that contains invalid (non-display) characters.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    spaceBAR Central
    Posts
    225
    Rep Power
    41
    I don't know your from/to server types(i.e. unix, windows, etc) but try ftping the file in "binary" mode.

    Code:
    FTP, ASCII Mode
    FTP, by default, will run in ASCII mode and when transferring files between a Mainframe system and a Windows, UNIX or Linux System it will attempt to convert the record content between EBCDIC encoding and ASCII encoding. Running in ASCII mode will also convert the file format from record sequential to line sequential. This will create a problem if the record content contains binary data.
    
    FTP, BINARY Mode
    FTP has the capability of transferring files in a BINARY mode without changing the content of the records.
    This mode is especially useful if the records in a file contain binary data (i.e. numeric fields that use the packed, binary or signed-zoned-decimal format).
    For sequential files that contain EBCDIC-encoded text strings and binary text strings and reside on the mainframe the BINARY mode will transfer the file to a Windows or UNIX platform as a record sequential file. The EBCDIC-encoded text strings and the binary text strings are not converted. In a Micro Focus environment it is possible to run in EBCDIC mode.
    However, if information is to be imported into a non-Micro Focus environment such as an Excel spreadsheet the text strings will need to be converted from EBCDIC to ASCII and the binary strings (typically packed or binary numbers) will need to be expanded (i.e. converted) to printable text. If the numeric value is a signed number the sign will need to be placed in a separate byte at the beginning or end of the number. If the numeric value has decimal positions then an explicit decimal point may need to be inserted.
    For non-sequential files this approach usually requires a file format conversion to be done on the Mainframe system prior to the file transfer. For example, a VSAM, Key-Sequenced-Data-Set (KSDS) is usually converted to a flat, sequential file of fixed-length records (using the REPRO function of IDCAMS). The sequential file is then transferred to the Windows system. Once transferred the sequential file is then used to create a Micro Focus Indexed file.

IMN logo majestic logo threadwatch logo seochat tools logo