1 The SAS System 18:04 Monday, April 15, 2019 NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software 9.4 (TS1M3 MBCS3170) Licensed to NATIONAL BUREAU OF ECONOMIC RESEARCH, Site 70111350. NOTE: This session is executing on the Linux 3.10.0-957.1.3.el7.x86_64 (LIN X64) platform. NOTE: Updated analytical products: SAS/STAT 14.1 NOTE: Additional host information: Linux LIN X64 3.10.0-957.1.3.el7.x86_64 #1 SMP Mon Nov 26 12:36:06 CST 2018 x86_64 Scientific Linux release 7.6 (Nitrogen) You are running SAS 9. Some SAS 8 files will be automatically converted by the V9 engine; others are incompatible. Please see http://support.sas.com/rnd/migration/planning/platform/64bit.html PROC MIGRATE will preserve current SAS file attributes and is recommended for converting all your SAS libraries from any SAS 8 release to SAS 9. For details and examples, please see http://support.sas.com/rnd/migration/index.html This message is contained in the SAS news file, and is presented upon initialization. Edit the file "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: SAS initialization used: real time 0.32 seconds cpu time 0.03 seconds 1 options nocenter; 2 *options obs=6; 3 4 * by Jean Roth, 2003-12-19 ; 5 * Please report any problems or errors to jroth@nber.org 6 * NOTE: This program is distributed under the GNU GPL. 7 * See http://www.gnu.org/licenses/ for details. ; 8 * Copyright 2004 shared by the National Bureau of Economic Research and Jean Roth ; 9 10 %macro loop(fyear=,lyear=); 11 %let UNDERSCORE=2552_10; 12 %let DASH=2552-10; 13 *libname library "~/bulk/cost-reports/hosp/&DASH."; 14 libname library "/homes/data/hcris/2552-10/"; 15 16 %do year=&fyear. %to &lyear.; 17 proc printto log ="/homes/data/hcris/2552-10/transpose_alpha&year..log" new; 18 proc printto print="/homes/data/hcris/2552-10/transpose_alpha&year..lst" new; 19 20 %let indataset=library.alpha&year. ; 21 %let dataset=library.alpha&year.t ; 2 The SAS System 18:04 Monday, April 15, 2019 22 23 proc sort data=&indataset. out=xx; 24 by rpt_rec_num; 25 26 proc print data=xx (obs=6); 27 28 proc transpose data=xx out=&dataset. (drop = _NAME_); 29 by rpt_rec_num; 30 var alphnmrc_itm_txt; 31 id varname; 32 run; 33 34 proc print data=&dataset. (obs=6); 35 run; 36 37 %end; 38 %mend; 39 %loop(fyear=2010,lyear=2018); NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /homes/data/hcris/2552-10 NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 14.66 seconds cpu time 9.43 seconds