The SAS Output Delivery System and reporting techniques

ODS LISTING - output file in ASCII format

Occasional Contributor
Posts: 6

ODS LISTING - output file in ASCII format


I am using SAS on mainframe (z/OS) and I am creating a excel file using xml. All is going well however since the file being created is in EBCDIC format (format used on mainframes), when I download the file on to my Windows desktop (not FTP, download via website), the file is all messed up (contains only symbols) because of the difference in file format. Ofcourse it works fine when I use FTP to download as FTP takes care of the conversion.

My question is:
. I am using SAS 8.2 (we are due to get upgraded to SAS 9 soon but for now, I have to work in SAS 8.2) and because of the client's requirement for the Excel report, I had to manually code the excel report in xml because there is no other way to create a excel report in SAS 8.2 containing multiple worksheets and column filters.

. Throughout the program, I am only using ODS listing - no other ODS. How can I possibly create the output file in ASCII format?

For example, if I was using ODS html, I could have said something like:
ODS listing close;
ODS html body='/htmlFiles/temp.html' TRANTAB=ASCII;

However, in this case, as I mentioned, I am not using any other ODS option other than the default ODS listing. Can I have something similar for ODS listing? Such as:

ODS listing body='/excelReport/theReport.xls' TRANTAB=ASCII;
Posts: 9,371

Re: ODS LISTING - output file in ASCII format

Posted in reply to mkhan2010
I don't think ODS LISTING supports the TRANTAB option, but there are other NLS options that may apply. You might want to work with Tech Support on this question, as they actually have mainframe computers on which to test code.

Super User
Posts: 10,784

Re: ODS LISTING - output file in ASCII format

Posted in reply to mkhan2010
What does your code look like?
I remember there is an dataset option ' encoding=' which can help you.
Or Find some system options like it.

Frequent Contributor
Posts: 106

Re: ODS LISTING - output file in ASCII format

Ksharp is right. Have been doing this for the last seven years or so. ENCODING works just fine.

If memory serves me right that has to be something like
ods html file='your_file_name' encoding='OPEN_ED-1047' ;
Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation