BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jc3992
Pyrite | Level 9
data adresses; 
infile '/folders/myfolders/Mail.dat'; 
input Name $ 6. Street $ 18. City $ 9. State $ 6.; 
run; 
Title 'Addresses_notsorted'; 
proc print; 
run; 
 
proc sort data=adresses out =sortone 
sortseq=linguistic (NUMERIC_COLLATION=on); 
by street; 
run; 
 
proc print data=sortone; 
Title ='Addresses_sorted_by_street'; 
run; 
1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         data adresses;
 74         infile '/folders/myfolders/Mail.dat';
 75         input Name $ 6. Street $ 18. City $ 9. State $ 6.;
 76         run;
 
 NOTE: The infile '/folders/myfolders/Mail.dat' is:
       Filename=/folders/myfolders/Mail.dat,
       Owner Name=sasdemo,Group Name=sas,
       Access Permission=-rw-rw-r--,
       Last Modified=09Feb2018:21:01:38,
       File Size (bytes)=162
 
 NOTE: 4 records were read from the infile '/folders/myfolders/Mail.dat'.
       The minimum record length was 39.
       The maximum record length was 39.
 NOTE: The data set WORK.ADRESSES has 4 observations and 4 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.00 seconds
       
 
 77         Title 'Addresses_notsorted';
 78         proc print;
 79         run;
 
 NOTE: There were 4 observations read from the data set WORK.ADRESSES.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.06 seconds
       cpu time            0.07 seconds
       
 
 80         
 81         proc sort data=adresses out =sortone
 82         sortseq=linguistic (NUMERIC_COLLATION=on);
 83         by street;
 84         run;
 
 NOTE: There were 4 observations read from the data set WORK.ADRESSES.
 NOTE: The data set WORK.SORTONE has 4 observations and 4 variables.
 NOTE: PROCEDURE SORT used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 85         
 86         proc print data=sortone;
 87         Title ='Addresses_sorted_by_street';
            _____
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 88         run;
 
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 89         
 90         
 91         
 92         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 105        
 User: sasdemo
Messages: 17

Procedure Statements

Hello everyone,

 

I had problem printing out the second "Title" which is  'Addresses_sorted_by_Street'

and the LOG showed that it was an invalid statement.

I have checked out on it several times but I did not realize what I had done wrong.

Can anyone give me a suggestion to modify that?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Compare the TITLE statement that worked, vs. the TITLE statement that failed.  You'll notice a significant difference.

View solution in original post

2 REPLIES 2
Astounding
PROC Star

Compare the TITLE statement that worked, vs. the TITLE statement that failed.  You'll notice a significant difference.

jc3992
Pyrite | Level 9

I found it.....:p

Thank you!

 

Did have blind side...

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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
  • 2 replies
  • 2300 views
  • 2 likes
  • 2 in conversation