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

I am running SAS EG 7.1 on WIndows 10, I am getting an error on this line of code

 

     infile = "&path&&varImportLog" delimiter = "|" firstobs = 8 ;

 

the error is shown below and is hitting on delimiter and firstobs


     22 22
     ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, ;, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT,
     IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=.

 

The macro variables are assigned in a a program that runs right before this program. I have confirmed that program did indeed run and the macro variables are assigned. The file is on a server, not my local computer and I have confirmed that the file does indeed exist and the name is correct.I have also attached the log, if needed.

 

options obs= 135 ;

data importedLog ;
     infile = "&path&&varImportLog" delimiter = "|" firstobs = 8 ;
informat filler1 $10. ;
informat filler2 $5. ;
informat filler3 $13. ;
informat filler4 $7. ;
informat filler5 $10. ;
informat filler6 $65. ;
informat logMeta $70. ;
run ;

options obs=max ;

 

LOG HERE:

1 The SAS System 07:46 Tuesday, July 28, 2020

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='ARIS Data Movement';
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5 %LET _CLIENTPROJECTPATH='Y:\RCT+ARIS Production\Weekend Data Validation\Load Validation 7.1 Version.egp';
6 %LET _CLIENTPROJECTPATHHOST='PP730BRRQ2';
7 %LET _CLIENTPROJECTNAME='Load Validation 7.1 Version.egp';
8 %LET _SASPROGRAMFILE='Y:\RCT+ARIS Production\Weekend Data Validation\ARIS Data Movement.sas';
9 %LET _SASPROGRAMFILEHOST='PP730BRRQ2';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=PNG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 FILENAME EGSR TEMP;
15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16 STYLE=HtmlBlue
17 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
18 NOGTITLE
19 NOGFOOTNOTE
20 GPATH=&sasworklocation
21 ENCODING=UTF8
22 options(rolap="on")
23 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26 /* # ##################################################
27 # Program...............: ARIS Data Movement
28 # Programmer............: Jeffrey Lowe
29 # Date..................: 07.27.2020
30 # ##################################################
31
32 # ##################################################
33 # Data Movement Validation Procedure - ARIS Import
34 # ##################################################
35
36 # ##################################################
37 # This program will automate the weekly validation
38 # process performed every Sunday morning. There are
39 # three major procedures that perform validation.
40 #
41 # This is procedure 2 of 3
42 #
43 # The program uses the Import Only log file.
44 #
45 # Procedure 1: ARIS Data Load Validation Procedure
46 # Procedure 2: Data Movement Validation Procedure - ARIS Import
47 # Procedure 3: Data Movement Validation Procedure - RCT Import
48 # ##################################################
49 */
50
51 * Procedure 2: Data Movement Validation Procedure - ARIS Import ;
52
53 options obs= 135 ;
54
55 data importedLog ;
56 %let _EFIERR_ = 0 ;
57 infile = "&path&&varImportLog" delimiter = "|" firstobs = 8 ;
2 The SAS System 07:46 Tuesday, July 28, 2020

_________ ________
22 22
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, ;, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT,
IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=.

58 informat filler1 $10. ;
59 informat filler2 $5. ;
60 informat filler3 $13. ;
61 informat filler4 $7. ;
62 informat filler5 $10. ;
63 informat filler6 $65. ;
64 informat logMeta $70. ;
65
66 if _ERROR_ then call symputx('_EFIERR_',1);
67 run ;

NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
57:45 57:2
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.IMPORTEDLOG may be incomplete. When this step was stopped there were 0 observations and 10 variables.
WARNING: Data set WORK.IMPORTEDLOG was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

68
69 options obs=max ;
70
71 GOPTIONS NOACCESSIBLE;
72 %LET _CLIENTTASKLABEL=;
73 %LET _CLIENTPROCESSFLOWNAME=;
74 %LET _CLIENTPROJECTPATH=;
75 %LET _CLIENTPROJECTPATHHOST=;
76 %LET _CLIENTPROJECTNAME=;
77 %LET _SASPROGRAMFILE=;
78 %LET _SASPROGRAMFILEHOST=;
79
80 ;*';*";*/;quit;run;
81 ODS _ALL_ CLOSE;
82
83
84 QUIT; RUN;
85

1 ACCEPTED SOLUTION
4 REPLIES 4
JeffreyLowe
Obsidian | Level 7

Oh good Lord, how embarrassing! Log that under "can't see the forest for the trees" Thanks for not calling me out on that stupidity. Much appreciated!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1249 views
  • 0 likes
  • 2 in conversation