BookmarkSubscribeRSS Feed
1usha
Calcite | Level 5

I am trying to upload a database in ASC format for research and data analysis.. Have errors using Libname, data and Infile . Can someone help me about this..

9 REPLIES 9
Tom
Super User Tom
Super User

Can you explain what the ASC format is? 

ballardw
Super User

When you have an error copy it and paste into the forum using a codebox opened with the {i} icon.

That way we can see what type of error. Otherwise we are completely guessing as to what is happening.

Reeza
Super User

ASC is just a text file, usually a fixed format file.

 

 

1usha
Calcite | Level 5
/*****************************************************************************
* SASload_NIS_2013_Core.SAS
* This program will load the 2013 NIS ASCII Core File into SAS.
*****************************************************************************/
libname'C:\Users\User\Documents\SASUniversityEdition\Core files';
*** Create SAS informats for missing values ***;
PROC FORMAT;
  INVALUE N2PF
    '-9' = .
    '-8' = .A
    '-6' = .C
    '-5' = .N
    OTHER = (|2.|)
  ;
  INVALUE N3PF
    '-99' = .
    '-88' = .A
    '-66' = .C
    OTHER = (|3.|)
  ;
  INVALUE N4PF
    '-999' = .
    '-888' = .A
    '-666' = .C
    OTHER = (|4.|)
  ;
  INVALUE N4P1F
    '-9.9' = .
    '-8.8' = .A
    '-6.6' = .C
    OTHER = (|4.1|)
  ;
  INVALUE N5PF
    '-9999' = .
    '-8888' = .A
    '-6666' = .C
    OTHER = (|5.|)
  ;
  INVALUE N5P2F
    '-9.99' = .
    '-8.88' = .A
    '-6.66' = .C
    OTHER = (|5.2|)
  ;
  INVALUE N6PF
    '-99999' = .
    '-88888' = .A
    '-66666' = .C
    OTHER = (|6.|)
  ;
  INVALUE N6P2F
    '-99.99' = .
    '-88.88' = .A
    '-66.66' = .C
    OTHER = (|6.2|)
  ;
  INVALUE N7P2F
    '-999.99' = .
    '-888.88' = .A
    '-666.66' = .C
    OTHER = (|7.2|)
  ;
  INVALUE N8PF
    '-9999999' = .
    '-8888888' = .A
    '-6666666' = .C
    OTHER = (|8.|)
  ;
  INVALUE N8P2F
    '-9999.99' = .
    '-8888.88' = .A
    '-6666.66' = .C
    OTHER = (|8.2|)
  ;
  INVALUE N8P4F
    '-99.9999' = .
    '-88.8888' = .A
    '-66.6666' = .C
    OTHER = (|8.4|)
  ;
  INVALUE N10PF
    '-999999999' = .
    '-888888888' = .A
    '-666666666' = .C
    OTHER = (|10.|)
  ;
  INVALUE N10P4F
    '-9999.9999' = .
    '-8888.8888' = .A
    '-6666.6666' = .C
    OTHER = (|10.4|)
  ;
  INVALUE N10P5F
    '-999.99999' = .
    '-888.88888' = .A
    '-666.66666' = .C
    OTHER = (|10.5|)
  ;
  INVALUE DATE10F
    '-999999999' = .
    '-888888888' = .A
    '-666666666' = .C
    OTHER = (|MMDDYY10.|)
  ;
  INVALUE N11P7F
    '-99.9999999' = .
    '-88.8888888' = .A
    '-66.6666666' = .C
    OTHER = (|11.7|)
  ;
  INVALUE N12P2F
    '-99999999.99' = .
    '-88888888.88' = .A
    '-66666666.66' = .C
    OTHER = (|12.2|)
  ;
  INVALUE N12P5F
    '-99999.99999' = .
    '-88888.88888' = .A
    '-66666.66666' = .C
    OTHER = (|12.5|)
  ;
  INVALUE N13PF
    '-999999999999' = .
    '-888888888888' = .A
    '-666666666666' = .C
    OTHER = (|13.|)
  ;
  INVALUE N15P2F
    '-99999999999.99' = .
    '-88888888888.88' = .A
    '-66666666666.66' = .C
    OTHER = (|15.2|)
  ;
RUN;

*** Data Step to load the file ***;
DATA nis.NIS_2013_Core;
INFILE C:\Users\User\Documents\SASUniversityEdition\Core files\NIS_2013\NIS_2013_Core (2);

*** Define data element attributes ***;
ATTRIB 
  AGE                        LENGTH=3
  LABEL="Age in years at admission"

  AGE_NEONATE                LENGTH=3
  LABEL="Neonatal age (first 28 days after birth) indicator"

  AMONTH                     LENGTH=3
  LABEL="Admission month"

  AWEEKEND                   LENGTH=3
  LABEL="Admission day is a weekend"

  DIED                       LENGTH=3
  LABEL="Died during hospitalization"

  DISCWT                     LENGTH=8
  LABEL="NIS discharge weight"

  DISPUNIFORM                LENGTH=3
  LABEL="Disposition of patient (uniform)"

  DQTR                       LENGTH=3
  LABEL="Discharge quarter"

  DRG                        LENGTH=3
  LABEL="DRG in effect on discharge date"

  DRG24                      LENGTH=3
  LABEL="DRG, version 24"

  DRGVER                     LENGTH=3
  LABEL="DRG grouper version used on discharge date"

  DRG_NoPOA                  LENGTH=3
  LABEL="DRG in use on discharge date, calculated without POA"

  DX1                        LENGTH=$5
  LABEL="Diagnosis 1"

  DX2                        LENGTH=$5
  LABEL="Diagnosis 2"

  DX3                        LENGTH=$5
  LABEL="Diagnosis 3"

  DX4                        LENGTH=$5
  LABEL="Diagnosis 4"

  DX5                        LENGTH=$5
  LABEL="Diagnosis 5"

  DX6                        LENGTH=$5
  LABEL="Diagnosis 6"

  DX7                        LENGTH=$5
  LABEL="Diagnosis 7"

  DX8                        LENGTH=$5
  LABEL="Diagnosis 8"

  DX9                        LENGTH=$5
  LABEL="Diagnosis 9"

  DX10                       LENGTH=$5
  LABEL="Diagnosis 10"

  DX11                       LENGTH=$5
  LABEL="Diagnosis 11"

  DX12                       LENGTH=$5
  LABEL="Diagnosis 12"

  DX13                       LENGTH=$5
  LABEL="Diagnosis 13"

  DX14                       LENGTH=$5
  LABEL="Diagnosis 14"

  DX15                       LENGTH=$5
  LABEL="Diagnosis 15"

  DX16                       LENGTH=$5
  LABEL="Diagnosis 16"

  DX17                       LENGTH=$5
  LABEL="Diagnosis 17"

  DX18                       LENGTH=$5
  LABEL="Diagnosis 18"

  DX19                       LENGTH=$5
  LABEL="Diagnosis 19"

  DX20                       LENGTH=$5
  LABEL="Diagnosis 20"

  DX21                       LENGTH=$5
  LABEL="Diagnosis 21"

  DX22                       LENGTH=$5
  LABEL="Diagnosis 22"

  DX23                       LENGTH=$5
  LABEL="Diagnosis 23"

  DX24                       LENGTH=$5
  LABEL="Diagnosis 24"

  DX25                       LENGTH=$5
  LABEL="Diagnosis 25"

  DXCCS1                     LENGTH=3
  LABEL="CCS: diagnosis 1"

  DXCCS2                     LENGTH=3
  LABEL="CCS: diagnosis 2"

  DXCCS3                     LENGTH=3
  LABEL="CCS: diagnosis 3"

  DXCCS4                     LENGTH=3
  LABEL="CCS: diagnosis 4"

  DXCCS5                     LENGTH=3
  LABEL="CCS: diagnosis 5"

  DXCCS6                     LENGTH=3
  LABEL="CCS: diagnosis 6"

  DXCCS7                     LENGTH=3
  LABEL="CCS: diagnosis 7"

  DXCCS8                     LENGTH=3
  LABEL="CCS: diagnosis 8"

  DXCCS9                     LENGTH=3
  LABEL="CCS: diagnosis 9"

  DXCCS10                    LENGTH=3
  LABEL="CCS: diagnosis 10"

  DXCCS11                    LENGTH=3
  LABEL="CCS: diagnosis 11"

  DXCCS12                    LENGTH=3
  LABEL="CCS: diagnosis 12"

  DXCCS13                    LENGTH=3
  LABEL="CCS: diagnosis 13"

  DXCCS14                    LENGTH=3
  LABEL="CCS: diagnosis 14"

  DXCCS15                    LENGTH=3
  LABEL="CCS: diagnosis 15"

  DXCCS16                    LENGTH=3
  LABEL="CCS: diagnosis 16"

  DXCCS17                    LENGTH=3
  LABEL="CCS: diagnosis 17"

  DXCCS18                    LENGTH=3
  LABEL="CCS: diagnosis 18"

  DXCCS19                    LENGTH=3
  LABEL="CCS: diagnosis 19"

  DXCCS20                    LENGTH=3
  LABEL="CCS: diagnosis 20"

  DXCCS21                    LENGTH=3
  LABEL="CCS: diagnosis 21"

  DXCCS22                    LENGTH=3
  LABEL="CCS: diagnosis 22"

  DXCCS23                    LENGTH=3
  LABEL="CCS: diagnosis 23"

  DXCCS24                    LENGTH=3
  LABEL="CCS: diagnosis 24"

  DXCCS25                    LENGTH=3
  LABEL="CCS: diagnosis 25"

  ECODE1                     LENGTH=$5
  LABEL="E code 1"

  ECODE2                     LENGTH=$5
  LABEL="E code 2"

  ECODE3                     LENGTH=$5
  LABEL="E code 3"

  ECODE4                     LENGTH=$5
  LABEL="E code 4"

  ELECTIVE                   LENGTH=3
  LABEL="Elective versus non-elective admission"

  E_CCS1                     LENGTH=3
  LABEL="CCS: E Code 1"

  E_CCS2                     LENGTH=3
  LABEL="CCS: E Code 2"

  E_CCS3                     LENGTH=3
  LABEL="CCS: E Code 3"

  E_CCS4                     LENGTH=3
  LABEL="CCS: E Code 4"

  FEMALE                     LENGTH=3
  LABEL="Indicator of sex"

  HCUP_ED                    LENGTH=3
  LABEL="HCUP Emergency Department service indicator"

  HOSPBRTH                   LENGTH=3
  LABEL="Indicator of birth in this hospital"

  HOSP_DIVISION              LENGTH=3            FORMAT=2.
  LABEL="Census Division of hospital"

  HOSP_NIS                   LENGTH=4            FORMAT=5.
  LABEL="NIS hospital number"

  KEY_NIS                    LENGTH=5            FORMAT=8.
  LABEL="NIS record number"

  LOS                        LENGTH=4
  LABEL="Length of stay (cleaned)"

  MDC                        LENGTH=3
  LABEL="MDC in effect on discharge date"

  MDC24                      LENGTH=3
  LABEL="MDC, version 24"

  MDC_NoPOA                  LENGTH=3
  LABEL="MDC in use on discharge date, calculated without POA"

  NCHRONIC                   LENGTH=3
  LABEL="Number of chronic conditions"

  NDX                        LENGTH=3
  LABEL="Number of diagnoses on this record"

  NECODE                     LENGTH=3
  LABEL="Number of E codes on this record"

  NEOMAT                     LENGTH=3
  LABEL="Neonatal and/or maternal DX and/or PR"

  NIS_STRATUM                LENGTH=4            FORMAT=4.
  LABEL="NIS hospital stratum"

  NPR                        LENGTH=3
  LABEL="Number of procedures on this record"

  ORPROC                     LENGTH=3
  LABEL="Major operating room procedure indicator"

  PAY1                       LENGTH=3
  LABEL="Primary expected payer (uniform)"

  PL_NCHS                    LENGTH=3
  LABEL="Patient Location: NCHS Urban-Rural Code"

  PR1                        LENGTH=$4
  LABEL="Procedure 1"

  PR2                        LENGTH=$4
  LABEL="Procedure 2"

  PR3                        LENGTH=$4
  LABEL="Procedure 3"

  PR4                        LENGTH=$4
  LABEL="Procedure 4"

  PR5                        LENGTH=$4
  LABEL="Procedure 5"

  PR6                        LENGTH=$4
  LABEL="Procedure 6"

  PR7                        LENGTH=$4
  LABEL="Procedure 7"

  PR8                        LENGTH=$4
  LABEL="Procedure 8"

  PR9                        LENGTH=$4
  LABEL="Procedure 9"

  PR10                       LENGTH=$4
  LABEL="Procedure 10"

  PR11                       LENGTH=$4
  LABEL="Procedure 11"

  PR12                       LENGTH=$4
  LABEL="Procedure 12"

  PR13                       LENGTH=$4
  LABEL="Procedure 13"

  PR14                       LENGTH=$4
  LABEL="Procedure 14"

  PR15                       LENGTH=$4
  LABEL="Procedure 15"

  PRCCS1                     LENGTH=3
  LABEL="CCS: procedure 1"

  PRCCS2                     LENGTH=3
  LABEL="CCS: procedure 2"

  PRCCS3                     LENGTH=3
  LABEL="CCS: procedure 3"

  PRCCS4                     LENGTH=3
  LABEL="CCS: procedure 4"

  PRCCS5                     LENGTH=3
  LABEL="CCS: procedure 5"

  PRCCS6                     LENGTH=3
  LABEL="CCS: procedure 6"

  PRCCS7                     LENGTH=3
  LABEL="CCS: procedure 7"

  PRCCS8                     LENGTH=3
  LABEL="CCS: procedure 8"

  PRCCS9                     LENGTH=3
  LABEL="CCS: procedure 9"

  PRCCS10                    LENGTH=3
  LABEL="CCS: procedure 10"

  PRCCS11                    LENGTH=3
  LABEL="CCS: procedure 11"

  PRCCS12                    LENGTH=3
  LABEL="CCS: procedure 12"

  PRCCS13                    LENGTH=3
  LABEL="CCS: procedure 13"

  PRCCS14                    LENGTH=3
  LABEL="CCS: procedure 14"

  PRCCS15                    LENGTH=3
  LABEL="CCS: procedure 15"

  PRDAY1                     LENGTH=4
  LABEL="Number of days from admission to PR1"

  PRDAY2                     LENGTH=4
  LABEL="Number of days from admission to PR2"

  PRDAY3                     LENGTH=4
  LABEL="Number of days from admission to PR3"

  PRDAY4                     LENGTH=4
  LABEL="Number of days from admission to PR4"

  PRDAY5                     LENGTH=4
  LABEL="Number of days from admission to PR5"

  PRDAY6                     LENGTH=4
  LABEL="Number of days from admission to PR6"

  PRDAY7                     LENGTH=4
  LABEL="Number of days from admission to PR7"

  PRDAY8                     LENGTH=4
  LABEL="Number of days from admission to PR8"

  PRDAY9                     LENGTH=4
  LABEL="Number of days from admission to PR9"

  PRDAY10                    LENGTH=4
  LABEL="Number of days from admission to PR10"

  PRDAY11                    LENGTH=4
  LABEL="Number of days from admission to PR11"

  PRDAY12                    LENGTH=4
  LABEL="Number of days from admission to PR12"

  PRDAY13                    LENGTH=4
  LABEL="Number of days from admission to PR13"

  PRDAY14                    LENGTH=4
  LABEL="Number of days from admission to PR14"

  PRDAY15                    LENGTH=4
  LABEL="Number of days from admission to PR15"

  RACE                       LENGTH=3
  LABEL="Race (uniform)"

  TOTCHG                     LENGTH=6
  LABEL="Total charges (cleaned)"

  TRAN_IN                    LENGTH=3
  LABEL="Transfer in indicator"

  TRAN_OUT                   LENGTH=3
  LABEL="Transfer out indicator"

  YEAR                       LENGTH=3
  LABEL="Calendar year"

  ZIPINC_QRTL                LENGTH=3
  LABEL="Median household income national quartile for patient ZIP Code"
  ;

