Date: Fri, 5 Oct 2001 15:03:16 -0400
Reply-To: Cybie Frontier <cybie@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Cybie Frontier <cybie@HOTMAIL.COM>
Subject: Re: FROM MVS SAS TO HTML OUTPUT - HOW?
Content-Type: text/plain; format=flowed
Hi Paul:
Thank you very much for providing such a detailed description of the
process.
This is what I ran and all I am getting is a blank page when I download
CYBIE.TEST.HTML.FILE as CYBIE.HTML and open it in my browser.
I looked at the file and ithas the HTML code to generate a blank page, I
assume.
My objective is to get an HTML file of the Proc Print output. I checked
the output using IOF and it is printing stuff. Should I do a Proc Printto
to the file "HTML"?
Please advise. Once again thanks a ton for all the help.
Kind Regards,
- Cybie
//EXEC SAS
//SYSIN DD *
FILENAME HTML 'CYBIE.TEST.HTML.FILE' DISP=(MOD,DELETE,DELETE);
FILENAME HTML CLEAR;
FILENAME HTML 'CYBIE.TEST.HTML.FILE' DISP=(NEW,CATLG,DELETE)
RECFM=VB LRECL=20004 BLKSIZE=27998 UNIT=3390
SPACE=(CYL,(50,1000));
DATA TEST;
INFILE IN1 MISSOVER;
INPUT
@1 ACCTNO $16.
@17 EXTSTAT 1.
@18 PMT 9.2.
;
ODS HTML FILE=HTML RS=NONE STYLE=MINIMAL;
PROC PRINT;
ODS HTML CLOSE;
----Original Message Follows----
From: "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM>
Reply-To: "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: FROM MVS SAS TO HTML OUTPUT - HOW?
Date: Fri, 5 Oct 2001 11:16:34 -0400
>From: Cybie Frontier <cybie@HOTMAIL.COM>
>I am looking for readymade code with JCL (if the existing JCL needs any
>modification at all) that would produce HTML output from SAS PROCs (say
>Proc Print, Proc Means etc.) on MVS. I will download those files and put
them on
>the web. Using SAS 8 on MVS.
>I just learned how to do it using PC sas, but I have no idea how to do it
>on MVS.
Cybie,
It is simple, but the DCB specification of the file where you direct the
HTML output may not be arbitrary. A record should be long enough to
accommodate a long HTML script line. For example, the following does work:
Record format . . . : VB
Record length . . . : 20004
Block size . . . . : 27998
You can write HTML either to a pure sequential file (DSORG=PS) or a library
member (DSORG=PO). The file can be preallocated (give it enough extents!)
and then referred to with DISP=OLD, or deleted and reallocated/catalogued
each time you write it. In this case, if you do it with JCL, you will need
to run the IBM null-program utility program IEFBR14 beforehand. It is easier
(and more flexible) to do it from within SAS - then the 'standard' JCL you
use needs no changes. Here is an example (for a PS file; if you need to
write to a PDS member, change the space allocation to (cyl,(50,50,1000)) to
specify directory blocks).
// EXEC SAS
//SYSIN DD *
filename html 'your.html.file.name' disp=(mod,delete,delete) ;
filename html clear ;
filename html 'your.html.file.name' disp=(new,catlg,delete) recfm=VB
lrecl=20004
blksize=27998 unit=3390
space=(cyl,(50,1000)) ;
ods html file=html rs=none style=minimal ;
proc <whatever> ;
....
run ;
ods html close ;
/*
The style MINIMAL privodes for no fluff in the output (everything is the
same font, size, and color, and takes the least space). Choose another
standard style if you wish, or work with the style customization provided
with some procs (TAB and REPORT with 8.1 plus PRINT in 8.2), or use
TEMPLATE. The reason I use MINIMAL is this. Usually, after the file is
generated, I use the FILENAME EMAIL to send it to whomever the output
belongs. Business analysts like it in Word, actuaries do in Excel. Well, I
just send the file as HTML and slap the needed file extension on top of it.
When Mr.Whoever receives the attachment, it looks like if XLS or DOC file,
alothough in reality, it is HMTL underneath. Whoever clicks on the file, and
it causes either Excel or Word to open it. Since neither has any trouble
reading HTML, it interprets it behind the scenes. MINIMAL imposes no style
on the recipient usually prone to tinkering with it anyway. In the extreme
case of some customers who are lazy to save an HTML file and then open it
with Excel or Word, they want all three files sent to them. In this case, I
send the same html thrice, but with different extensions, for example:
FileName Send EMail
From = 'SasHole'
To = 'Bob.Taylor.Dorfman@abc.com'
Cc = 'John.Smith@abc.com'
Subject = 'Another useless report you have requested'
Attach = ('your.html.file.name' Ext='xls'
'your.html.file.name' Ext='doc'
'your.html.file.name' Ext='html')
;
Data _Null_;
File Send ;
Put 'Please receive the attached. -- Regards, SasHole.' ;
Run ;
Kind regards,
======================
Paul M. Dorfman
Jacksonville, Fl
======================
Blue Cross Blue Shield of Florida, Inc., and its subsidiary and
affiliate companies are not responsible for errors or omissions in this
e-mail message. Any personal comments made in this e-mail do not reflect the
views of Blue Cross Blue Shield of Florida, Inc.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp