BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
_maldini_
Barite | Level 11

I am trying to generate sample data for these forums. I'm trying to follow these instructions, but I'm not having success. My code and logs are below. Thank you.

 

DATA test_sas_comm;
    SET test
    
    (DROP = Efflux_V1--BH_PreB1_V3);
                   
RUN;

*data set you want to create demo data for;
%let dataSetName = test_sas_comm;
*number of observations you want to keep;
%let obsKeep = 10;

******************************************************
DO NOT CHANGE ANYTHING BELOW THIS LINE
******************************************************;

%let source_path = https://gist.githubusercontent.com/statgeek/bcc55940dd825a13b9c8ca40a904cba9/raw/865d2cf18f5150b8e887218dde0fc3951d0ff15b/data2datastep.sas;

filename reprex url "&source_path";
%include reprex;
filename reprex;

option linesize=max;
%data2datastep(dsn=&dataSetName, obs=&obsKeep);

 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
68
69 DATA test_sas_comm;
70 SET test
71
72 (DROP = Efflux_V1--BH_PreB1_V3);
73
74 RUN;

NOTE: There were 49 observations read from the data set WORK.TEST.
NOTE: The data set WORK.TEST_SAS_COMM has 49 observations and 46 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 1133.68k
OS Memory 32688.00k
Timestamp 01/10/2022 07:43:52 PM
Step Count 213 Switch Count 2
Page Faults 0
Page Reclaims 119
Page Swaps 0
Voluntary Context Switches 9
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264


75
76 *data set you want to create demo data for;
77 %let dataSetName = test_sas_comm;
78 *number of observations you want to keep;
79 %let obsKeep = 10;
80
81 ******************************************************
82 DO NOT CHANGE ANYTHING BELOW THIS LINE
83 ******************************************************;
84
85 %let source_path = https://gist.githubusercontent.com/statgeek/bcc55940dd825a13b9c8ca40a904cba9/raw/865d2cf18f5150b8e88...;
86
87 filename reprex url "&source_path";
88 %include reprex;
249 filename reprex;
NOTE: Fileref REPREX has been deassigned.
250
251 option linesize=max;
252 %data2datastep(dsn=&dataSetName, obs=&obsKeep);
NOTE: No rows were selected.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 5505.78k
OS Memory 37292.00k
Timestamp 01/10/2022 07:43:52 PM
Step Count 214 Switch Count 0
Page Faults 0
Page Reclaims 200
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0


DATA2DATASTEP DSN TEST_SAS_COMM
DATA2DATASTEP FILE homejcorroon/create_WORK_TEST_SAS_COMM_data.sas
DATA2DATASTEP FMT YES
DATA2DATASTEP FMTLIST Participant_ID BEST12. Age BEST12. ALT_V1 BEST12. ALT_V3 BEST12. AST_V1 BEST12. AST_V3 BEST12. AlkPhos_V1 BEST12. AlkPhos_V3 BEST12. Bilirubin_V1 BEST12. Bilirubin_V3 BEST12. Albumin_V1 BEST12. Albumin_V3 BEST12. Globulin_V1 BEST12.
Globulin_V3 BEST12. TotalProt_V1 BEST12. TotalProt_V3 BEST12. AlbGlobRatio_V1 BEST12. AlbGlobRatio_V3 BEST12. BUN_V1 BEST12. BUN_V3 BEST12. Creatinine_V1 BEST12. Creatinine_V3 BEST12. BUNCreatinineRatio_V1 BEST12. BUNCreatinineRatio_V3 BEST12. eGFR_NoA_V1
BEST12. eGFR_NoA_V3 BEST12. eGFR_AA_V1 BEST12. eGFR_AA_V3 BEST12.
DATA2DATASTEP INPUTLIST Participant_ID:BEST12. Group:$1. Sex:$1. Age:BEST12. MPO_Ab_V1:$5. MPO_Ab_V2:$5. MPO_Ab_V3:$4. ALT_V1:BEST12. ALT_V2:$1. ALT_V3:BEST12. AST_V1:BEST12. AST_V2:$1. AST_V3:BEST12. AlkPhos_V1:BEST12. AlkPhos_V2:$1. AlkPhos_V3:BEST12.
Bilirubin_V1:BEST12. Bilirubin_V2:$1. Bilirubin_V3:BEST12. Albumin_V1:BEST12. Albumin_V2:$1. Albumin_V3:BEST12. Globulin_V1:BEST12. Globulin_V2:$1. Globulin_V3:BEST12. TotalProt_V1:BEST12. TotalProt_V2:$1. TotalProt_V3:BEST12. AlbGlobRatio_V1:BEST12.
AlbGlobRatio_V2:$1. AlbGlobRatio_V3:BEST12. BUN_V1:BEST12. BUN_V2:$1. BUN_V3:BEST12. Creatinine_V1:BEST12. Creatinine_V2:$1. Creatinine_V3:BEST12. BUNCreatinineRatio_V1:BEST12. BUNCreatinineRatio_V2:$1. BUNCreatinineRatio_V3:BEST12. eGFR_NoA_V1:BEST12.
eGFR_NoA_V2:$1. eGFR_NoA_V3:BEST12. eGFR_AA_V1:BEST12. eGFR_AA_V2:$1. eGFR_AA_V3:BEST12.
DATA2DATASTEP LBL YES
DATA2DATASTEP LIB WORK
DATA2DATASTEP LS 256
DATA2DATASTEP MEMLABEL
DATA2DATASTEP MSGTYPE NOTE
DATA2DATASTEP OBS 10
DATA2DATASTEP OUTLIB WORK
DATA2DATASTEP SQLEXITCODE 0
DATA2DATASTEP SQLOBS 28
DATA2DATASTEP SQLOOPS 73
DATA2DATASTEP SQLRC 0
DATA2DATASTEP SQLXOBS 0
DATA2DATASTEP SQLXOPENERRS 0
DATA2DATASTEP VARLIST Participant_ID Group Sex Age MPO_Ab_V1 MPO_Ab_V2 MPO_Ab_V3 ALT_V1 ALT_V2 ALT_V3 AST_V1 AST_V2 AST_V3 AlkPhos_V1 AlkPhos_V2 AlkPhos_V3 Bilirubin_V1 Bilirubin_V2 Bilirubin_V3 Albumin_V1 Albumin_V2 Albumin_V3 Globulin_V1 Globulin_V2
Globulin_V3 TotalProt_V1 TotalProt_V2 TotalProt_V3 AlbGlobRatio_V1 AlbGlobRatio_V2 AlbGlobRatio_V3 BUN_V1 BUN_V2 BUN_V3 Creatinine_V1 Creatinine_V2 Creatinine_V3 BUNCreatinineRatio_V1 BUNCreatinineRatio_V2 BUNCreatinineRatio_V3 eGFR_NoA_V1 eGFR_NoA_V2
eGFR_NoA_V3 eGFR_AA_V1 eGFR_AA_V2 eGFR_AA_V3
NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.
NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.
WARNING: Apparent symbolic reference LBLLIST not resolved.

data WORK.TEST_SAS_COMM;
infile datalines dsd truncover;
input Participant_ID:BEST12. Group:$1. Sex:$1. Age:BEST12. MPO_Ab_V1:$5. MPO_Ab_V2:$5. MPO_Ab_V3:$4. ALT_V1:BEST12. ALT_V2:$1. ALT_V3:BEST12. AST_V1:BEST12. AST_V2:$1. AST_V3:BEST12. AlkPhos_V1:BEST12. AlkPhos_V2:$1. AlkPhos_V3:BEST12. Bilirubin_V1:BEST12.
Bilirubin_V2:$1. Bilirubin_V3:BEST12. Albumin_V1:BEST12. Albumin_V2:$1. Albumin_V3:BEST12. Globulin_V1:BEST12. Globulin_V2:$1. Globulin_V3:BEST12. TotalProt_V1:BEST12. TotalProt_V2:$1. TotalProt_V3:BEST12. AlbGlobRatio_V1:BEST12. AlbGlobRatio_V2:$1. AlbGl
obRatio_V3:BEST12. BUN_V1:BEST12. BUN_V2:$1. BUN_V3:BEST12. Creatinine_V1:BEST12. Creatinine_V2:$1. Creatinine_V3:BEST12. BUNCreatinineRatio_V1:BEST12. BUNCreatinineRatio_V2:$1. BUNCreatinineRatio_V3:BEST12. eGFR_NoA_V1:BEST12. eGFR_NoA_V2:$1. eGFR_NoA_V3:
BEST12. eGFR_AA_V1:BEST12. eGFR_AA_V2:$1. eGFR_AA_V3:BEST12.;
format Participant_ID BEST12. Age BEST12. ALT_V1 BEST12. ALT_V3 BEST12. AST_V1 BEST12. AST_V3 BEST12. AlkPhos_V1 BEST12. AlkPhos_V3 BEST12. Bilirubin_V1 BEST12. Bilirubin_V3 BEST12. Albumin_V1 BEST12. Albumin_V3 BEST12. Globulin_V1 BEST12. Globulin_V3 BEST
12. TotalProt_V1 BEST12. TotalProt_V3 BEST12. AlbGlobRatio_V1 BEST12. AlbGlobRatio_V3 BEST12. BUN_V1 BEST12. BUN_V3 BEST12. Creatinine_V1 BEST12. Creatinine_V3 BEST12. BUNCreatinineRatio_V1 BEST12. BUNCreatinineRatio_V3 BEST12. eGFR_NoA_V1 BEST12. eGFR_NoA
_V3 BEST12. eGFR_AA_V1 BEST12. eGFR_AA_V3 BEST12.;
datalines;
1 A M 52 <1.0 <1.0 <1.0 16 16 20 16 58 48 0.4 0.5 4.4 4.5 2.6 2.6 7 7.1 1.7 1.7 16 13 0.92 0.87 . . 95 99 110 115
3 A M 56 <1.0 <1.0 <1.0 43 49 29 30 57 49 0.7 0.5 4.7 4.7 2.7 2.4 7.4 7.1 1.7 2 20 16 1.08 1.08 . . 76 76 88 88
4 B M 67 <1.0 <1.0 <1.0 16 13 20 20 82 89 0.8 1.1 3.8 4.4 2.2 2.2 6 6.6 1.7 2 14 17 0.91 0.9 . . 87 88 101 102
5 A F 65 <1.0 <1.0 <1.0 23 39 26 43 45 45 0.5 0.4 4.3 4.3 2.4 2.2 6.7 6.5 1.58 2 38 36 1.87 1.63 20 22 28 33 32 38
7 A M 69 <1.0 <1.0 <1.0 37 34 27 21 59 75 0.6 0.6 4.1 4.5 2.1 2.3 6.2 6.8 2 2 16 15 0.78 0.8 . . 92 91 107 106
8 B F 68 <1.0 <1.0 <1.0 21 16 19 15 54 58 0.6 0.3 4.5 4.1 2.6 2.5 7.1 6.6 1.7 1.6 22 20 0.83 0.8 . . 72 76 84 88
9 A M 72 <1.0 <1.0 <1.0 15 24 13 21 69 63 0.7 0.9 4.3 4.4 2.5 2.3 6.8 6.7 1.7 1.9 23 25 1.16 1.1 . . 63 67 73 77
10 B M 68 <1.0 <1.0 <1.0 35 15 47 24 59 59 1.2 0.9 4.1 4.2 2.2 2.4 6.3 6.6 1.9 1.8 10 11 0.65 0.75 15 . 100 94 116 109
11 A F 71 <1.0 <1.0 <1.0 19 21 20 21 115 109 0.5 0.5 4.5 4.5 2.7 2.4 7.2 6.9 1.7 1.9 24 23 0.74 0.68 . . 82 87 94 101
12 B M 71 <1.0 <1.0 <1.0 35 47 24 24 73 73 0.5 0.6 4.3 4.6 2.5 2.3 6.8 6.9 1.7 2 79 19 0.97 0.97 . . 76 78 88 91
;;;;
NOTE: There were 10 observations read from the data set WORK.TEST_SAS_COMM.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 788.12k
OS Memory 32428.00k
Timestamp 01/10/2022 07:43:52 PM
Step Count 215 Switch Count 0
Page Faults 0
Page Reclaims 60
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0


