Welcome to the world of building web apps on SAS - probably the best way to use SAS (imho)!
I reproduced your code as a stored process using the MacroCore library here:
https://gist.github.com/allanbowe/4e2bb87250450381389e74f8e45a3a02.js
I then opened Developer tools (F11) and saw the following errors:
After a trying a few things, I realised you were hit with probably one of the hardest-to-detect errors in SAS.
The line length limit! Your program editor has a limit to the number of characters in a line of code. Anything longer than approx 1000, and your code is just truncated, without a message.
I split your code into several put statements and it worked:
The final code is here: https://gist.github.com/allanbowe/1dbb3cc64e430d2f385bb26d27773019
For the future, you will find it much easier to build web apps on SAS using the Web Server. Simply put your html / css/ js files in the static content folder, and call SAS using an adapter (such as SASjs). An example (minimal) seed app for doing this is provided here: https://github.com/macropeople/minimal-seed-app
A full React example is here: https://github.com/macropeople/react-seed-app
And here's a video of putting it together in 5 mins: https://www.youtube.com/watch?v=vSNBea_M8yU
An end to end guide for building web apps on SAS is available here: https://sasjs.io
Now, in case you are saying - "I don't have access to the SAS Web Server and my admin will never leave his cave to even respond to that request" - there is another solution, that doesn't involve hours of copy pasting put statements and apostrophes.
That is - sasjs-cli
This is a client tool that handles the compilation of SAS (backend) data services, and also FRONTEND files such as HTML / CSS / Javascript. It will wrap your frontend files in put statements, and automatically 'split' them to prevent lines over 120 characters. You can work locally in your favourite editor, with all your SAS / frontend files tidily arranged in your GIT repo, and simply build / deploy when ready. The pre-requisite - NodeJS (version 12+).
The workflow:
# install the tool globally (one time)
npm install -g sasjs-cli
# create a new project
sasjs create myapp
cd myapp
# all your SAS files are under sas/services/(subfolder)
# your frontend goes in a folder in the root
# update sas/config.json to set streamweb:true and websourcepath:yourwebfolder
sasjs build
that's it - you now have a deploy script under the `sasbuild` folder that will stream your frontend, and connect it to your backend services.
Enjoy.
... View more