*** Read data elements from the ASCII file ***;
INPUT 
      @1      AGE                      N3PF.
      @4      AGE_NEONATE              N2PF.
      @6      AMONTH                   N2PF.
      @8      AWEEKEND                 N2PF.
      @10     DIED                     N2PF.
      @12     DISCWT                   N11P7F.
      @23     DISPUNIFORM              N2PF.
      @25     DQTR                     N2PF.
      @27     DRG                      N3PF.
      @30     DRG24                    N3PF.
      @33     DRGVER                   N2PF.
      @35     DRG_NoPOA                N3PF.
      @38     DX1                      $CHAR5.
      @43     DX2                      $CHAR5.
      @48     DX3                      $CHAR5.
      @53     DX4                      $CHAR5.
      @58     DX5                      $CHAR5.
      @63     DX6                      $CHAR5.
      @68     DX7                      $CHAR5.
      @73     DX8                      $CHAR5.
      @78     DX9                      $CHAR5.
      @83     DX10                     $CHAR5.
      @88     DX11                     $CHAR5.
      @93     DX12                     $CHAR5.
      @98     DX13                     $CHAR5.
      @103    DX14                     $CHAR5.
      @108    DX15                     $CHAR5.
      @113    DX16                     $CHAR5.
      @118    DX17                     $CHAR5.
      @123    DX18                     $CHAR5.
      @128    DX19                     $CHAR5.
      @133    DX20                     $CHAR5.
      @138    DX21                     $CHAR5.
      @143    DX22                     $CHAR5.
      @148    DX23                     $CHAR5.
      @153    DX24                     $CHAR5.
      @158    DX25                     $CHAR5.
      @163    DXCCS1                   N3PF.
      @166    DXCCS2                   N3PF.
      @169    DXCCS3                   N3PF.
      @172    DXCCS4                   N3PF.
      @175    DXCCS5                   N3PF.
      @178    DXCCS6                   N3PF.
      @181    DXCCS7                   N3PF.
      @184    DXCCS8                   N3PF.
      @187    DXCCS9                   N3PF.
      @190    DXCCS10                  N3PF.
      @193    DXCCS11                  N3PF.
      @196    DXCCS12                  N3PF.
      @199    DXCCS13                  N3PF.
      @202    DXCCS14                  N3PF.
      @205    DXCCS15                  N3PF.
      @208    DXCCS16                  N3PF.
      @211    DXCCS17                  N3PF.
      @214    DXCCS18                  N3PF.
      @217    DXCCS19                  N3PF.
      @220    DXCCS20                  N3PF.
      @223    DXCCS21                  N3PF.
      @226    DXCCS22                  N3PF.
      @229    DXCCS23                  N3PF.
      @232    DXCCS24                  N3PF.
      @235    DXCCS25                  N3PF.
      @238    ECODE1                   $CHAR5.
      @243    ECODE2                   $CHAR5.
      @248    ECODE3                   $CHAR5.
      @253    ECODE4                   $CHAR5.
      @258    ELECTIVE                 N2PF.
      @260    E_CCS1                   N4PF.
      @264    E_CCS2                   N4PF.
      @268    E_CCS3                   N4PF.
      @272    E_CCS4                   N4PF.
      @276    FEMALE                   N2PF.
      @278    HCUP_ED                  N3PF.
      @281    HOSPBRTH                 N2PF.
      @283    HOSP_DIVISION            N2PF.
      @285    HOSP_NIS                 N5PF.
      @290    KEY_NIS                  N10PF.
      @300    LOS                      N5PF.
      @305    MDC                      N2PF.
      @307    MDC24                    N2PF.
      @309    MDC_NoPOA                N2PF.
      @311    NCHRONIC                 N2PF.
      @313    NDX                      N2PF.
      @315    NECODE                   N3PF.
      @318    NEOMAT                   N2PF.
      @320    NIS_STRATUM              N4PF.
      @324    NPR                      N2PF.
      @326    ORPROC                   N2PF.
      @328    PAY1                     N2PF.
      @330    PL_NCHS                  N3PF.
      @333    PR1                      $CHAR4.
      @337    PR2                      $CHAR4.
      @341    PR3                      $CHAR4.
      @345    PR4                      $CHAR4.
      @349    PR5                      $CHAR4.
      @353    PR6                      $CHAR4.
      @357    PR7                      $CHAR4.
      @361    PR8                      $CHAR4.
      @365    PR9                      $CHAR4.
      @369    PR10                     $CHAR4.
      @373    PR11                     $CHAR4.
      @377    PR12                     $CHAR4.
      @381    PR13                     $CHAR4.
      @385    PR14                     $CHAR4.
      @389    PR15                     $CHAR4.
      @393    PRCCS1                   N3PF.
      @396    PRCCS2                   N3PF.
      @399    PRCCS3                   N3PF.
      @402    PRCCS4                   N3PF.
      @405    PRCCS5                   N3PF.
      @408    PRCCS6                   N3PF.
      @411    PRCCS7                   N3PF.
      @414    PRCCS8                   N3PF.
      @417    PRCCS9                   N3PF.
      @420    PRCCS10                  N3PF.
      @423    PRCCS11                  N3PF.
      @426    PRCCS12                  N3PF.
      @429    PRCCS13                  N3PF.
      @432    PRCCS14                  N3PF.
      @435    PRCCS15                  N3PF.
      @438    PRDAY1                   N3PF.
      @441    PRDAY2                   N3PF.
      @444    PRDAY3                   N3PF.
      @447    PRDAY4                   N3PF.
      @450    PRDAY5                   N3PF.
      @453    PRDAY6                   N3PF.
      @456    PRDAY7                   N3PF.
      @459    PRDAY8                   N3PF.
      @462    PRDAY9                   N3PF.
      @465    PRDAY10                  N3PF.
      @468    PRDAY11                  N3PF.
      @471    PRDAY12                  N3PF.
      @474    PRDAY13                  N3PF.
      @477    PRDAY14                  N3PF.
      @480    PRDAY15                  N3PF.
      @483    RACE                     N2PF.
      @485    TOTCHG                   N10PF.
      @495    TRAN_IN                  N2PF.
      @497    TRAN_OUT                 N2PF.
      @499    YEAR                     N4PF.
      @503    ZIPINC_QRTL              N2PF.
      ;
RUN;

When I run this code, I get the following error message..

 

 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         nis.NIS_2013_Core
            _________________
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 63         
 64         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 
 65         ODS HTML CLOSE;
 66         &GRAPHTERM; ;*';*";*/;RUN;QUIT;
 67         QUIT;RUN;
 68         ODS HTML5 (ID=WEB) CLOSE;
 69         
 70         ODS RTF (ID=WEB) CLOSE;
 71         ODS PDF (ID=WEB) CLOSE;
 NOTE: ODS PDF(WEB) printed no output. 
       (This sometimes results from failing to place a RUN statement before the ODS PDF(WEB) CLOSE statement.)
 72         FILENAME _GSFNAME;
 NOTE: Fileref _GSFNAME has been deassigned.
 73         DATA _NULL_;
 74         RUN;
 
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 75         OPTIONS VALIDMEMNAME=COMPAT;
 76         OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
 77         
Reeza
Super User

Your libname statemetn is incorrect, I suspect it should be:

 

If you're using SAS UE, and set your shared folders properly it should be similar to below. It SHOULD NOT reference your C/D/E drive.

 

libname nis '/folders/myfolders/';
Tom
Super User Tom
Super User

Your libname statement is missing the name you want to use for the libname, Based on the line that it complained about I assume that you want to use NIS as the name.

libname NIS 'C:\Users\User\Documents\SASUniversityEdition\Core files';

Your infile statement is missing the quotes around the name of the file you want to read.  Also I doubt if that is the actual name of the file as usually the files that NIS uses have .dat as the extension on the filenames.

INFILE 'C:\Users\User\Documents\SASUniversityEdition\Core files\NIS_2013\NIS_2013_Core.dat';

But the location of the error in your log is wrong if that if those are your only errors. It almost looks like you typed the dataset name into the beginning of the program, but that is not appearing the code you posted.  So perhaps you have also put an extra semi-colon somewhere? Or have other unbalanced quotes?

 

1usha
Calcite | Level 5

Thank you very much Reeza and Tom. Made the changes to Libname, data and infile. Errors are now down to 4. 

hopeful of getting through this with your help

Current codes are as follows..

 

/*****************************************************************************
* SASload_NIS_2013_Core.SAS
* This program will load the 2013 NIS ASCII Core File into SAS.
*****************************************************************************/
libname nis '/folders/myfolders';
*** Create SAS informats for missing values ***;
PROC FORMAT;
  INVALUE N2PF
    '-9' = .
    '-8' = .A
    '-6' = .C
    '-5' = .N
    OTHER = (|2.|)
  ;
  INVALUE N3PF
    '-99' = .
    '-88' = .A
    '-66' = .C
    OTHER = (|3.|)
  ;
  INVALUE N4PF
    '-999' = .
    '-888' = .A
    '-666' = .C
    OTHER = (|4.|)
  ;
  INVALUE N4P1F
    '-9.9' = .
    '-8.8' = .A
    '-6.6' = .C
    OTHER = (|4.1|)
  ;
  INVALUE N5PF
    '-9999' = .
    '-8888' = .A
    '-6666' = .C
    OTHER = (|5.|)
  ;
  INVALUE N5P2F
    '-9.99' = .
    '-8.88' = .A
    '-6.66' = .C
    OTHER = (|5.2|)
  ;
  INVALUE N6PF
    '-99999' = .
    '-88888' = .A
    '-66666' = .C
    OTHER = (|6.|)
  ;
  INVALUE N6P2F
    '-99.99' = .
    '-88.88' = .A
    '-66.66' = .C
    OTHER = (|6.2|)
  ;
  INVALUE N7P2F
    '-999.99' = .
    '-888.88' = .A
    '-666.66' = .C
    OTHER = (|7.2|)
  ;
  INVALUE N8PF
    '-9999999' = .
    '-8888888' = .A
    '-6666666' = .C
    OTHER = (|8.|)
  ;
  INVALUE N8P2F
    '-9999.99' = .
    '-8888.88' = .A
    '-6666.66' = .C
    OTHER = (|8.2|)
  ;
  INVALUE N8P4F
    '-99.9999' = .
    '-88.8888' = .A
    '-66.6666' = .C
    OTHER = (|8.4|)
  ;
  INVALUE N10PF
    '-999999999' = .
    '-888888888' = .A
    '-666666666' = .C
    OTHER = (|10.|)
  ;
  INVALUE N10P4F
    '-9999.9999' = .
    '-8888.8888' = .A
    '-6666.6666' = .C
    OTHER = (|10.4|)
  ;
  INVALUE N10P5F
    '-999.99999' = .
    '-888.88888' = .A
    '-666.66666' = .C
    OTHER = (|10.5|)
  ;
  INVALUE DATE10F
    '-999999999' = .
    '-888888888' = .A
    '-666666666' = .C
    OTHER = (|MMDDYY10.|)
  ;
  INVALUE N11P7F
    '-99.9999999' = .
    '-88.8888888' = .A
    '-66.6666666' = .C
    OTHER = (|11.7|)
  ;
  INVALUE N12P2F
    '-99999999.99' = .
    '-88888888.88' = .A
    '-66666666.66' = .C
    OTHER = (|12.2|)
  ;
  INVALUE N12P5F
    '-99999.99999' = .
    '-88888.88888' = .A
    '-66666.66666' = .C
    OTHER = (|12.5|)
  ;
  INVALUE N13PF
    '-999999999999' = .
    '-888888888888' = .A
    '-666666666666' = .C
    OTHER = (|13.|)
  ;
  INVALUE N15P2F
    '-99999999999.99' = .
    '-88888888888.88' = .A
    '-66666666666.66' = .C
    OTHER = (|15.2|)
  ;
RUN;

*** Data Step to load the file ***;
"DATA:nis.NIS_2013_Core";
INFILE 'C:\Users\User\Documents\SASUniversityEdition\Core files\NIS_2013\NIS_2013_Core.dat' (2);