253
254
255 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
265 

I copy and paste the DATA step from the log:

data WORK.TEST_SAS_COMM;
   infile datalines dsd truncover;
 input Participant_ID:BEST12. Group:$1. Sex:$1. Age:BEST12. MPO_Ab_V1:$5. MPO_Ab_V2:$5. MPO_Ab_V3:$4. ALT_V1:BEST12. ALT_V2:$1. ALT_V3:BEST12. AST_V1:BEST12. AST_V2:$1. AST_V3:BEST12. AlkPhos_V1:BEST12. AlkPhos_V2:$1. AlkPhos_V3:BEST12. Bilirubin_V1:BEST12.
  Bilirubin_V2:$1. Bilirubin_V3:BEST12. Albumin_V1:BEST12. Albumin_V2:$1. Albumin_V3:BEST12. Globulin_V1:BEST12. Globulin_V2:$1. Globulin_V3:BEST12. TotalProt_V1:BEST12. TotalProt_V2:$1. TotalProt_V3:BEST12. AlbGlobRatio_V1:BEST12. AlbGlobRatio_V2:$1. AlbGl
 obRatio_V3:BEST12. BUN_V1:BEST12. BUN_V2:$1. BUN_V3:BEST12. Creatinine_V1:BEST12. Creatinine_V2:$1. Creatinine_V3:BEST12. BUNCreatinineRatio_V1:BEST12. BUNCreatinineRatio_V2:$1. BUNCreatinineRatio_V3:BEST12. eGFR_NoA_V1:BEST12. eGFR_NoA_V2:$1. eGFR_NoA_V3:
 BEST12. eGFR_AA_V1:BEST12. eGFR_AA_V2:$1. eGFR_AA_V3:BEST12.;
 format Participant_ID BEST12. Age BEST12. ALT_V1 BEST12. ALT_V3 BEST12. AST_V1 BEST12. AST_V3 BEST12. AlkPhos_V1 BEST12. AlkPhos_V3 BEST12. Bilirubin_V1 BEST12. Bilirubin_V3 BEST12. Albumin_V1 BEST12. Albumin_V3 BEST12. Globulin_V1 BEST12. Globulin_V3 BEST
 12. TotalProt_V1 BEST12. TotalProt_V3 BEST12. AlbGlobRatio_V1 BEST12. AlbGlobRatio_V3 BEST12. BUN_V1 BEST12. BUN_V3 BEST12. Creatinine_V1 BEST12. Creatinine_V3 BEST12. BUNCreatinineRatio_V1 BEST12. BUNCreatinineRatio_V3 BEST12. eGFR_NoA_V1 BEST12. eGFR_NoA
 _V3 BEST12. eGFR_AA_V1 BEST12. eGFR_AA_V3 BEST12.;
 datalines;
 1 A M 52 <1.0 <1.0 <1.0 16   16 20   16 58   48 0.4   0.5 4.4   4.5 2.6   2.6 7   7.1 1.7   1.7 16   13 0.92   0.87 .   . 95   99 110   115
 3 A M 56 <1.0 <1.0 <1.0 43   49 29   30 57   49 0.7   0.5 4.7   4.7 2.7   2.4 7.4   7.1 1.7   2 20   16 1.08   1.08 .   . 76   76 88   88
 4 B M 67 <1.0 <1.0 <1.0 16   13 20   20 82   89 0.8   1.1 3.8   4.4 2.2   2.2 6   6.6 1.7   2 14   17 0.91   0.9 .   . 87   88 101   102
 5 A F 65 <1.0 <1.0 <1.0 23   39 26   43 45   45 0.5   0.4 4.3   4.3 2.4   2.2 6.7   6.5 1.58   2 38   36 1.87   1.63 20   22 28   33 32   38
 7 A M 69 <1.0 <1.0 <1.0 37   34 27   21 59   75 0.6   0.6 4.1   4.5 2.1   2.3 6.2   6.8 2   2 16   15 0.78   0.8 .   . 92   91 107   106
 8 B F 68 <1.0 <1.0 <1.0 21   16 19   15 54   58 0.6   0.3 4.5   4.1 2.6   2.5 7.1   6.6 1.7   1.6 22   20 0.83   0.8 .   . 72   76 84   88
 9 A M 72 <1.0 <1.0 <1.0 15   24 13   21 69   63 0.7   0.9 4.3   4.4 2.5   2.3 6.8   6.7 1.7   1.9 23   25 1.16   1.1 .   . 63   67 73   77
 10 B M 68 <1.0 <1.0 <1.0 35   15 47   24 59   59 1.2   0.9 4.1   4.2 2.2   2.4 6.3   6.6 1.9   1.8 10   11 0.65   0.75 15   . 100   94 116   109
 11 A F 71 <1.0 <1.0 <1.0 19   21 20   21 115   109 0.5   0.5 4.5   4.5 2.7   2.4 7.2   6.9 1.7   1.9 24   23 0.74   0.68 .   . 82   87 94   101
 12 B M 71 <1.0 <1.0 <1.0 35   47 24   24 73   73 0.5   0.6 4.3   4.6 2.5   2.3 6.8   6.9 1.7   2 79   19 0.97   0.97 .   . 76   78 88   91
 ;;;;
 RUN;
 

