Hi Carol,

The answer is ... it depends.

If you'd like SAS to produce a report (PROC PRINT) in a flat file, you can 
PROC PRINTTO PRINT=MYOUTPUT; followed by a PROC PRINT DATA=RMMDTL;

If you want to produce a flat file with some SAS variables in it, then 

 ods listing close; 
 
 ods csvall file=CSV rs=none; 
 
 proc print data=cicstxn; 
   var smf__sid smf__jbn trntran trnterm trnuserid trnttype 
       trnstart trnstop trntrannum trntranpri trnluname trnpgmname 
       trnabcodec trnresp trnfctotct trntdtotct trntstotct trnspsyncct
       trnchmodect trnusrdispt trnusrdisptn trnusrcput trnusrcputn 
       trnsusptime trnsusptimen trndispwtt trndispwttn trnqrdispt 
       trnqrdisptn trnqrcput trnqrcputn trnmsdispt trnmsdisptn 
       trnmscput trnmscputn trnrodispt trnrodisptn trndspdelay 
       trntcldelay trnmxtdelay trnrmitime trnrmitimen trnrmisusp 
       trnrmisuspn 
     ; 
   run; 
 
 ods csvall close; 
 
 ods listing; 

There's a DD statement in my JCL that looks like:
//CSV      DD DISP=(,CATLG,DELETE),SPACE=(TRK,(15,15),RLSE), 
//            UNIT=SYSDA, 
//            DSN=&SYSUID..RPTCICF0.CSV 

This produces a comma-separated-variable file suitable for input into 
Excel.

There's also a SAS "FILE" statement lets you create a flat file out of 
about anything.

Tom
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




Carol Srna <[EMAIL PROTECTED]> 
Sent by: IBM Mainframe Discussion List <[email protected]>
01/17/2007 03:01 PM
Please respond to
IBM Mainframe Discussion List <[email protected]>


To
[email protected]
cc

Subject
How to Write SAS Output to MVS external file?






Hello All.

How do I write the output of my SAS file to an external file?

//S010    EXEC SAS 
//RMMSUM   DD DSN=PRMAS.RMM.MASTER,DISP=SHR 
//MYOUTPUT DD DSN=CAS.SAS.OUTPUT,DISP=SHR 
//SYSIN    DD * 
  LIBNAME myoutput; 
  DATA RMMDTL; 
    sas code;

PROC PRINTTO PRINT=MYOUTPUT;




----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to