*** Define data element attributes ***;
ATTRIB 
  AGE                        LENGTH=3
  LABEL="Age in years at admission"

  AGE_NEONATE                LENGTH=3
  LABEL="Neonatal age (first 28 days after birth) indicator"

  AMONTH                     LENGTH=3
  LABEL="Admission month"

  AWEEKEND                   LENGTH=3
  LABEL="Admission day is a weekend"

  DIED                       LENGTH=3
  LABEL="Died during hospitalization"

  DISCWT                     LENGTH=8
  LABEL="NIS discharge weight"

  DISPUNIFORM                LENGTH=3
  LABEL="Disposition of patient (uniform)"

  DQTR                       LENGTH=3
  LABEL="Discharge quarter"

  DRG                        LENGTH=3
  LABEL="DRG in effect on discharge date"

  DRG24                      LENGTH=3
  LABEL="DRG, version 24"

  DRGVER                     LENGTH=3
  LABEL="DRG grouper version used on discharge date"

  DRG_NoPOA                  LENGTH=3
  LABEL="DRG in use on discharge date, calculated without POA"

  DX1                        LENGTH=$5
  LABEL="Diagnosis 1"

  DX2                        LENGTH=$5
  LABEL="Diagnosis 2"

  DX3                        LENGTH=$5
  LABEL="Diagnosis 3"

  DX4                        LENGTH=$5
  LABEL="Diagnosis 4"

  DX5                        LENGTH=$5
  LABEL="Diagnosis 5"

  DX6                        LENGTH=$5
  LABEL="Diagnosis 6"

  DX7                        LENGTH=$5
  LABEL="Diagnosis 7"

  DX8                        LENGTH=$5
  LABEL="Diagnosis 8"

  DX9                        LENGTH=$5
  LABEL="Diagnosis 9"

  DX10                       LENGTH=$5
  LABEL="Diagnosis 10"

  DX11                       LENGTH=$5
  LABEL="Diagnosis 11"

  DX12                       LENGTH=$5
  LABEL="Diagnosis 12"

  DX13                       LENGTH=$5
  LABEL="Diagnosis 13"

  DX14                       LENGTH=$5
  LABEL="Diagnosis 14"

  DX15                       LENGTH=$5
  LABEL="Diagnosis 15"

  DX16                       LENGTH=$5
  LABEL="Diagnosis 16"

  DX17                       LENGTH=$5
  LABEL="Diagnosis 17"

  DX18                       LENGTH=$5
  LABEL="Diagnosis 18"

  DX19                       LENGTH=$5
  LABEL="Diagnosis 19"

  DX20                       LENGTH=$5
  LABEL="Diagnosis 20"

  DX21                       LENGTH=$5
  LABEL="Diagnosis 21"

  DX22                       LENGTH=$5
  LABEL="Diagnosis 22"

  DX23                       LENGTH=$5
  LABEL="Diagnosis 23"

  DX24                       LENGTH=$5
  LABEL="Diagnosis 24"

  DX25                       LENGTH=$5
  LABEL="Diagnosis 25"

  DXCCS1                     LENGTH=3
  LABEL="CCS: diagnosis 1"

  DXCCS2                     LENGTH=3
  LABEL="CCS: diagnosis 2"

  DXCCS3                     LENGTH=3
  LABEL="CCS: diagnosis 3"

  DXCCS4                     LENGTH=3
  LABEL="CCS: diagnosis 4"

  DXCCS5                     LENGTH=3
  LABEL="CCS: diagnosis 5"

  DXCCS6                     LENGTH=3
  LABEL="CCS: diagnosis 6"

  DXCCS7                     LENGTH=3
  LABEL="CCS: diagnosis 7"

  DXCCS8                     LENGTH=3
  LABEL="CCS: diagnosis 8"

  DXCCS9                     LENGTH=3
  LABEL="CCS: diagnosis 9"

  DXCCS10                    LENGTH=3
  LABEL="CCS: diagnosis 10"

  DXCCS11                    LENGTH=3
  LABEL="CCS: diagnosis 11"

  DXCCS12                    LENGTH=3
  LABEL="CCS: diagnosis 12"

  DXCCS13                    LENGTH=3
  LABEL="CCS: diagnosis 13"

  DXCCS14                    LENGTH=3
  LABEL="CCS: diagnosis 14"

  DXCCS15                    LENGTH=3
  LABEL="CCS: diagnosis 15"

  DXCCS16                    LENGTH=3
  LABEL="CCS: diagnosis 16"

  DXCCS17                    LENGTH=3
  LABEL="CCS: diagnosis 17"

  DXCCS18                    LENGTH=3
  LABEL="CCS: diagnosis 18"

  DXCCS19                    LENGTH=3
  LABEL="CCS: diagnosis 19"

  DXCCS20                    LENGTH=3
  LABEL="CCS: diagnosis 20"

  DXCCS21                    LENGTH=3
  LABEL="CCS: diagnosis 21"

  DXCCS22                    LENGTH=3
  LABEL="CCS: diagnosis 22"

  DXCCS23                    LENGTH=3
  LABEL="CCS: diagnosis 23"

  DXCCS24                    LENGTH=3
  LABEL="CCS: diagnosis 24"

  DXCCS25                    LENGTH=3
  LABEL="CCS: diagnosis 25"

  ECODE1                     LENGTH=$5
  LABEL="E code 1"

  ECODE2                     LENGTH=$5
  LABEL="E code 2"

  ECODE3                     LENGTH=$5
  LABEL="E code 3"

  ECODE4                     LENGTH=$5
  LABEL="E code 4"

  ELECTIVE                   LENGTH=3
  LABEL="Elective versus non-elective admission"

  E_CCS1                     LENGTH=3
  LABEL="CCS: E Code 1"

  E_CCS2                     LENGTH=3
  LABEL="CCS: E Code 2"

  E_CCS3                     LENGTH=3
  LABEL="CCS: E Code 3"

  E_CCS4                     LENGTH=3
  LABEL="CCS: E Code 4"

  FEMALE                     LENGTH=3
  LABEL="Indicator of sex"

  HCUP_ED                    LENGTH=3
  LABEL="HCUP Emergency Department service indicator"

  HOSPBRTH                   LENGTH=3
  LABEL="Indicator of birth in this hospital"

  HOSP_DIVISION              LENGTH=3            FORMAT=2.
  LABEL="Census Division of hospital"

  HOSP_NIS                   LENGTH=4            FORMAT=5.
  LABEL="NIS hospital number"

  KEY_NIS                    LENGTH=5            FORMAT=8.
  LABEL="NIS record number"

  LOS                        LENGTH=4
  LABEL="Length of stay (cleaned)"

  MDC                        LENGTH=3
  LABEL="MDC in effect on discharge date"

  MDC24                      LENGTH=3
  LABEL="MDC, version 24"

  MDC_NoPOA                  LENGTH=3
  LABEL="MDC in use on discharge date, calculated without POA"

  NCHRONIC                   LENGTH=3
  LABEL="Number of chronic conditions"

  NDX                        LENGTH=3
  LABEL="Number of diagnoses on this record"

  NECODE                     LENGTH=3
  LABEL="Number of E codes on this record"

  NEOMAT                     LENGTH=3
  LABEL="Neonatal and/or maternal DX and/or PR"

  NIS_STRATUM                LENGTH=4            FORMAT=4.
  LABEL="NIS hospital stratum"

  NPR                        LENGTH=3
  LABEL="Number of procedures on this record"

  ORPROC                     LENGTH=3
  LABEL="Major operating room procedure indicator"

  PAY1                       LENGTH=3
  LABEL="Primary expected payer (uniform)"

  PL_NCHS                    LENGTH=3
  LABEL="Patient Location: NCHS Urban-Rural Code"

  PR1                        LENGTH=$4
  LABEL="Procedure 1"

  PR2                        LENGTH=$4
  LABEL="Procedure 2"

  PR3                        LENGTH=$4
  LABEL="Procedure 3"

  PR4                        LENGTH=$4
  LABEL="Procedure 4"

  PR5                        LENGTH=$4
  LABEL="Procedure 5"

  PR6                        LENGTH=$4
  LABEL="Procedure 6"

  PR7                        LENGTH=$4
  LABEL="Procedure 7"

  PR8                        LENGTH=$4
  LABEL="Procedure 8"

  PR9                        LENGTH=$4
  LABEL="Procedure 9"

  PR10                       LENGTH=$4
  LABEL="Procedure 10"

  PR11                       LENGTH=$4
  LABEL="Procedure 11"

  PR12                       LENGTH=$4
  LABEL="Procedure 12"

  PR13                       LENGTH=$4
  LABEL="Procedure 13"

  PR14                       LENGTH=$4
  LABEL="Procedure 14"

  PR15                       LENGTH=$4
  LABEL="Procedure 15"

  PRCCS1                     LENGTH=3
  LABEL="CCS: procedure 1"

  PRCCS2                     LENGTH=3
  LABEL="CCS: procedure 2"

  PRCCS3                     LENGTH=3
  LABEL="CCS: procedure 3"

  PRCCS4                     LENGTH=3
  LABEL="CCS: procedure 4"

  PRCCS5                     LENGTH=3
  LABEL="CCS: procedure 5"

  PRCCS6                     LENGTH=3
  LABEL="CCS: procedure 6"

  PRCCS7                     LENGTH=3
  LABEL="CCS: procedure 7"

  PRCCS8                     LENGTH=3
  LABEL="CCS: procedure 8"

  PRCCS9                     LENGTH=3
  LABEL="CCS: procedure 9"

  PRCCS10                    LENGTH=3
  LABEL="CCS: procedure 10"

  PRCCS11                    LENGTH=3
  LABEL="CCS: procedure 11"

  PRCCS12                    LENGTH=3
  LABEL="CCS: procedure 12"

  PRCCS13                    LENGTH=3
  LABEL="CCS: procedure 13"

  PRCCS14                    LENGTH=3
  LABEL="CCS: procedure 14"

  PRCCS15                    LENGTH=3
  LABEL="CCS: procedure 15"

  PRDAY1                     LENGTH=4
  LABEL="Number of days from admission to PR1"

  PRDAY2                     LENGTH=4
  LABEL="Number of days from admission to PR2"

  PRDAY3                     LENGTH=4
  LABEL="Number of days from admission to PR3"

  PRDAY4                     LENGTH=4
  LABEL="Number of days from admission to PR4"

  PRDAY5                     LENGTH=4
  LABEL="Number of days from admission to PR5"

  PRDAY6                     LENGTH=4
  LABEL="Number of days from admission to PR6"

  PRDAY7                     LENGTH=4
  LABEL="Number of days from admission to PR7"

  PRDAY8                     LENGTH=4
  LABEL="Number of days from admission to PR8"

  PRDAY9                     LENGTH=4
  LABEL="Number of days from admission to PR9"

  PRDAY10                    LENGTH=4
  LABEL="Number of days from admission to PR10"

  PRDAY11                    LENGTH=4
  LABEL="Number of days from admission to PR11"

  PRDAY12                    LENGTH=4
  LABEL="Number of days from admission to PR12"

  PRDAY13                    LENGTH=4
  LABEL="Number of days from admission to PR13"

  PRDAY14                    LENGTH=4
  LABEL="Number of days from admission to PR14"

  PRDAY15                    LENGTH=4
  LABEL="Number of days from admission to PR15"

  RACE                       LENGTH=3
  LABEL="Race (uniform)"

  TOTCHG                     LENGTH=6
  LABEL="Total charges (cleaned)"

  TRAN_IN                    LENGTH=3
  LABEL="Transfer in indicator"

  TRAN_OUT                   LENGTH=3
  LABEL="Transfer out indicator"

  YEAR                       LENGTH=3
  LABEL="Calendar year"

  ZIPINC_QRTL                LENGTH=3
  LABEL="Median household income national quartile for patient ZIP Code"
  ;

