Hi all,
I have an open tech support track on this issue, but I thought I'd throw this out here in case anyone else has run into a similar issue. I have an EG project that has many data inputs, and produces HTML output. One of the data inputs uses datalines to input static data, and it works perfectly fine in EG but produces errors when I convert the project into a stored process. I eventually narrowed down the issue to an anomaly where the datalines text is truncated in the stored process (but not EG), thereby causing long lines to go to the next line and act like a new row of text.
Does anyone know if stored processes have a length limitation where the datalines rows cannot exceed a certain length?
I've attached part of the original code, along with part of the stored process code, to show what is happening. You can see where some lines are moved to the next line in the stored process code (e.g., for the first entry, the words " with this.Software Limitation" are moved down rather than continuing from the previous line).
I am running EG 4.2 on SAS 9.2 on a Linux server.
Any suggestions would be greatly appreciated.
Thank you!
Message was edited by: Pearl OConnor Edited to remove attachments.
Hi,
I'm confused. How are you creating the stored process? Are you using the stored process wizard in EG and pasting code into it? It looks like whatever is generating your stored process code is adding the line breaks you don't want.
It's possible there is a line size limit to the wizard, but I wouldn't think there would be a line size limit to stored processes themselves.
One option would be instead of having all of your code in the stored process source code, leave it in a .sas file on the server. Then have the stored process source code %include the .sas file. I described that approach in a blog post.
Or you could always open the stored process source code after it has been generated by the wizard, and edit it directly to remove the breaks you don't want.
HTH,
--Q.
Hi,
I'm confused. How are you creating the stored process? Are you using the stored process wizard in EG and pasting code into it? It looks like whatever is generating your stored process code is adding the line breaks you don't want.
It's possible there is a line size limit to the wizard, but I wouldn't think there would be a line size limit to stored processes themselves.
One option would be instead of having all of your code in the stored process source code, leave it in a .sas file on the server. Then have the stored process source code %include the .sas file. I described that approach in a blog post.
Or you could always open the stored process source code after it has been generated by the wizard, and edit it directly to remove the breaks you don't want.
HTH,
--Q.
Hi Quentin,
Thanks so much for your suggestions! I was able to solve the issue by storing the static code on the server in a .sas file and then using %include. I had tried creating the stored process directly from the EG project using the wizard, and also by creating a new SP in EG from a blank project then pasting in the code, but no luck. I didn't want to have to go into the SP and manually remove the line breaks, because there are over 9000 lines of code (don't ask - not my choice!).
So using the %include method works nicely. Thanks again for your suggestions!
Have a wonderful day,
Pearl
Oops, I spoke too soon. The %include method eliminated the problem of the datalines text getting truncated to the next line, but they're still getting truncated and the final field values aren't getting picked up. Weird. Looks like it may be something to do with informats or datalines options. But, at least I've eliminated one of my issues. Now to track down the needle in the haystack.
Did you include the LRECL option on the %INCLUDE statement? One of your variables is defined as being 1032 characters long!!
%include 'EG Code.txt' / source2 lrecl=3000 ;
Hi Tom,
Thank you so much for your suggestion! You were correct - once I added that LRECL option to the %include statement, the output returned the correct values for each line.
Thanks again!
Pearl
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.