Here is the log: 


1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
68
69 data WORK.TEST_SAS_COMM;
70 infile datalines dsd truncover;
71 input Participant_ID:BEST12. Group:$1. Sex:$1. Age:BEST12. MPO_Ab_V1:$5. MPO_Ab_V2:$5. MPO_Ab_V3:$4. ALT_V1:BEST12. ALT_V2:$1. ALT_V3:BEST12. AST_V1:BEST12. AST_V2:$1. AST_V3:BEST12. AlkPhos_V1:BEST12. AlkPhos_V2:$1. AlkPhos_V3:BEST12.
71 ! Bilirubin_V1:BEST12.
72 Bilirubin_V2:$1. Bilirubin_V3:BEST12. Albumin_V1:BEST12. Albumin_V2:$1. Albumin_V3:BEST12. Globulin_V1:BEST12. Globulin_V2:$1. Globulin_V3:BEST12. TotalProt_V1:BEST12. TotalProt_V2:$1. TotalProt_V3:BEST12. AlbGlobRatio_V1:BEST12.
72 ! AlbGlobRatio_V2:$1. AlbGl
73 obRatio_V3:BEST12. BUN_V1:BEST12. BUN_V2:$1. BUN_V3:BEST12. Creatinine_V1:BEST12. Creatinine_V2:$1. Creatinine_V3:BEST12. BUNCreatinineRatio_V1:BEST12. BUNCreatinineRatio_V2:$1. BUNCreatinineRatio_V3:BEST12. eGFR_NoA_V1:BEST12. eGFR_NoA_V2:$1.
73 ! eGFR_NoA_V3:
74 BEST12. eGFR_AA_V1:BEST12. eGFR_AA_V2:$1. eGFR_AA_V3:BEST12.;
75 format Participant_ID BEST12. Age BEST12. ALT_V1 BEST12. ALT_V3 BEST12. AST_V1 BEST12. AST_V3 BEST12. AlkPhos_V1 BEST12. AlkPhos_V3 BEST12. Bilirubin_V1 BEST12. Bilirubin_V3 BEST12. Albumin_V1 BEST12. Albumin_V3 BEST12. Globulin_V1 BEST12.
75 ! Globulin_V3 BEST
76 12. TotalProt_V1 BEST12. TotalProt_V3 BEST12. AlbGlobRatio_V1 BEST12. AlbGlobRatio_V3 BEST12. BUN_V1 BEST12. BUN_V3 BEST12. Creatinine_V1 BEST12. Creatinine_V3 BEST12. BUNCreatinineRatio_V1 BEST12. BUNCreatinineRatio_V3 BEST12. eGFR_NoA_V1
76 ! BEST12. eGFR_NoA
77 _V3 BEST12. eGFR_AA_V1 BEST12. eGFR_AA_V3 BEST12.;
78 datalines;

