4838-hw-2a

# 4838-hw-2a - IF Y = 9999 THEN Y = IF Z = 9999 THEN Z = PUT...

This preview shows pages 1–2. Sign up to view the full content.

Page 370 / 12.4, 12.16 Page 400 / 13.2, 13.8 ***Problem 12-4; DATA PROB12_4; INFILE DATALINES DSD ; LENGTH NAME \$ 20 ; INPUT NAME AGE HEIGHT WEIGHT; DATALINES ; Bradley,35,68,155 "Bill Johnson",,70,200 "Smith,Jeff",27,70,188 ; PROC PRINT DATA =PROB12_4; TITLE "Listing of PROB12_4" ; RUN ; ***Problem 12-16; DATA PROB12_16; INFILE DATALINES DLM = ',' ; INPUT # 1 ID : \$3. GENDER : \$1. DOB : MMDDYY10. # 2 HEIGHT WEIGHT; FORMAT DOB MMDDYY10. ; DATALINES ; 001,M,06/14/1944 68,155 002,F,12/25/1967 52,99 003,M,07/04/1983 72,128 ; PROC PRINT DATA =PROB12_16; TITLE "Listing of PROB12_16" ; RUN ; ***Problem 13-2; DATA _NULL_ ; INFILE 'C:\BOOKS\APPLIED_5TH\INPUT.DAT' MISSOVER DLM = ',' ; FILE 'C:\BOOKS\APPLIED_5TH\OUTPUT.DAT' DLM= ',' ; INPUT X Y Z; IF X = 9999 THEN X =

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . ; IF Y = 9999 THEN Y = . ; IF Z = 9999 THEN Z = . ; PUT X Y Z; RUN ; ***To check the contents of the output file, bring it into an application like Notebook or use FSLIST as below; PROC FSLIST FILE= 'C:\BOOKS\APPLIED_5TH\OUTPUT.DAT' ; RUN ; ***Problem 13-8; LIBNAME RON 'C:\BOOKS\APPLIED_5TH' ; OPTIONS FMTSEARCH=(RON); PROC FORMAT LIBRARY =RON; VALUE \$GENDER 'M' = 'Male' 'F' = 'Female' ; VALUE YESNO 1 = 'Yes' = 'No' ; RUN ; DATA RON.SURVEY; INFILE 'C:\BOOKS\APPLIED_5TH\SURVEY.DAT' FIRSTOBS = 2 ; LENGTH GENDER \$ 1 ; INPUT GENDER \$ Q1-Q5; FORMAT GENDER \$GENDER. Q1-Q5 YESNO. ; RUN ;...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

4838-hw-2a - IF Y = 9999 THEN Y = IF Z = 9999 THEN Z = PUT...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online