BookmarkSubscribeRSS Feed
mkhan2010
Calcite | Level 5
Hi,

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;
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
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.

cynthia
Ksharp
Super User
Hi.
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.

Ksharp
Robert_Bardos
Fluorite | Level 6
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
[pre]
ods html file='your_file_name' encoding='OPEN_ED-1047' ;
[/pre]

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1365 views
  • 0 likes
  • 4 in conversation