Input 在sas中控制输入和输出

Input 在sas中控制输入和输出,input,sas,output,Input,Sas,Output,我有这个作业,但我的教授不是最擅长解释的。我不只是想要答案,而是要有人向我解释这一点。我完全迷路了 数据集orion.discount包含orion Star在其产品上运行的各种折扣信息。 部分猎户座折扣 Product_ID Start_Date End_Date Unit_Sales_Price Discount 210100100027 01MAY2011 31MAY2011 $17.99 70% 2101

我有这个作业,但我的教授不是最擅长解释的。我不只是想要答案,而是要有人向我解释这一点。我完全迷路了

数据集orion.discount包含orion Star在其产品上运行的各种折扣信息。 部分猎户座折扣

    Product_ID    Start_Date     End_Date   Unit_Sales_Price    Discount

  210100100027    01MAY2011    31MAY2011           $17.99      70%
  210100100030    01AUG2011    31AUG2011           $32.99      70%
  210100100033    01AUG2011    31AUG2011          $161.99      70%
  210100100034    01AUG2011    31AUG2011          $187.99      70%
  210100100035    01MAY2011    31MAY2011          $172.99      70%
由于销售出色,2011年12月的所有折扣将在2012年7月重复。2011年12月和2012年7月的折扣都被称为“快乐假期促销”

  • 创建一个名为work.extended的新数据集,其中包含欢乐假期促销的所有折扣

  • 使用WHERE语句只读开始日期为2011年12月1日的观察结果

  • 创建一个新变量,Promotion,它的值为每个观察值的快乐假期

  • 创建另一个新变量“季节”,该变量的值为冬季(12月观测值),夏季(7月观测值)

  • 2012年7月折扣的开始日期应为2012年7月1日,结束日期应为2012年7月31日

  • 删除Unit\u Sales\u Price变量

  • 使用显式输出为每次观察读取写入两个观察值

  • 打印新的数据集。 添加适当的标题
    验证结果。

    这看起来很简单。发布整个数据集,我会看看我是否能用解释产生你想要的结果。你必须向我们解释你在哪里迷路了。对于理解数据库的基本概念和术语的人来说,这看起来非常清楚。您所发布的内容——要求我们进一步扩展您整个任务的各个方面——远远超出了Stack Overflow的范围。欢迎使用Stack Overflow。请阅读并遵循帮助文档中的发布指南。在这里申请。StackOverflow不是编码或教程服务。
    data extended;                   /* creates the work.extended dataset
    drop unit_sales_price;           /* drops the unit_sales_price from the dataset
    set orion.discount;              /* reads from the orion.discount dataset
    where start_date = '01DEC2011'd; /* only those records where date matches
    Promotion = 'Happy Holidays';    /* create new var
    Season = 'Winter';               /* the data step reads in one record at a time
    output;                          /* output the first record
    Season = 'Summer';               /* change the value of season
    Start_date = '01Jul2012'd;       /* change the value of start and end date
    End_date = '31Jul2012'd;
    output;                          /* output second record