LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 17 Oct 2002 08:01:54 -0400
Reply-To:     "Laurel A. Copeland" <lacop@UMICH.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Laurel A. Copeland" <lacop@UMICH.EDU>
Subject:      Re: flat ASCII

Here's an example, system permitting. I am writing to from and to my desktop here. The 3rd example writes to the VA's mainframe in Texas so there is associated JCL. HTH, Laurel

*1* Make a flat file from a SAS file *; DATA JACKS; SET DA.JACKS; FILE 'C:\AUSTIN\JACKS.ID' LINESIZE=27 FILENAME=Jacks; PUT @1 REALSSN Z9. @10 DOB julian7. @17 Sex $1. @18 Race $5. @23 JackScor 3.; RUN;

*2* Make a SAS file from the flat file just written out ; DATA JACKS; INFILE 'C:\AUSTIN\JACKS.ID' LRECL=27 MISSOVER; INPUT @1 REALSSN Z9. @10 DOB julian7. @17 Sex $1. @18 Race $5. @23 JackScor 3.; RUN;

*3* Writing out a flat file from a SAS file at Austin;

<there is some JCL, including these lines to set up a file handle for the file to be written out> ... //OUT1 DD DSN=S506LAC.EOLOP.DAT,DISP=(NEW,CATLG,DELETE), // UNIT=RMTINT,SPACE=(CYL,(500,50),RLSE) ... <more JCL then SAS code to make my desired dataset>

*write out the OP-Admit folks with qualifying DX; DATA _null_; SET op4; FILE out1 linesize=33; PUT Scrssn z9. Age 6.2 Race 2. Sex $1. Anoxhypo 1. Braindea 1. Braindam 1. Cardiac 1. Heartfai 1. CVische 1. Respfail 1. CSrespir 1. Deathunk 1. Respir7 1. Terminal 1. MajorDx 1. MinorDx 1. ; RUN;


Back to: Top of message | Previous page | Main SAS-L page