NOTE: Variable BEST is uninitialized.
NOTE: Variable AlbGlobRatio_V3 is uninitialized.
NOTE: Variable eGFR_NoA is uninitialized.
NOTE: Variable _V3 is uninitialized.
NOTE: Invalid data for Participant_ID in line 79 1-140.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
79 1 A M 52 <1.0 <1.0 <1.0 16 16 20 16 58 48 0.4 0.5 4.4 4.5 2.6 2.6 7 7.1 1.7 1.7 16
101 13 0.92 0.87 . . 95 99 110 115
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=1
NOTE: Invalid data for Participant_ID in line 80 1-138.
80 3 A M 56 <1.0 <1.0 <1.0 43 49 29 30 57 49 0.7 0.5 4.7 4.7 2.7 2.4 7.4 7.1 1.7 2 20
101 16 1.08 1.08 . . 76 76 88 88
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=2
NOTE: Invalid data for Participant_ID in line 81 1-137.
81 4 B M 67 <1.0 <1.0 <1.0 16 13 20 20 82 89 0.8 1.1 3.8 4.4 2.2 2.2 6 6.6 1.7 2 14
101 17 0.91 0.9 . . 87 88 101 102
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=3
NOTE: Invalid data for Participant_ID in line 82 1-141.
82 5 A F 65 <1.0 <1.0 <1.0 23 39 26 43 45 45 0.5 0.4 4.3 4.3 2.4 2.2 6.7 6.5 1.58 2 38
101 36 1.87 1.63 20 22 28 33 32 38
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=4
NOTE: Invalid data for Participant_ID in line 83 1-137.
83 7 A M 69 <1.0 <1.0 <1.0 37 34 27 21 59 75 0.6 0.6 4.1 4.5 2.1 2.3 6.2 6.8 2 2 16
101 15 0.78 0.8 . . 92 91 107 106
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=5
NOTE: Invalid data for Participant_ID in line 84 1-139.
84 8 B F 68 <1.0 <1.0 <1.0 21 16 19 15 54 58 0.6 0.3 4.5 4.1 2.6 2.5 7.1 6.6 1.7 1.6 2
101 2 20 0.83 0.8 . . 72 76 84 88
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=6
NOTE: Invalid data for Participant_ID in line 85 1-139.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
85 9 A M 72 <1.0 <1.0 <1.0 15 24 13 21 69 63 0.7 0.9 4.3 4.4 2.5 2.3 6.8 6.7 1.7 1.9 2
101 3 25 1.16 1.1 . . 63 67 73 77
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=7
NOTE: Invalid data for Participant_ID in line 86 1-145.
86 10 B M 68 <1.0 <1.0 <1.0 35 15 47 24 59 59 1.2 0.9 4.1 4.2 2.2 2.4 6.3 6.6 1.9 1.8
101 10 11 0.65 0.75 15 . 100 94 116 109
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=8
NOTE: Invalid data for Participant_ID in line 87 1-144.
87 11 A F 71 <1.0 <1.0 <1.0 19 21 20 21 115 109 0.5 0.5 4.5 4.5 2.7 2.4 7.2 6.9 1.7 1.
101 9 24 23 0.74 0.68 . . 82 87 94 101
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=9
NOTE: Invalid data for Participant_ID in line 88 1-139.
88 12 B M 71 <1.0 <1.0 <1.0 35 47 24 24 73 73 0.5 0.6 4.3 4.6 2.5 2.3 6.8 6.9 1.7 2 79
101 19 0.97 0.97 . . 76 78 88 91
Participant_ID=. Group= Sex= Age=. MPO_Ab_V1= MPO_Ab_V2= MPO_Ab_V3= ALT_V1=. ALT_V2= ALT_V3=. AST_V1=. AST_V2= AST_V3=. AlkPhos_V1=. AlkPhos_V2= AlkPhos_V3=. Bilirubin_V1=. Bilirubin_V2= Bilirubin_V3=. Albumin_V1=. Albumin_V2= Albumin_V3=.
Globulin_V1=. Globulin_V2= Globulin_V3=. TotalProt_V1=. TotalProt_V2= TotalProt_V3=. AlbGlobRatio_V1=. AlbGlobRatio_V2= AlbGl=. obRatio_V3=. BUN_V1=. BUN_V2= BUN_V3=. Creatinine_V1=. Creatinine_V2= Creatinine_V3=. BUNCreatinineRatio_V1=.
BUNCreatinineRatio_V2= BUNCreatinineRatio_V3=. eGFR_NoA_V1=. eGFR_NoA_V2= eGFR_NoA_V3=. eGFR_AA_V1=. eGFR_AA_V2= eGFR_AA_V3=. BEST=. AlbGlobRatio_V3=. eGFR_NoA=. _V3=. _ERROR_=1 _N_=10
NOTE: The data set WORK.TEST_SAS_COMM has 10 observations and 51 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.01 seconds
memory 894.90k
OS Memory 32428.00k
Timestamp 01/10/2022 07:41:05 PM
Step Count 207 Switch Count 2
Page Faults 0
Page Reclaims 87
Page Swaps 0
Voluntary Context Switches 11
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 288


