sas upload v1.2

Upload: saikat-dutta

Post on 05-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 SAS Upload V1.2

    1/12

    Automated File monitoring using SAS.

    17/06/2012

    GEMHL DWH SUPPORT OFF

    GE - MONEY

    SAIKAT DUTTASAS

    [email protected]

    mailto:[email protected]:[email protected]
  • 7/31/2019 SAS Upload V1.2

    2/12

    2

  • 7/31/2019 SAS Upload V1.2

    3/12

    3

    Confidentiality Statement

    Include the confidentiality statement within the box provided. This has to

    be legally approvedConfidentiality and Non-Disclosure Notice

    The information contained in this document is confidential and proprietary

    to TATA Consultancy Services. This information may not be disclosed,

    duplicated or used for any other purposes. The information contained in

    this document may not be released in whole or in part outside TCS for any

    purpose without the express written permission of TATA Consultancy

    Services.

    Tata Code of Conduct

    We, in our dealings, are self-regulated by a Code of Conduct as enshrined

    in the Tata Code of Conduct. We request your support in helping us adhere

    to the Code in letter and spirit. We request that any violation or potential

    violation of the Code by any person be promptly brought to the notice of

    the Local Ethics Counselor or the Principal Ethics Counselor or the CEO of

    TCS. All communication received in this regard will be treated and kept as

    confidential.

  • 7/31/2019 SAS Upload V1.2

    4/12

    4

  • 7/31/2019 SAS Upload V1.2

    5/12

    Table of Content

    5

  • 7/31/2019 SAS Upload V1.2

    6/12

    1. Introduction

    1.1 Introduction to SAS System:

    SAS/Statistical Analysis Software was started as a statistical data analysis tool, but today it has

    become a popular choice for datawarehousing and datamining in the sectors like

    Pharmaceutical, Banking, Retail etc. Now SAS has become an integrated system of software

    solutions, enabling various tasks like:

    Data entry, retrieval, and management

    Statistical and mathematical analysis.

    Business forecasting and decision support

    Report writing and graphics design

    Applications development.

    However at the core of the SAS System is Base SAS. Base SAS software contains the following:

    a data management facility

    a programming language

    data analysis and reporting utilities

    The capability of SAS as a programming language can be capitalized to deliver much more than

    the above said tasks. It can well be used as a general purpose programming language to solve

    many real life problems and develop some applications. File monitoring is one such example

    where the power of SAS can be leveraged to deliver quality application.

    1.2 Business Scenario :

    In the Datawarehousing Application a lot of files are generated and used. These files are of

    varied importance. Some of these files are used as data sources for the Datawarehouse, someare used as control files to control the dataflow / data-load in the Datawarehouse.

    Another important aspect in DWH is the reports that are generated for the various users of the

    business. Many files are required on daily/weekly/Monthly basis for proper decision-making and

    automated functioning of the business.

    That is why in Datawarehousing environment, the generation of these files are monitored to

    detect the failures early and regenerate it if required.

    1.3 As is process:

    6

  • 7/31/2019 SAS Upload V1.2

    7/12

    There can be scenarios where the different files are monitored manually to see if they havebeen generated. The next step is to check if the file size is according to expectation and if the

    count of the records is according to expectation. This is accomplished by opening the current

    file, some archived files and then observing the record counts. There are some hindering factors

    in this process:

    If the number of files generated is huge, it leads to significant amount of effort, as each

    and every file needs to be opened manually.

    For text files (*.txt), it is not possible to se the count of records easily if it is not explicitly

    added to the report.

    Manually opening the files may lead to the files being updated accidentally/ there format

    may change. For example if a CSV file is opened using excel and then saved again

    accidentally, the format of the CSV file may get changed.

    Different checklists need to be maintained to keep track of the file paths and the files

    already generated.

    1.4 To Be Process:

    The manual monitoring of the generated reports can be replaced by introducing an automated

    application to look into the file paths and check if the files have been generated. Also the files

    can be read to see the record counts and compare with archived reports. The results can bewritten into web-pages which can be accessed from across the business to check real time

    status of the reports.

    2. Building the Application:

    The basic challenges in building the application is to be able to look into the

    file paths and also to be able to read the contents of the file. SAS provides a

    very easy solution to both these problems. In the projects, where SAS is

    already being used for ETL and/or reporting, it does not add to the cost.

    The below sections separately deal with different aspects of creating the

    application. Sample codes are also provided, to aid in understanding.

    2.1 Checking if file is present:

    The first step is to look into the file path to see if the report has been generated for the day.

    This can be accomplished using two methods.

    Using SAS file operation functions.Executing the DOS, DIR command through SAS.

    7

  • 7/31/2019 SAS Upload V1.2

    8/12

    2.1.1 Using SAS file operation functions:

    8

  • 7/31/2019 SAS Upload V1.2

    9/12

    Heading 1

    Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text

    texttexttexttexttexttext. Text

    texttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttext

    texttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttext

    TexttexttexttexttexttexttextTexttexttexttexttexttexttext.

    2.2 Sub-Heading

    Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text

    texttexttexttexttexttext. TexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttext

    texttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttext

    TexttexttexttexttexttexttextTexttexttexttexttexttexttext.

    Text texttexttexttexttexttext:

    Text texttexttexttexttexttext. Text texttexttexttexttexttext. Text texttexttexttexttexttext.

    Text texttexttexttexttexttext.

    Text texttexttexttexttexttext

    9

  • 7/31/2019 SAS Upload V1.2

    10/12

    3. Heading 1

    Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text

    texttexttexttexttexttext. Text

    texttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttext

    texttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttext

    TexttexttexttexttexttexttextTexttexttexttexttexttexttext.

    3.1 Sub-Heading

    Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text

    texttexttexttexttexttext. TexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttext

    texttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttext

    TexttexttexttexttexttexttextTexttexttexttexttexttexttext.

    3.2 Sub-Heading

    Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text

    texttexttexttexttexttext. Text

    texttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttext

    texttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttext

    TexttexttexttexttexttexttextTexttexttexttexttexttexttext.

    3.3 Sub-Heading

    Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text texttexttexttexttexttext.Text

    texttexttexttexttexttext. Text

    texttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttext

    texttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttextTexttexttexttexttexttexttext

    TexttexttexttexttexttexttextTexttexttexttexttexttexttext

    10

  • 7/31/2019 SAS Upload V1.2

    11/12

    11

  • 7/31/2019 SAS Upload V1.2

    12/12

    Contact

    For more information, contact [email protected](Email Id of ISU)

    About Tata Consultancy Services (TCS)

    Tata Consultancy Services is an IT services, consulting and business

    solutions organization that delivers real results to global business,

    ensuring a level of certainty no other firm can match. TCS offers a

    consulting-led, integrated portfolio of IT and IT-enabled infrastructure,

    engineering and assurance services. This is delivered through its uniqueGlobal Network Delivery ModelTM, recognized as the benchmark of

    excellence in software development. A part of the Tata Group, Indias

    largest industrial conglomerate, TCS has a global footprint and is listed on

    the National Stock Exchange and Bombay Stock Exchange in India.

    For more information, visit us at www.tcs.com.

    IT Services

    Business Solutions

    Outsourcing

    All content / information present here is the exclusive property of Tata Consultancy Services Limited (TCS). Thecontent / information contained here is correct at the time of publishing. No material from here may be copied,modified, reproduced, republished, uploaded, transmitted, posted or distributed in any form without prior writtenpermission from TCS. Unauthorized use of the content / information appearing here may violate copyright,trademark and other applicable laws, and could result in criminal or civil penalties. Copyright 2011 TataConsultancy Services Limited

    Thank You

    mailto:[email protected]:[email protected]