Hi,
I am creating pmenu associating various procs. Actually when i run the coding sas is throwing some errors, i solved some errors, but these errors i couldn't identify.
Code explanation: hote-booking-demand (1) is the file where i stored all the created procs.
pgmproc is the filename of procprint associating the dialog box. gchart,report,content,sgplot,boxplot,month are the procs i created those i would like to display as pull down menu. I couldnt understand the error. Looking for help to solve this please..
proc pmenu catalog=hotel.mycatalog; filename pgmproc 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).pgmproc.sas'; filename gchart 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).gchart.sas'; filename report 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).report.sas'; filename content 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).content.sas'; filename sgplot 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).sgplot.sas'; filename boxplot 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).boxplot.sas'; filename month 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).month.sas'; menu myproject; item 'Findings' menu=f; item 'Data Analysis' selection=d; item 'Explore Dataset' selection=e; item 'Visualization by charts' selection=v; item 'Help' menu=h; menu f; item 'Findings' dialog=d1; menu d; item 'No of total bookings' selection=gchart; item 'No of repeated guests' selection=report; item 'Go back' selection=g; selection g 'end'; menu e; item 'Dataset content' selection=content; menu v; item 'Canceleation ratio' selection=sgplot; item 'Hotel Rates' selection=boxplot; item 'High demand month' selection=month; menu h; item 'help' selection=h; selection h 'end'; selection gchart 'end;pgm;include gchart;submit'; selection report 'end;pgm;include report;submit'; selection content 'end;pgm;include content;submit'; selection sgplot 'end;pgm;include sgplot;submit'; selection boxplot 'end;pgm;include boxplot;submit'; selection month 'end;pgm;include month;submit'; dialog d1 'end;pgm;include procpgm;c hotel %1;c year @1;c country &1;c month @2;submit'; text #1 @1 'Select a hotel'; radiobox default=1; rbutton #3 @5 'Resort Hotel' color=blue substitute='Resort Hotel'; rbutton #4 @5 'City Hotel' color=blue substitute='City Hotel'; text #6 @1 'Enter an year from 2015,2016,2017'; text #6 @6 len=4; text #8 @1 'Choose a country'; checkbox default=1; checkbox #9 @5 'PRT' substitute='PRT'; checkbox #9 @10 'GBR' substitute='GBR'; text #11 @1 'Enter a month:'; text #11 @6 len=4; quit; #Here is the Log report# proc pmenu catalog=hotel.mycatalog; 964 filename pgmproc 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).pgmproc.sas' ------------------- 49 964! ; 965 filename gchart 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).gchart.sas' ------------------- 49 965! ; 966 filename report 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).report.sas' -------------------- 49 966! ; 967 filename content 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).content.sas' ------------------- 49 967! ; 968 filename sgplot 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).sgplot.sas' -------------------- 49 968! ; 969 filename boxplot 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).boxplot.sas' ------------------ 49 969! ; 970 filename month 'C:\Users\Prithi\Downloads\hotel-booking-demand (1).month.sas' ----------------------- 49 970! ; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 971 972 973 menu myproject; 974 item 'Findings' menu=f; 975 item 'Data Analysis' -------------------- 49 975! selection=d; 976 item 'Explore Dataset' -------------------- 49 976! selection=e; 977 item 'Visualization by charts' -------------------- 49 977! selection=v; 978 item 'Help' - 49 978! menu=h; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 979 980 menu f; 981 item 'Findings' dialog=d; 982 983 984 menu d; 985 item 'No of total bookings' selection=gchart; 986 item 'No of repeated guests' ------------------------- 49 986! selection=report; 987 item 'Go back' - 49 987! selection=g; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 988 selection g 'end'; 989 990 menu e; 991 item 'Dataset content' - 49 991! selection=content; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 992 993 menu v; 994 item 'Canceleation ratio' ------------------------- 49 994! selection=sgplot; 995 item 'Hotel Rates' - 49 995! selection=boxplot; 996 item 'High demand month' - 49 996! selection=month; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 997 NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. 998 menu h; NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. 999 item 'help' - 49 999! selection=h; NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. 1000 selection h 'end' - 49 1000! ; NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 1001 NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. 1002 selection gchart 'end;pgm;include gchart;submit'; --- ------- -------------------- 180 180 49 ------ 180 NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. 1003 selection report 'end;pgm;include report;submit'; --- ------- --------------------- 180 180 49 ------ 180 1004 selection content 'end;pgm;include content;submit'; --- ------- -------------------- 180 180 49 ------ 180 NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. 1005 selection sgplot 'end;pgm;include sgplot;submit'; --- ------- --------------------- 180 180 49 ------ 180 1006 selection boxplot 'end;pgm;include boxplot;submit'; --- ------- ------------------- 180 180 49 ------ 180 1007 selection month 'end;pgm;include month;submit'; --- ------- ------------ 180 180 49 ------ 180 ERROR 180-322: Statement is not valid or it is used out of proper order. NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 1008 1009 dialog d 'end;pgm;include procpgm;c hotel %1;c year @1;c country &1;c month @2;submit'; --- ------- - - - - -------------- 180 180 180 180 180 180 49 ------ 180 1010 text #1 @1 'Select a hotel' - 49 1010! ; ERROR 180-322: Statement is not valid or it is used out of proper order. NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 1011 radiobox default=1; 1012 rbutton #3 @5 'Resort Hotel' color=blue substitute='Resort Hotel'; ------------------------- ----------------- 49 49 1013 rbutton #4 @5 'City Hotel' color=blue substitute='City Hotel'; ------------------------- -------------- 49 49 1014 text #6 @1 'Enter an year from 2015,2016,2017' ------------------------------- 49 1014! ; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 1015 text #6 @6 len=4; 1016 text #8 @1 'Choose a country' - 49 1016! ; NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 1017 checkbox default=1; 1018 checkbox #9 @5 'PRT' substitute='PRT'; -------------- ------------------- 49 49 1019 checkbox #9 @10 'GBR' substitute='GBR'; -------------- --------------- 49 49 NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. 1020 text #11 @1 'Enter a month:'; 1021 text #11 @6 len=4; 1022 quit;
Try removing FILENAME statements from PROC PMENU. A FILENAME statement should used in SAS open code and not embedded in a SAS procedure. You can reference the files directly with your include statement:
'end;pgm;include "C:\Users\Prithi\Downloads\hotel-booking-demand (1).pgmproc.sas";submit';
You seem to have a string of non-displayable characters following your (closing) quotes. Retype those statements by hand (no copy/pasting from other sources) and see if the NOTEs go away.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.