본문 바로가기

자격증/SAS BASE

SAS Certification Base Programming 연습문제

  • 문자 → 숫자 자동변환에서 선행공백 관련

https://comp.soft-sys.sas.narkive.com/h97M7xdN/substr-function-with-numeric-argument

 

substr function with numeric argument

Discussion: substr function with numeric argument

comp.soft-sys.sas.narkive.com

 

 

 

  • compilation Step 에서 variable length 관련

http://sasreporter.blogspot.com/2009/07/sas-certification-sample-questions.html

 

sas certification sample questions-part1

1. A raw data file is listed below. 1---+----10---+----20---+--- son Frank 01/31/89 daughter June 12-25-87 brother Samuel 01/17/51 The follo...

sasreporter.blogspot.com

 

 

7. Character variable default length

 

 

  • Character variable truncated after 8 character. (default length)
  • 따라서 animal1 변수는 8 자리에서 잘린다.

 

 

 

 

 

11. @ 로 데이터 불러오기

@ 가 있는 경우 Observation = 7

 

@ 가 있는 경우 Observation = 4

 

 

38. 잘못된 if 구문

 

 

 

 

 

44. Do 반복문

 

  • Do statement execution of the step continues until the value of index exceeds the stop value.

 

(비슷한 예제 - DO loop)

 

 

 

59. total = total + quantity 와  total + quantity 차이

 

 

(유사문제 60번)

 

 

 

63. fist. last.

 

 

Q. What is the number of observation(s) written to the output data set for each region?  (2)

  • 각 region 에 대해 observation 2 개씩 생성됨

 

 

 

 

68. PAGESIZE option

 

 출처 : https://kb.iu.edu/d/aevi

 

In SAS, how can I make my output more readable?

ARCHIVED: In SAS, how can I make my output more readable? This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable. To make your SAS outp

kb.iu.edu

 

 

 

 

 

 

69. YEARCUTOFF = system option.

 

SAS developed the YEARCUTOFF= system option to provide users with a way to handle two digit years.

If we specify the date constant '13apr08'd, we could mean 2008, 1908, or even 1808.

The YEARCUTOFF = system option eliminates this ambiguity by telling SAS the first year of a 100-year span to be used by date informats and functions when SAS encounters a two-digit year.

The default value of YEARCUTOFF is 1920.

In the default case, if SAS encounters a two-digit year in your program between 20 and 99, SAS assumes the date has a prefix of 19. And, if SAS encounters a two-digit year in your program between 00 and 19, SAS assumes the date has a prefix of 20.

 

There are two things you can do if you don't like the way SAS is handling your two-digit dates — either use four-digit dates or use the OPTIONS statement to change the default YEARCUTOFF= option. We'll take a look at two examples now just to make sure we understand how SAS handles two-digit years.

 

 

 

 

 

 

출처 : https://online.stat.psu.edu/stat481/book/export/html/701

 

22.4 - SAS Date System Options

The following SAS program is identical to the previous program except the YEARCUTOFF= system option has been changed to 1950. As before, SAS reads in nine dates that contain two-digit years ranging from 20 to 99, and then from 00 to 19: OPTIONS YEARCUTOFF=

online.stat.psu.edu

 

 

 

 

 

76. Syntax Error

 

(유사문제 77번)

 

 

 

 

78. data error

 

 

 

 

79. 영구적으로 format 할당

 

 

 

 

 

81. format List of catalogs 

  • FMTLIB : 카탈로그 내에 있는 모든 세부정보와 함께 포맷 리스트를 보여준다.
  • FMTSEARCH : 포맷 카탈로그 파일의 위치를 지정하는 옵션

 

 

 

 

 

87. PROC FREQ 에서 사용하는 변수

 

 

 

 

 

89. PROC REPORT 옵션들

 

 

 

 

(유사문제 91번)

PROC REPORT option


PROC REPORT data= dataset_name OPTIONS; RUN;

 

 

OPTIONS

  • WINDOW (wd) : 보고서를 보고서창에 나타나도록한다.
  • NOWINDOWS (nowd) : 보고서를 출력장에 나타나도록 한다.
  • SPLIT =  : 변수명을 두 줄 이상으로 나눌 때의 문자를 지정한다.
  • HEADLINE : 열 제목과 제목들 사이 간격에 밑줄을 친다.
  • HEADSKIP : 열 제목 아래 또는 headline 옵션을 사용했다면 밑줄 뒤에 빈 줄을 쓴다.

 

 

출처 : https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=itsmesyeon&logNo=140149350546 

 

목록과 요약보고서 생성 PROC REPORT

다양한 보고서를 단일 보고서 작성도구를 사용하여 만들기 위해선 PROC REPORT를 사용할 수 있다...

blog.naver.com


 

 

90. define 변수 / order;    

 

 

 

 

 

 

 

 

92. define 변수 / across;

 

 

'자격증 > SAS BASE' 카테고리의 다른 글

SAS Crambible 143~204  (0) 2023.01.21
Sample Questions (Project)  (0) 2023.01.20
SAS Crambible 정리  (2) 2023.01.16
SAS Crambible 103 ~ 139.  (1) 2023.01.15
Chapter 5. Reading SAS Data Sets  (0) 2023.01.06