Rob
I want to have a column name called FEU in create data statement. I tried to do this any many more variations like sum (ContainersfromPortstoLSPtoDC [p,t,c,d]).
But i get errors. Searched to see they syntax online but was not succesful either.
create data test (where=(ContainersfromPortstoLSPtoDC > 1)) from
[Ports=p Transit=t LSP=c Destination=d]
FEU=ContainersfromPortstoLSPtoDC
The error message should have been something like:
ERROR: Variable ContainersfromPortstoLSPtoDC is not on file WORK.TEST.
The WHERE= clause applies only to variables that are in the data set, so you should instead do:
create data test (where=(FEU > 1)) from
[Ports=p Transit=t LSP=c Destination=d]
FEU=ContainersfromPortstoLSPtoDC
It will really help you get better/quicker answers if when you get errors that you copy the text of the submitted code along with the messages or errors received from the log and paste all the text into a code box opened on the forum with the {I} or "running man" icon.
The code box is important because the log often places characters in the error messages that indicate where the error was determined but the main message windows will reformat white space resulting in those characters moving and becoming less useful.
The entire procedure or data step is important as sometimes the cause of the reported error is something from previous lines of code such as a missing semicolon.
We also sometimes have folks say they are getting errors when the actual message is a note or warning.
Thank you. Yes. I will follow the practice going forward.
The error message should have been something like:
ERROR: Variable ContainersfromPortstoLSPtoDC is not on file WORK.TEST.
The WHERE= clause applies only to variables that are in the data set, so you should instead do:
create data test (where=(FEU > 1)) from
[Ports=p Transit=t LSP=c Destination=d]
FEU=ContainersfromPortstoLSPtoDC
Rob
You are simply awesome. Can't thank you enough.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.