BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Vrin
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

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.


BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

View solution in original post

5 REPLIES 5
Quentin
Super User

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.


BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Vrin
Calcite | Level 5

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

Vrin
Calcite | Level 5

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.

Tom
Super User Tom
Super User

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 ;

Vrin
Calcite | Level 5

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

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 2500 views
  • 3 likes
  • 3 in conversation