Hi All,
I am trying to run a query from the database where I am specifying some accounts, However the accounts I want to specify in the where clause are more than 30,000 so I get the error message
"Submitted code lines longer than 6,000 characters,SAS is unable to process lines longer than 6,000 characters" Is there any way around this?
Are the account names really over 6000 characters long?
If not try inserted some line breaks into your program file so that the lines are not so long.
If you expect an actual human to be able to read and understand the file limit the length of the lines to 80 characters or less.
As Tom said :
If not try inserted some line breaks into your program file so that the lines are not so long.
Are you going to admit that perhaps you created a macro variable to do this?
I may be easier, and certainly won't have that character limit by using a JOIN on a data set that contains the account numbers.
Generic example:
Proc sql; create table want as select b.* from accountstokeep as a left join otherdataset as b on a.accountnumber=b.accountnumber ; quit;
Then change to inner join instead.
Will probably perform better as well.
@moxsh wrote:
Hi All,
I am trying to run a query from the database where I am specifying some accounts, However the accounts I want to specify in the where clause are more than 30,000 so I get the error message
"Submitted code lines longer than 6,000 characters,SAS is unable to process lines longer than 6,000 characters" Is there any way around this?
Looks like something went wrong in the design-phase. Those accounts should be in a dataset, so that you could use a join to get the required output. See first answer by @ballardw
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.
Ready to level-up your skills? Choose your own adventure.