Desktop productivity for business analysts and programmers

INFILE Statment using &var

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

INFILE Statment using &var

[ Edited ]

Hi,

 

I am using %connect to connect to mainframe and connect to a table i am using macro varible &business2  which i have as a %let statment in another node within my SAS project before this code runs Business2 = 160629, when i put &business2.   by it self the log shows it has resolved to 160629 however in the INFILE it does not like it and log advises WARNING: Apparent symbolic reference BUSINESS2 not resolved.  now i have used different INFILE styles from

   INFILE "EXAW.TF.LA.BEK.TGHUP03.FALCANT.D&Business2";

   INFILE "EXAW.TF.LA.BEK.TGHUP03.FALCANT.D&Business2.";

   INFILE = "EXAW.TF.LA.BEK.TGHUP03.FALCANT.D&Business2";

   INFILE "EXAW.TF.LA.BEK.TGHUP03.FALCANT.D&Business2"

   INFILE "EXAW.TF.LA.BEK.TGHUP03.FALCANT.D&Business2."

 

can anyone help?

 


Accepted Solutions
Solution
‎07-04-2016 10:21 AM
Esteemed Advisor
Posts: 6,661

Re: INFILE Statment using &var

To use a macro variable in rsubmit during a connect session, you first need to use the %syslput statement (in the local context, before the rsubmit) so that the macro variable is created in the remote context.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Solution
‎07-04-2016 10:21 AM
Esteemed Advisor
Posts: 6,661

Re: INFILE Statment using &var

To use a macro variable in rsubmit during a connect session, you first need to use the %syslput statement (in the local context, before the rsubmit) so that the macro variable is created in the remote context.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 10

Re: INFILE Statment using &var

Hi Kurt,

 

Managed to get this to work thanks to your response thank you

Super Contributor
Posts: 406

Re: INFILE Statment using &var

Hi.

 

It is difficult to tell from the code you provide. Can yhou give us the entire rpogram / macro code and the log? Often this kind of error is due to the scope of a variable. Also, try and run your code using 

 

OPTIONS MPRINT MLOGIC SYMBOLGEN;

Thes eporvide valuable troubleshooting info in the log.

 

Regards,

Jan.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 265 views
  • 0 likes
  • 3 in conversation