Hi,
I heard the saying that
- source data from mainframe dataset should be ftped using the binary mode, whereas
- COBOL copybook files should be ftped using th text mode
I'm wondering if the above absolutely necessary? what'd happen otherwise. what's the general guild-line choosing the ftp mode.
thanks
ftp mode
Moderators: chulett, rschirm, roy
Mainframe files typically contain non-character data (integers, packed decimal primarily) which would likely be corrupted if the ASCII (text) transfer type is used with FTP. The ASCII/text transfer mode will also convert EBCDIC characters to ASCII (this is the source of the corruption of non-character data).
COBOL copybooks are text files which are included during the compilation of a COBOL program (similar to #include in C/C++). Usually they can be safely transfered using ASCII/text mode.
Rule of thumb on almost all platforms: If you are absolutely certain that there is NO non-character data in a file, you are USUALLY safe using the ASCII/text transfer mode. Otherwise, use the binary transfer mode to avoid possible data corruption.
Regards,
COBOL copybooks are text files which are included during the compilation of a COBOL program (similar to #include in C/C++). Usually they can be safely transfered using ASCII/text mode.
Rule of thumb on almost all platforms: If you are absolutely certain that there is NO non-character data in a file, you are USUALLY safe using the ASCII/text transfer mode. Otherwise, use the binary transfer mode to avoid possible data corruption.
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.
Last question first: a copybook is just the COBOL version of a schema. It's programming code, specifically names of fields and their attributes. The character set is not relevant at that level.
James provided a good answer, and this is my two cents about an additional point specific to DataStage.
Mainframe files should be read -- unless your shop has unusual things going on -- as binary data directly into the table definition created from importing the COBOL copybook. Further, the record type should be set to implicit. In fact, if you clear the settings on the Format tab, right click on Record level and select down on "Format as" to "Mainframe (COBOL)", you will have the default format settings you need. Your FTP stage handles the rest.
I strongly recommend learning by doing. Create a simple job to read a mainframe file using FTP Enterprise. Import your copybook as "COBOL file definitions" and let DS be your guide.
Good luck.
James provided a good answer, and this is my two cents about an additional point specific to DataStage.
Mainframe files should be read -- unless your shop has unusual things going on -- as binary data directly into the table definition created from importing the COBOL copybook. Further, the record type should be set to implicit. In fact, if you clear the settings on the Format tab, right click on Record level and select down on "Format as" to "Mainframe (COBOL)", you will have the default format settings you need. Your FTP stage handles the rest.
I strongly recommend learning by doing. Create a simple job to read a mainframe file using FTP Enterprise. Import your copybook as "COBOL file definitions" and let DS be your guide.
Good luck.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872