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!
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.