*** Read data elements from the ASCII file ***;
INPUT 
      @1      AGE                      N3PF.
      @4      AGE_NEONATE              N2PF.
      @6      AMONTH                   N2PF.
      @8      AWEEKEND                 N2PF.
      @10     DIED                     N2PF.
      @12     DISCWT                   N11P7F.
      @23     DISPUNIFORM              N2PF.
      @25     DQTR                     N2PF.
      @27     DRG                      N3PF.
      @30     DRG24                    N3PF.
      @33     DRGVER                   N2PF.
      @35     DRG_NoPOA                N3PF.
      @38     DX1                      $CHAR5.
      @43     DX2                      $CHAR5.
      @48     DX3                      $CHAR5.
      @53     DX4                      $CHAR5.
      @58     DX5                      $CHAR5.
      @63     DX6                      $CHAR5.
      @68     DX7                      $CHAR5.
      @73     DX8                      $CHAR5.
      @78     DX9                      $CHAR5.
      @83     DX10                     $CHAR5.
      @88     DX11                     $CHAR5.
      @93     DX12                     $CHAR5.
      @98     DX13                     $CHAR5.
      @103    DX14                     $CHAR5.
      @108    DX15                     $CHAR5.
      @113    DX16                     $CHAR5.
      @118    DX17                     $CHAR5.
      @123    DX18                     $CHAR5.
      @128    DX19                     $CHAR5.
      @133    DX20                     $CHAR5.
      @138    DX21                     $CHAR5.
      @143    DX22                     $CHAR5.
      @148    DX23                     $CHAR5.
      @153    DX24                     $CHAR5.
      @158    DX25                     $CHAR5.
      @163    DXCCS1                   N3PF.
      @166    DXCCS2                   N3PF.
      @169    DXCCS3                   N3PF.
      @172    DXCCS4                   N3PF.
      @175    DXCCS5                   N3PF.
      @178    DXCCS6                   N3PF.
      @181    DXCCS7                   N3PF.
      @184    DXCCS8                   N3PF.
      @187    DXCCS9                   N3PF.
      @190    DXCCS10                  N3PF.
      @193    DXCCS11                  N3PF.
      @196    DXCCS12                  N3PF.
      @199    DXCCS13                  N3PF.
      @202    DXCCS14                  N3PF.
      @205    DXCCS15                  N3PF.
      @208    DXCCS16                  N3PF.
      @211    DXCCS17                  N3PF.
      @214    DXCCS18                  N3PF.
      @217    DXCCS19                  N3PF.
      @220    DXCCS20                  N3PF.
      @223    DXCCS21                  N3PF.
      @226    DXCCS22                  N3PF.
      @229    DXCCS23                  N3PF.
      @232    DXCCS24                  N3PF.
      @235    DXCCS25                  N3PF.
      @238    ECODE1                   $CHAR5.
      @243    ECODE2                   $CHAR5.
      @248    ECODE3                   $CHAR5.
      @253    ECODE4                   $CHAR5.
      @258    ELECTIVE                 N2PF.
      @260    E_CCS1                   N4PF.
      @264    E_CCS2                   N4PF.
      @268    E_CCS3                   N4PF.
      @272    E_CCS4                   N4PF.
      @276    FEMALE                   N2PF.
      @278    HCUP_ED                  N3PF.
      @281    HOSPBRTH                 N2PF.
      @283    HOSP_DIVISION            N2PF.
      @285    HOSP_NIS                 N5PF.
      @290    KEY_NIS                  N10PF.
      @300    LOS                      N5PF.
      @305    MDC                      N2PF.
      @307    MDC24                    N2PF.
      @309    MDC_NoPOA                N2PF.
      @311    NCHRONIC                 N2PF.
      @313    NDX                      N2PF.
      @315    NECODE                   N3PF.
      @318    NEOMAT                   N2PF.
      @320    NIS_STRATUM              N4PF.
      @324    NPR                      N2PF.
      @326    ORPROC                   N2PF.
      @328    PAY1                     N2PF.
      @330    PL_NCHS                  N3PF.
      @333    PR1                      $CHAR4.
      @337    PR2                      $CHAR4.
      @341    PR3                      $CHAR4.
      @345    PR4                      $CHAR4.
      @349    PR5                      $CHAR4.
      @353    PR6                      $CHAR4.
      @357    PR7                      $CHAR4.
      @361    PR8                      $CHAR4.
      @365    PR9                      $CHAR4.
      @369    PR10                     $CHAR4.
      @373    PR11                     $CHAR4.
      @377    PR12                     $CHAR4.
      @381    PR13                     $CHAR4.
      @385    PR14                     $CHAR4.
      @389    PR15                     $CHAR4.
      @393    PRCCS1                   N3PF.
      @396    PRCCS2                   N3PF.
      @399    PRCCS3                   N3PF.
      @402    PRCCS4                   N3PF.
      @405    PRCCS5                   N3PF.
      @408    PRCCS6                   N3PF.
      @411    PRCCS7                   N3PF.
      @414    PRCCS8                   N3PF.
      @417    PRCCS9                   N3PF.
      @420    PRCCS10                  N3PF.
      @423    PRCCS11                  N3PF.
      @426    PRCCS12                  N3PF.
      @429    PRCCS13                  N3PF.
      @432    PRCCS14                  N3PF.
      @435    PRCCS15                  N3PF.
      @438    PRDAY1                   N3PF.
      @441    PRDAY2                   N3PF.
      @444    PRDAY3                   N3PF.
      @447    PRDAY4                   N3PF.
      @450    PRDAY5                   N3PF.
      @453    PRDAY6                   N3PF.
      @456    PRDAY7                   N3PF.
      @459    PRDAY8                   N3PF.
      @462    PRDAY9                   N3PF.
      @465    PRDAY10                  N3PF.
      @468    PRDAY11                  N3PF.
      @471    PRDAY12                  N3PF.
      @474    PRDAY13                  N3PF.
      @477    PRDAY14                  N3PF.
      @480    PRDAY15                  N3PF.
      @483    RACE                     N2PF.
      @485    TOTCHG                   N10PF.
      @495    TRAN_IN                  N2PF.
      @497    TRAN_OUT                 N2PF.
      @499    YEAR                     N4PF.
      @503    ZIPINC_QRTL              N2PF.
      ;
RUN;

