I have a requirement, wherein I need to create a tool, which will transfer a mainframe file to PC. The MF file may have packed decimal fields in it. If any such field is present, then I need to convert it to decimal before transmitting it to PC. Now my questions are,
1) Is there any way to separate out packed decimal fields in a file, with out knowing their position & length?
2) What can be the possible approach for creating this tool?
3) I am planning to convert all the PD fields to decimal first and then I am planning to use FTP for transmission of the file to PC. Is there any other way of doing it?
Joined: 06 Jun 2008 Posts: 8199 Location: East Dubuque, Illinois, USA
1. No. It cannot be done. For example, you have hex value '97994D'. This could be -97994 as a packed decimal value, or it could be 'pr(' in lower case EBCDIC characters -- part of a Unix command, for example. Which is it? You can pick either, or both, depending ....
2. Forget the tool as #1 indicates you have to know the position and length of packed decimal fields first.
3. "FTP for transmission of the file to PC" -- how? If the mainframe initiates the FTP session, the PC will be the server. Unless you're specifically planning on using a server, transmission to most desktops will fail as they are not set up to be FTP servers.