楼主: supermaria
5504 3

[程序分享] 国泰安数据库手动导入sas代码改善 [推广有奖]

  • 1关注
  • 0粉丝

大专生

21%

还不是VIP/贵宾

-

威望
0
论坛币
29404 个
通用积分
0.5500
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
280 点
帖子
15
精华
0
在线时间
69 小时
注册时间
2015-12-8
最后登录
2024-7-2

楼主
supermaria 学生认证  发表于 2017-3-20 21:01:48 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
选择格式文本格式创建sas文件 txt
国泰安数据库下载完会附带一个导入sas的代码 叫TRD_Dalyr[SAS]
但是用这个完全倒不进去小数点,而且我这个版本的中文label也不行
所以自己改了一下
DATA csmar.a1;(注释:这里可以改名字;把括号里的内容都删了)
Infile 'D:\csmar\1\TRD_Dalyr.txt'(注释:这里改路径) encoding="utf-8" delimiter = '09'x Missover Dsd lrecl=32767 firstobs=2;
Format Stkcd $6.;
Format Trddt $10.;
Format Opnprc 9.3;
Format Hiprc 9.3;
Format Loprc 9.3;
Format Clsprc 9.3;
Format Dnshrtrd 12.;
Format Dnvaltrd 16.3;
Format Dsmvosd 16.2;
Format Dsmvtll 16.2;
Format Dretwd 10.6;
Format Dretnd 10.6;
Format Adjprcwd 14.6;
Format Adjprcnd 14.6;
Format Markettype 10.;
Format Capchgdt $10.;
Format Trdsta 10.;
Informat Stkcd $6.;
Informat Trddt $10.;
Informat Opnprc 9.3;
Informat Hiprc 9.3;
Informat Loprc 9.3;
Informat Clsprc 9.3;
Informat Dnshrtrd 12.;
Informat Dnvaltrd 16.3;
Informat Dsmvosd 16.2;
Informat Dsmvtll 16.2;
Informat Dretwd 10.6;
Informat Dretnd 10.6;
Informat Adjprcwd 14.6;
Informat Adjprcnd 14.6;
Informat Markettype 10.;
Informat Capchgdt $10.;
Informat Trdsta 10.;
Label Stkcd="Trading code";
Label Trddt="Trading date";
Label Opnprc="open price";
Label Hiprc="highest price";
Label Loprc="lowest price";
Label Clsprc="closing price";
Label Dnshrtrd="dayly trading shares";
Label Dnvaltrd="dayly trading value";
Label Dsmvosd="dayly trading market value";
Label Dsmvtll="dayly total market value";
Label Dretwd="dayly return with dividend";
Label Dretnd="dayly return without dividend";
Label Adjprcwd="comparing clsprice with dividend";
Label Adjprcnd="comparing clsprice without dividend";
Label Capchgdt="capital changing date";
Label Trdsta="trading status";
Input Stkcd $ Trddt $ Opnprc Hiprc Loprc Clsprc Dnshrtrd Dnvaltrd Dsmvosd Dsmvtll Dretwd Dretnd Adjprcwd Adjprcnd Markettype Capchgdt $ Trdsta ;
Run;

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:数据库 国泰

已有 1 人评分经验 收起 理由
eijuhz + 20 精彩帖子

总评分: 经验 + 20   查看全部评分

沙发
supermaria 学生认证  发表于 2017-3-20 21:03:03
里面有些地方转行没显示出来 分号转行哈

藤椅
aoyubao 发表于 2017-3-22 14:42:36
您好,我想请教一下,我在国泰安下载个股数据,有20多个txt文件,怎么导入到同一个数据文件里并实现排序呢?

板凳
supermaria 学生认证  发表于 2019-11-6 11:05:19
现在需要把utf-8那里改成utf-16le了

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-2-17 16:48