Log of errors and notes

 

 

 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         /*****************************************************************************
 63         * SASload_NIS_2013_Core.SAS
 64         * This program will load the 2013 NIS ASCII Core File into SAS.
 65         *****************************************************************************/
 66         libname nis '/folders/myfolders';
 NOTE: Libref NIS was successfully assigned as follows: 
       Engine:        V9 
       Physical Name: /folders/myfolders
 67         *** Create SAS informats for missing values ***;
 68         PROC FORMAT;
 69           INVALUE N2PF
 70             '-9' = .
 71             '-8' = .A
 72             '-6' = .C
 73             '-5' = .N
 74             OTHER = (|2.|)
 75           ;
 NOTE: Informat N2PF is already on the library WORK.FORMATS.
 NOTE: Informat N2PF has been output.
 76           INVALUE N3PF
 77             '-99' = .
 78             '-88' = .A
 79             '-66' = .C
 80             OTHER = (|3.|)
 81           ;
 NOTE: Informat N3PF is already on the library WORK.FORMATS.
 NOTE: Informat N3PF has been output.
 82           INVALUE N4PF
 83             '-999' = .
 84             '-888' = .A
 85             '-666' = .C
 86             OTHER = (|4.|)
 87           ;
 NOTE: Informat N4PF is already on the library WORK.FORMATS.
 NOTE: Informat N4PF has been output.
 88           INVALUE N4P1F
 89             '-9.9' = .
 90             '-8.8' = .A
 91             '-6.6' = .C
 92             OTHER = (|4.1|)
 93           ;
 NOTE: Informat N4P1F is already on the library WORK.FORMATS.
 NOTE: Informat N4P1F has been output.
 94           INVALUE N5PF
 95             '-9999' = .
 96             '-8888' = .A
 97             '-6666' = .C
 98             OTHER = (|5.|)
 99           ;
 NOTE: Informat N5PF is already on the library WORK.FORMATS.
 NOTE: Informat N5PF has been output.
 100          INVALUE N5P2F
 101            '-9.99' = .
 102            '-8.88' = .A
 103            '-6.66' = .C
 104            OTHER = (|5.2|)
 105          ;
 NOTE: Informat N5P2F is already on the library WORK.FORMATS.
 NOTE: Informat N5P2F has been output.
 106          INVALUE N6PF
 107            '-99999' = .
 108            '-88888' = .A
 109            '-66666' = .C
 110            OTHER = (|6.|)
 111          ;
 NOTE: Informat N6PF is already on the library WORK.FORMATS.
 NOTE: Informat N6PF has been output.
 112          INVALUE N6P2F
 113            '-99.99' = .
 114            '-88.88' = .A
 115            '-66.66' = .C
 116            OTHER = (|6.2|)
 117          ;
 NOTE: Informat N6P2F is already on the library WORK.FORMATS.
 NOTE: Informat N6P2F has been output.
 118          INVALUE N7P2F
 119            '-999.99' = .
 120            '-888.88' = .A
 121            '-666.66' = .C
 122            OTHER = (|7.2|)
 123          ;
 NOTE: Informat N7P2F is already on the library WORK.FORMATS.
 NOTE: Informat N7P2F has been output.
 124          INVALUE N8PF
 125            '-9999999' = .
 126            '-8888888' = .A
 127            '-6666666' = .C
 128            OTHER = (|8.|)
 129          ;
 NOTE: Informat N8PF is already on the library WORK.FORMATS.
 NOTE: Informat N8PF has been output.
 130          INVALUE N8P2F
 131            '-9999.99' = .
 132            '-8888.88' = .A
 133            '-6666.66' = .C
 134            OTHER = (|8.2|)
 135          ;
 NOTE: Informat N8P2F is already on the library WORK.FORMATS.
 NOTE: Informat N8P2F has been output.
 136          INVALUE N8P4F
 137            '-99.9999' = .
 138            '-88.8888' = .A
 139            '-66.6666' = .C
 140            OTHER = (|8.4|)
 141          ;
 NOTE: Informat N8P4F is already on the library WORK.FORMATS.
 NOTE: Informat N8P4F has been output.
 142          INVALUE N10PF
 143            '-999999999' = .
 144            '-888888888' = .A
 145            '-666666666' = .C
 146            OTHER = (|10.|)
 147          ;
 NOTE: Informat N10PF is already on the library WORK.FORMATS.
 NOTE: Informat N10PF has been output.
 148          INVALUE N10P4F
 149            '-9999.9999' = .
 150            '-8888.8888' = .A
 151            '-6666.6666' = .C
 152            OTHER = (|10.4|)
 153          ;
 NOTE: Informat N10P4F is already on the library WORK.FORMATS.
 NOTE: Informat N10P4F has been output.
 154          INVALUE N10P5F
 155            '-999.99999' = .
 156            '-888.88888' = .A
 157            '-666.66666' = .C
 158            OTHER = (|10.5|)
 159          ;
 NOTE: Informat N10P5F is already on the library WORK.FORMATS.
 NOTE: Informat N10P5F has been output.
 160          INVALUE DATE10F
 161            '-999999999' = .
 162            '-888888888' = .A
 163            '-666666666' = .C
 164            OTHER = (|MMDDYY10.|)
 165          ;
 NOTE: Informat DATE10F is already on the library WORK.FORMATS.
 NOTE: Informat DATE10F has been output.
 166          INVALUE N11P7F
 167            '-99.9999999' = .
 168            '-88.8888888' = .A
 169            '-66.6666666' = .C
 170            OTHER = (|11.7|)
 171          ;
 NOTE: Informat N11P7F is already on the library WORK.FORMATS.
 NOTE: Informat N11P7F has been output.
 172          INVALUE N12P2F
 173            '-99999999.99' = .
 174            '-88888888.88' = .A
 175            '-66666666.66' = .C
 176            OTHER = (|12.2|)
 177          ;
 NOTE: Informat N12P2F is already on the library WORK.FORMATS.
 NOTE: Informat N12P2F has been output.
 178          INVALUE N12P5F
 179            '-99999.99999' = .
 180            '-88888.88888' = .A
 181            '-66666.66666' = .C
 182            OTHER = (|12.5|)
 183          ;
 NOTE: Informat N12P5F is already on the library WORK.FORMATS.
 NOTE: Informat N12P5F has been output.
 184          INVALUE N13PF
 185            '-999999999999' = .
 186            '-888888888888' = .A
 187            '-666666666666' = .C
 188            OTHER = (|13.|)
 189          ;
 NOTE: Informat N13PF is already on the library WORK.FORMATS.
 NOTE: Informat N13PF has been output.
 190          INVALUE N15P2F
 191            '-99999999999.99' = .
 192            '-88888888888.88' = .A
 193            '-66666666666.66' = .C
 194            OTHER = (|15.2|)
 195          ;
 NOTE: Informat N15P2F is already on the library WORK.FORMATS.
 NOTE: Informat N15P2F has been output.
 196        RUN;
 
 NOTE: PROCEDURE FORMAT used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 197        
 198        *** Data Step to load the file ***;
 199        "DATA:nis.NIS_2013_Core";
            ________________________
            180
 
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 200        INFILE 'C:\Users\User\Documents\SASUniversityEdition\Core files\NIS_2013\NIS_2013_Core.dat' (2);
            ______
            180
 
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 201        
 202        *** Define data element attributes ***;
 203        ATTRIB
 203        ATTRIB
            ______
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 204          AGE                        LENGTH=3
 205          LABEL="Age in years at admission"
 206        
 207          AGE_NEONATE                LENGTH=3
 208          LABEL="Neonatal age (first 28 days after birth) indicator"
 209        
 210          AMONTH                     LENGTH=3
 211          LABEL="Admission month"
 212        
 213          AWEEKEND                   LENGTH=3
 214          LABEL="Admission day is a weekend"
 215        
 216          DIED                       LENGTH=3
 217          LABEL="Died during hospitalization"
 218        
 219          DISCWT                     LENGTH=8
 220          LABEL="NIS discharge weight"
 221        
 222          DISPUNIFORM                LENGTH=3
 223          LABEL="Disposition of patient (uniform)"
 224        
 225          DQTR                       LENGTH=3
 226          LABEL="Discharge quarter"
 227        
 228          DRG                        LENGTH=3
 229          LABEL="DRG in effect on discharge date"
 230        
 231          DRG24                      LENGTH=3
 232          LABEL="DRG, version 24"
 233        
 234          DRGVER                     LENGTH=3
 235          LABEL="DRG grouper version used on discharge date"
 236        
 237          DRG_NoPOA                  LENGTH=3
 238          LABEL="DRG in use on discharge date, calculated without POA"
 239        
 240          DX1                        LENGTH=$5
 241          LABEL="Diagnosis 1"
 242        
 243          DX2                        LENGTH=$5
 244          LABEL="Diagnosis 2"
 245        
 246          DX3                        LENGTH=$5
 247          LABEL="Diagnosis 3"
 248        
 249          DX4                        LENGTH=$5
 250          LABEL="Diagnosis 4"
 251        
 252          DX5                        LENGTH=$5
 253          LABEL="Diagnosis 5"
 254        
 255          DX6                        LENGTH=$5
 256          LABEL="Diagnosis 6"
 257        
 258          DX7                        LENGTH=$5
 259          LABEL="Diagnosis 7"
 260        
 261          DX8                        LENGTH=$5
 262          LABEL="Diagnosis 8"
 263        
 264          DX9                        LENGTH=$5
 265          LABEL="Diagnosis 9"
 266        
 267          DX10                       LENGTH=$5
 268          LABEL="Diagnosis 10"
 269        
 270          DX11                       LENGTH=$5
 271          LABEL="Diagnosis 11"
 272        
 273          DX12                       LENGTH=$5
 274          LABEL="Diagnosis 12"
 275        
 276          DX13                       LENGTH=$5
 277          LABEL="Diagnosis 13"
 278        
 279          DX14                       LENGTH=$5
 280          LABEL="Diagnosis 14"
 281        
 282          DX15                       LENGTH=$5
 283          LABEL="Diagnosis 15"
 284        
 285          DX16                       LENGTH=$5
 286          LABEL="Diagnosis 16"
 287        
 288          DX17                       LENGTH=$5
 289          LABEL="Diagnosis 17"
 290        
 291          DX18                       LENGTH=$5
 292          LABEL="Diagnosis 18"
 293        
 294          DX19                       LENGTH=$5
 295          LABEL="Diagnosis 19"
 296        
 297          DX20                       LENGTH=$5
 298          LABEL="Diagnosis 20"
 299        
 300          DX21                       LENGTH=$5
 301          LABEL="Diagnosis 21"
 302        
 303          DX22                       LENGTH=$5
 304          LABEL="Diagnosis 22"
 305        
 306          DX23                       LENGTH=$5
 307          LABEL="Diagnosis 23"
 308        
 309          DX24                       LENGTH=$5
 310          LABEL="Diagnosis 24"
 311        
 312          DX25                       LENGTH=$5
 313          LABEL="Diagnosis 25"
 314        
 315          DXCCS1                     LENGTH=3
 316          LABEL="CCS: diagnosis 1"
 317        
 318          DXCCS2                     LENGTH=3
 319          LABEL="CCS: diagnosis 2"
 320        
 321          DXCCS3                     LENGTH=3
 322          LABEL="CCS: diagnosis 3"
 323        
 324          DXCCS4                     LENGTH=3
 325          LABEL="CCS: diagnosis 4"
 326        
 327          DXCCS5                     LENGTH=3
 328          LABEL="CCS: diagnosis 5"
 329        
 330          DXCCS6                     LENGTH=3
 331          LABEL="CCS: diagnosis 6"
 332        
 333          DXCCS7                     LENGTH=3
 334          LABEL="CCS: diagnosis 7"
 335        
 336          DXCCS8                     LENGTH=3
 337          LABEL="CCS: diagnosis 8"
 338        
 339          DXCCS9                     LENGTH=3
 340          LABEL="CCS: diagnosis 9"
 341        
 342          DXCCS10                    LENGTH=3
 343          LABEL="CCS: diagnosis 10"
 344        
 345          DXCCS11                    LENGTH=3
 346          LABEL="CCS: diagnosis 11"
 347        
 348          DXCCS12                    LENGTH=3
 349          LABEL="CCS: diagnosis 12"
 350        
 351          DXCCS13                    LENGTH=3
 352          LABEL="CCS: diagnosis 13"
 353        
 354          DXCCS14                    LENGTH=3
 355          LABEL="CCS: diagnosis 14"
 356        
 357          DXCCS15                    LENGTH=3
 358          LABEL="CCS: diagnosis 15"
 359        
 360          DXCCS16                    LENGTH=3
 361          LABEL="CCS: diagnosis 16"
 362        
 363          DXCCS17                    LENGTH=3
 364          LABEL="CCS: diagnosis 17"
 365        
 366          DXCCS18                    LENGTH=3
 367          LABEL="CCS: diagnosis 18"
 368        
 369          DXCCS19                    LENGTH=3
 370          LABEL="CCS: diagnosis 19"
 371        
 372          DXCCS20                    LENGTH=3
 373          LABEL="CCS: diagnosis 20"
 374        
 375          DXCCS21                    LENGTH=3
 376          LABEL="CCS: diagnosis 21"
 377        
 378          DXCCS22                    LENGTH=3
 379          LABEL="CCS: diagnosis 22"
 380        
 381          DXCCS23                    LENGTH=3
 382          LABEL="CCS: diagnosis 23"
 383        
 384          DXCCS24                    LENGTH=3
 385          LABEL="CCS: diagnosis 24"
 386        
 387          DXCCS25                    LENGTH=3
 388          LABEL="CCS: diagnosis 25"
 389        
 390          ECODE1                     LENGTH=$5
 391          LABEL="E code 1"
 392        
 393          ECODE2                     LENGTH=$5
 394          LABEL="E code 2"
 395        
 396          ECODE3                     LENGTH=$5
 397          LABEL="E code 3"
 398        
 399          ECODE4                     LENGTH=$5
 400          LABEL="E code 4"
 401        
 402          ELECTIVE                   LENGTH=3
 403          LABEL="Elective versus non-elective admission"
 404        
 405          E_CCS1                     LENGTH=3
 406          LABEL="CCS: E Code 1"
 407        
 408          E_CCS2                     LENGTH=3
 409          LABEL="CCS: E Code 2"
 410        
 411          E_CCS3                     LENGTH=3
 412          LABEL="CCS: E Code 3"
 413        
 414          E_CCS4                     LENGTH=3
 415          LABEL="CCS: E Code 4"
 416        
 417          FEMALE                     LENGTH=3
 418          LABEL="Indicator of sex"
 419        
 420          HCUP_ED                    LENGTH=3
 421          LABEL="HCUP Emergency Department service indicator"
 422        
 423          HOSPBRTH                   LENGTH=3
 424          LABEL="Indicator of birth in this hospital"
 425        
 426          HOSP_DIVISION              LENGTH=3            FORMAT=2.
 427          LABEL="Census Division of hospital"
 428        
 429          HOSP_NIS                   LENGTH=4            FORMAT=5.
 430          LABEL="NIS hospital number"
 431        
 432          KEY_NIS                    LENGTH=5            FORMAT=8.
 433          LABEL="NIS record number"
 434        
 435          LOS                        LENGTH=4
 436          LABEL="Length of stay (cleaned)"
 437        
 438          MDC                        LENGTH=3
 439          LABEL="MDC in effect on discharge date"
 440        
 441          MDC24                      LENGTH=3
 442          LABEL="MDC, version 24"
 443        
 444          MDC_NoPOA                  LENGTH=3
 445          LABEL="MDC in use on discharge date, calculated without POA"
 446        
 447          NCHRONIC                   LENGTH=3
 448          LABEL="Number of chronic conditions"
 449        
 450          NDX                        LENGTH=3
 451          LABEL="Number of diagnoses on this record"
 452        
 453          NECODE                     LENGTH=3
 454          LABEL="Number of E codes on this record"
 455        
 456          NEOMAT                     LENGTH=3
 457          LABEL="Neonatal and/or maternal DX and/or PR"
 458        
 459          NIS_STRATUM                LENGTH=4            FORMAT=4.
 460          LABEL="NIS hospital stratum"
 461        
 462          NPR                        LENGTH=3
 463          LABEL="Number of procedures on this record"
 464        
 465          ORPROC                     LENGTH=3
 466          LABEL="Major operating room procedure indicator"
 467        
 468          PAY1                       LENGTH=3
 469          LABEL="Primary expected payer (uniform)"
 470        
 471          PL_NCHS                    LENGTH=3
 472          LABEL="Patient Location: NCHS Urban-Rural Code"
 473        
 474          PR1                        LENGTH=$4
 475          LABEL="Procedure 1"
 476        
 477          PR2                        LENGTH=$4
 478          LABEL="Procedure 2"
 479        
 480          PR3                        LENGTH=$4
 481          LABEL="Procedure 3"
 482        
 483          PR4                        LENGTH=$4
 484          LABEL="Procedure 4"
 485        
 486          PR5                        LENGTH=$4
 487          LABEL="Procedure 5"
 488        
 489          PR6                        LENGTH=$4
 490          LABEL="Procedure 6"
 491        
 492          PR7                        LENGTH=$4
 493          LABEL="Procedure 7"
 494        
 495          PR8                        LENGTH=$4
 496          LABEL="Procedure 8"
 497        
 498          PR9                        LENGTH=$4
 499          LABEL="Procedure 9"
 500        
 501          PR10                       LENGTH=$4
 502          LABEL="Procedure 10"
 503        
 504          PR11                       LENGTH=$4
 505          LABEL="Procedure 11"
 506        
 507          PR12                       LENGTH=$4
 508          LABEL="Procedure 12"
 509        
 510          PR13                       LENGTH=$4
 511          LABEL="Procedure 13"
 512        
 513          PR14                       LENGTH=$4
 514          LABEL="Procedure 14"
 515        
 516          PR15                       LENGTH=$4
 517          LABEL="Procedure 15"
 518        
 519          PRCCS1                     LENGTH=3
 520          LABEL="CCS: procedure 1"
 521        
 522          PRCCS2                     LENGTH=3
 523          LABEL="CCS: procedure 2"
 524        
 525          PRCCS3                     LENGTH=3
 526          LABEL="CCS: procedure 3"
 527        
 528          PRCCS4                     LENGTH=3
 529          LABEL="CCS: procedure 4"
 530        
 531          PRCCS5                     LENGTH=3
 532          LABEL="CCS: procedure 5"
 533        
 534          PRCCS6                     LENGTH=3
 535          LABEL="CCS: procedure 6"
 536        
 537          PRCCS7                     LENGTH=3
 538          LABEL="CCS: procedure 7"
 539        
 540          PRCCS8                     LENGTH=3
 541          LABEL="CCS: procedure 8"
 542        
 543          PRCCS9                     LENGTH=3
 544          LABEL="CCS: procedure 9"
 545        
 546          PRCCS10                    LENGTH=3
 547          LABEL="CCS: procedure 10"
 548        
 549          PRCCS11                    LENGTH=3
 550          LABEL="CCS: procedure 11"
 551        
 552          PRCCS12                    LENGTH=3
 553          LABEL="CCS: procedure 12"
 554        
 555          PRCCS13                    LENGTH=3
 556          LABEL="CCS: procedure 13"
 557        
 558          PRCCS14                    LENGTH=3
 559          LABEL="CCS: procedure 14"
 560        
 561          PRCCS15                    LENGTH=3
 562          LABEL="CCS: procedure 15"
 563        
 564          PRDAY1                     LENGTH=4
 565          LABEL="Number of days from admission to PR1"
 566        
 567          PRDAY2                     LENGTH=4
 568          LABEL="Number of days from admission to PR2"
 569        
 570          PRDAY3                     LENGTH=4
 571          LABEL="Number of days from admission to PR3"
 572        
 573          PRDAY4                     LENGTH=4
 574          LABEL="Number of days from admission to PR4"
 575        
 576          PRDAY5                     LENGTH=4
 577          LABEL="Number of days from admission to PR5"
 578        
 579          PRDAY6                     LENGTH=4
 580          LABEL="Number of days from admission to PR6"
 581        
 582          PRDAY7                     LENGTH=4
 583          LABEL="Number of days from admission to PR7"
 584        
 585          PRDAY8                     LENGTH=4
 586          LABEL="Number of days from admission to PR8"
 587        
 588          PRDAY9                     LENGTH=4
 589          LABEL="Number of days from admission to PR9"
 590        
 591          PRDAY10                    LENGTH=4
 592          LABEL="Number of days from admission to PR10"
 593        
 594          PRDAY11                    LENGTH=4
 595          LABEL="Number of days from admission to PR11"
 596        
 597          PRDAY12                    LENGTH=4
 598          LABEL="Number of days from admission to PR12"
 599        
 600          PRDAY13                    LENGTH=4
 601          LABEL="Number of days from admission to PR13"
 602        
 603          PRDAY14                    LENGTH=4
 604          LABEL="Number of days from admission to PR14"
 605        
 606          PRDAY15                    LENGTH=4
 607          LABEL="Number of days from admission to PR15"
 608        
 609          RACE                       LENGTH=3
 610          LABEL="Race (uniform)"
 611        
 612          TOTCHG                     LENGTH=6
 613          LABEL="Total charges (cleaned)"
 614        
 615          TRAN_IN                    LENGTH=3
 616          LABEL="Transfer in indicator"
 617        
 618          TRAN_OUT                   LENGTH=3
 619          LABEL="Transfer out indicator"
 620        
 621          YEAR                       LENGTH=3
 622          LABEL="Calendar year"
 623        
 624          ZIPINC_QRTL                LENGTH=3
 625          LABEL="Median household income national quartile for patient ZIP Code"
 626          ;
 
 627        
 628        *** Read data elements from the ASCII file ***;
 629        INPUT
 629        INPUT
            _____
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 630              @1      AGE                      N3PF.
 631              @4      AGE_NEONATE              N2PF.
 632              @6      AMONTH                   N2PF.
 633              @8      AWEEKEND                 N2PF.
 634              @10     DIED                     N2PF.
 635              @12     DISCWT                   N11P7F.
 636              @23     DISPUNIFORM              N2PF.
 637              @25     DQTR                     N2PF.
 638              @27     DRG                      N3PF.
 639              @30     DRG24                    N3PF.
 640              @33     DRGVER                   N2PF.
 641              @35     DRG_NoPOA                N3PF.
 642              @38     DX1                      $CHAR5.
 643              @43     DX2                      $CHAR5.
 644              @48     DX3                      $CHAR5.
 645              @53     DX4                      $CHAR5.
 646              @58     DX5                      $CHAR5.
 647              @63     DX6                      $CHAR5.
 648              @68     DX7                      $CHAR5.
 649              @73     DX8                      $CHAR5.
 650              @78     DX9                      $CHAR5.
 651              @83     DX10                     $CHAR5.
 652              @88     DX11                     $CHAR5.
 653              @93     DX12                     $CHAR5.
 654              @98     DX13                     $CHAR5.
 655              @103    DX14                     $CHAR5.
 656              @108    DX15                     $CHAR5.
 657              @113    DX16                     $CHAR5.
 658              @118    DX17                     $CHAR5.
 659              @123    DX18                     $CHAR5.
 660              @128    DX19                     $CHAR5.
 661              @133    DX20                     $CHAR5.
 662              @138    DX21                     $CHAR5.
 663              @143    DX22                     $CHAR5.
 664              @148    DX23                     $CHAR5.
 665              @153    DX24                     $CHAR5.
 666              @158    DX25                     $CHAR5.
 667              @163    DXCCS1                   N3PF.
 668              @166    DXCCS2                   N3PF.
 669              @169    DXCCS3                   N3PF.
 670              @172    DXCCS4                   N3PF.
 671              @175    DXCCS5                   N3PF.
 672              @178    DXCCS6                   N3PF.
 673              @181    DXCCS7                   N3PF.
 674              @184    DXCCS8                   N3PF.
 675              @187    DXCCS9                   N3PF.
 676              @190    DXCCS10                  N3PF.
 677              @193    DXCCS11                  N3PF.
 678              @196    DXCCS12                  N3PF.
 679              @199    DXCCS13                  N3PF.
 680              @202    DXCCS14                  N3PF.
 681              @205    DXCCS15                  N3PF.
 682              @208    DXCCS16                  N3PF.
 683              @211    DXCCS17                  N3PF.
 684              @214    DXCCS18                  N3PF.
 685              @217    DXCCS19                  N3PF.
 686              @220    DXCCS20                  N3PF.
 687              @223    DXCCS21                  N3PF.
 688              @226    DXCCS22                  N3PF.
 689              @229    DXCCS23                  N3PF.
 690              @232    DXCCS24                  N3PF.
 691              @235    DXCCS25                  N3PF.
 692              @238    ECODE1                   $CHAR5.
 693              @243    ECODE2                   $CHAR5.
 694              @248    ECODE3                   $CHAR5.
 695              @253    ECODE4                   $CHAR5.
 696              @258    ELECTIVE                 N2PF.
 697              @260    E_CCS1                   N4PF.
 698              @264    E_CCS2                   N4PF.
 699              @268    E_CCS3                   N4PF.
 700              @272    E_CCS4                   N4PF.
 701              @276    FEMALE                   N2PF.
 702              @278    HCUP_ED                  N3PF.
 703              @281    HOSPBRTH                 N2PF.
 704              @283    HOSP_DIVISION            N2PF.
 705              @285    HOSP_NIS                 N5PF.
 706              @290    KEY_NIS                  N10PF.
 707              @300    LOS                      N5PF.
 708              @305    MDC                      N2PF.
 709              @307    MDC24                    N2PF.
 710              @309    MDC_NoPOA                N2PF.
 711              @311    NCHRONIC                 N2PF.
 712              @313    NDX                      N2PF.
 713              @315    NECODE                   N3PF.
 714              @318    NEOMAT                   N2PF.
 715              @320    NIS_STRATUM              N4PF.
 716              @324    NPR                      N2PF.
 717              @326    ORPROC                   N2PF.
 718              @328    PAY1                     N2PF.
 719              @330    PL_NCHS                  N3PF.
 720              @333    PR1                      $CHAR4.
 721              @337    PR2                      $CHAR4.
 722              @341    PR3                      $CHAR4.
 723              @345    PR4                      $CHAR4.
 724              @349    PR5                      $CHAR4.
 725              @353    PR6                      $CHAR4.
 726              @357    PR7                      $CHAR4.
 727              @361    PR8                      $CHAR4.
 728              @365    PR9                      $CHAR4.
 729              @369    PR10                     $CHAR4.
 730              @373    PR11                     $CHAR4.
 731              @377    PR12                     $CHAR4.
 732              @381    PR13                     $CHAR4.
 733              @385    PR14                     $CHAR4.
 734              @389    PR15                     $CHAR4.
 735              @393    PRCCS1                   N3PF.
 736              @396    PRCCS2                   N3PF.
 737              @399    PRCCS3                   N3PF.
 738              @402    PRCCS4                   N3PF.
 739              @405    PRCCS5                   N3PF.
 740              @408    PRCCS6                   N3PF.
 741              @411    PRCCS7                   N3PF.
 742              @414    PRCCS8                   N3PF.
 743              @417    PRCCS9                   N3PF.
 744              @420    PRCCS10                  N3PF.
 745              @423    PRCCS11                  N3PF.
 746              @426    PRCCS12                  N3PF.
 747              @429    PRCCS13                  N3PF.
 748              @432    PRCCS14                  N3PF.
 749              @435    PRCCS15                  N3PF.
 750              @438    PRDAY1                   N3PF.
 751              @441    PRDAY2                   N3PF.
 752              @444    PRDAY3                   N3PF.
 753              @447    PRDAY4                   N3PF.
 754              @450    PRDAY5                   N3PF.
 755              @453    PRDAY6                   N3PF.
 756              @456    PRDAY7                   N3PF.
 757              @459    PRDAY8                   N3PF.
 758              @462    PRDAY9                   N3PF.
 759              @465    PRDAY10                  N3PF.
 760              @468    PRDAY11                  N3PF.
 761              @471    PRDAY12                  N3PF.
 762              @474    PRDAY13                  N3PF.
 763              @477    PRDAY14                  N3PF.
 764              @480    PRDAY15                  N3PF.
 765              @483    RACE                     N2PF.
 766              @485    TOTCHG                   N10PF.
 767              @495    TRAN_IN                  N2PF.
 768              @497    TRAN_OUT                 N2PF.
 769              @499    YEAR                     N4PF.
 770              @503    ZIPINC_QRTL              N2PF.
 771              ;
 
 772        RUN;
 773        
 774        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 787        

 

Reeza
Super User

Remove the quotes around your data step. 

 

Data nis.core;

Tom
Super User Tom
Super User

Do not put quotes around SAS statements. Just around string literals used to supply SAS with the physical names of files or directories.

DATA nis.NIS_2013_Core;

Do not add extra characters into statements. The full filename should be in quotes in the INFILE statement.

INFILE 'C:\Users\User\Documents\SASUniversityEdition\Core files\NIS_2013\NIS_2013_Core.dat' ;

But that will still not work since most likely your version of SAS will not be able to see your C: drive. Place the files into the shared folder. It is easier if you place it in the same folder as you want to create the SAS dataset.

INFILE '/folders/myfolders/NIS_2013_Core.dat' ;

In the SAS/Studio interface that SAS University Edition uses you can locate the file in the left hand panel and right click on it select properties to find the exact filename to use in the INFILE statement.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 4603 views
  • 0 likes
  • 4 in conversation