04-12-2012 12:45 PM
We have ftp a file that contains paked decimal from Mainframe(MVS- no SAS) to unix using 'EXEC PGM=FTP'. Is there any way to convert the packed decimal to numeric or char in Unix ?
04-12-2012 02:26 PM
It's probably relatively easy.
Can you provide a few examples of what the data look like after being transferred (hex codes, please), and what values they should become?
04-12-2012 03:00 PM
We did try to ftp in binary format and then use the SAS PD to read in the data. However, the pack decimal vaules all become missing.values.
We finally able to convert the pd to flat file with COBALT and then FTP and it works
Tom,Astounding, really thanks for your help
04-12-2012 03:37 PM
For future reference, PD OFF-mvs is not the same as PD ON-mvs
To read data in binary mvs PD format use the informat S370FPD.
There are several of these S370Fxxx formats designed to help with the task of reading ebcdic data (as well as $ebcdic itself)
not S3270FPD ( 3270 is an IBM terminal data ) Message was edited by: Peter Crawford
04-13-2012 07:43 AM
Thanks Peter, I am sorry I get confused with 'PD OFF-mvs is not the same as PD ON-mvs' ? Do you mean I can read in the MVS PD data in unix using informat S370FPD if the file was FTP in binary ?
04-13-2012 09:20 AM
That is what he meant. There are a number of useful formats/informats that should allow you to both read and write data that can be moved to/from IBM mainframe. For example I was just using the S370FIB to write binary integers with the byte order in the direction I wanted.