SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

What are these SAS files?

Reply
N/A
Posts: 1

What are these SAS files?

I'm totally new to SAS, and I'm trying to understand the two attached "SAS" files I received.

The Data.txt file is a fixed-width text file, and the SAS.txt file has the column definitions.

Is there a name for these types of files in SAS?  Is there a way to load them into SQL Server?


Any insight would be greatly appreciated.

Thanks!

Attachment
Attachment
Super User
Posts: 17,840

Re: What are these SAS files?

It sounds like a source file and a skeleton program to import the data. There are no fixed names that I know of, but consider them a text source file and use the formats in the column definition to script a create table statement.

You can use an SSIS import to import a standard fixed width text file, or you could create the table in SAS, connect to SQL using an ODBC connection and upload the data.

The code in SAS to import would be something like:

data have;

infile 'path to file.txt' truncover;

INPUT

         @1   PRVDR_NUM                         $CHAR10.

        @11   SRVY_DT                           $CHAR8. /*YYYYMMDD*/

        @19   CYC_VISIT_DT                      $CHAR8.

        @27   CYC_VISIT_NUM                     3.

        @30   POC_SGN_DT                        $CHAR8.

        @38   LSC_BLDG_CNT                      2.

        @40   SRVY_CMPLTN_DT                    $CHAR8.

;

***************************************************************;

***   SAS LABEL Statement Follows                              ;

***************************************************************;

LABEL

      PRVDR_NUM                         = 'CCN'

      SRVY_DT                           = 'Survey Date'

      CYC_VISIT_DT                      = 'Cycle Visit Date'

      CYC_VISIT_NUM                     = 'Cycle Visit Number'

      POC_SGN_DT                        = 'Administrator Signed POC Date'

      LSC_BLDG_CNT                      = 'Building Count'

      SRVY_CMPLTN_DT                    = 'Survey Completion Date'

;

run;

Ask a Question
Discussion stats
  • 1 reply
  • 260 views
  • 0 likes
  • 2 in conversation