1 The SAS System 18:05 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.04 seconds cpu time 0.02 seconds 1 options nocenter; 2 ** To use all available memory, run using ; 3 ** sas -memsize 0m -maxmemquery 0m transpose_nmrc.sas ; 4 *options obs=6; 5 %let t_0 = %sysfunc (datetime()); 6 7 * by Jean Roth, 2003-12-19 ; 8 * Please report any problems or errors to jroth@nber.org 9 * NOTE: This program is distributed under the GNU GPL. 10 * See http://www.gnu.org/licenses/ for details. ; 11 * Copyright 2004 shared by the National Bureau of Economic Research and Jean Roth ; 12 13 %macro loop(fyear=,lyear=); 14 %let UNDERSCORE=2552_10; 15 %let DASH=2552-10; 16 17 *libname library "~/bulk/cost-reports/hosp/&DASH."; 18 libname library "/homes/data/hcris/2552-10"; 19 20 %do year=&fyear. %to &lyear.; 21 proc printto log ="/homes/data/hcris/2552-10/transpose_nmrc&year..log" new; 2 The SAS System 18:05 Monday, April 15, 2019 22 proc printto print="/homes/data/hcris/2552-10/transpose_nmrc&year..lst" new; 23 24 %let indataset=library.nmrc&year. ; 25 %let dataset=library.nmrc&year.t ; 26 27 proc sort data=&indataset. out=xx; 28 by rpt_rec_num; 29 30 *proc print data=xx (obs=6); 31 32 proc transpose data=xx out=&dataset. (drop = _NAME_); 33 by rpt_rec_num; 34 var itm_val_num; 35 id varname; 36 run; 37 38 %let t_1 = %sysfunc (datetime()); 39 %let elapsed = %sysevalf(%sysevalf (&t_1 - &t_0)/60); 40 title3 "Elapsed time: &elapsed. minutes"; 41 *proc print data=&dataset. (obs=6); 42 run; 43 44 %end; 45 %mend; 46 %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 56.55 seconds cpu time 56.91 seconds