89 ;;;;
90 RUN;
91
92
93
94 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
104

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Instead of generating data in the log, it creates it in an external text file instead.
So you update the file= portion to be the file name you want to save the code and check that file for the output instead of the log.
And replace data=sashelp.cass with the data set name you want to be created (data=test_sas_comm).

View solution in original post

5 REPLIES 5
Reeza
Super User

As noted in the post itself, it doesn't always work and there's an alternative suggestion to try, did you try both and both failed?

 

 

_maldini_
Barite | Level 11

I looked at the alternative, but wasn't sure how to implement it. Am I supposed to save the original data set as a txt file?

 

filename tagset url "https://gist.githubusercontent.com/statgeek/7be124b98b37d51e7c002b85b6e9cf72/raw/ec0bc5cf8e1a3386c5cf71d2280b242b7f87dadd/SAS_tagsets_sql_reprex.sas";

%include tagset;

   ods tagsets.sql file="/folders/myfolders/class.txt";
   proc print data=sashelp.class ;
   run;
   ods tagsets.sql close;
Reeza
Super User
Instead of generating data in the log, it creates it in an external text file instead.
So you update the file= portion to be the file name you want to save the code and check that file for the output instead of the log.
And replace data=sashelp.cass with the data set name you want to be created (data=test_sas_comm).

_maldini_
Barite | Level 11

That worked. Thanks.

 

Do I simply attach the .txt file as the data set or do I need to write syntax so that it can be easily written into a data set? 

 

If so, should I follow this example from the original post? Are the numbers in the INPUT statement lengths? 

 

 data WORK.CLASS(label='Student Data');
   infile datalines dsd truncover;
   input Name:$8. Sex:$1. Age:32. Height:32. Weight:32.;
 datalines;
 Alfred M 14 69 112.5
 Alice F 13 56.5 84
 Barbara F 13 65.3 98
 Carol F 14 62.8 102.5
 Henry M 14 63.5 102.5
 ;;;;

 

 

Reeza
Super User
Usually easier to just copy/paste the text into your post, like you did above.
I (and other users) hate downloading files. If I downloaded a file for each question I tried to answer my downloads would get too bogged down.....
Remember to limit it to just a few observations though.

You should be able to run that code successfully on your computer anyways.