I just changed the LRECL=64000 to LRECL=6400 and that did the trick, along with producing the variable names at the top of the delimited file. Thanks so much!
Tom, one more question: If I know that my data library will always have the same format--e.g., XXXXXXX.SAS._______--can I modify the ds=catx('.','SASDATA',sas_mb); line to reflect that, or should it be modified somewhere else? It would definitely help shorten the amount of keystrokes.
You can do anything you want. That is the beauty of programming.
Since I'm somewhat new to using macros in SAS, can you make a suggestion for how that would look? I can take a few stabs at it myself, but have already spent many hours trying to make the previous program work without success and would like to wrap this up.
It looks to me like you are talking about constructing the file name that MVS is using for SAS data library, not the member name.
So currently you are asking the user to type the full path and storing it in the variable SAS_LB.
If instead you ask them to provide only part of the name you can then build the rest from that piece.
So if type FRED you will use it to build XXXXX.SAS.FRED.
If you leave the window statement the same then after the display statement you could modify SAS_LB like this
SAS_LB = CATX('.','XXXXX.SAS',sas_lb) ;
Then the rest of the program would stay the same.
That was very helpful, Tom! Thanks so very much for all of your help!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.