I have a mainframe file as in the example below:
I want to read it in DI Studio in UNIX but I am not getting the correct result. I am using the code as below. Can anyone help on this.
Can you be a bit more specific with the SAS processing behavior/result, than "...but I am not getting the correct result."?? What is SAS generating? And it would be best communicated if you were to capture the SAS-generated log and paste it directly into a post/reply, ideally with a PUTLOG _ALL_ in your code for diagnostic purposes (both your own and for the forum visitors).
There is also the question as to how you transferred your mainframe file to Unix. You should only use EBCDIC informats if the file was transferred in BINARY mode so that the file is still EBCDIC-encoded. If the file was transferred as TEXT then the translation to ASCII would have happened automatically so that you don't require the EBCIDC informats. If your input file just looks like standard text in a Unix text editor its already in ASCII.