BookmarkSubscribeRSS Feed
ucvikas
Obsidian | Level 7

Hi All,

I am using SAS EG 4.3 with sas 9.2 in linux . Whenever I export codes from SAS Enterprise guide to some external files(notepad or putty in linux) I see some lines of code goes to next line.

may be after certain width. Is there any way to change settings somewhere so that I get my code exactly coded in SAS EG i.e without going to next line?

From execution point of view it is not a problem but I loose readability in exported file.

Also after export I transfer file to linux and use putty with VI editor to open it.

For example

*******************************************************************************************;

* CLEARS                                                                                                 exlinee*;

*******************************************************************************************;

becomes as below in exported files

*******************************************************************************************;

*

CLEARS

*;

*******************************************************************************************;

10 REPLIES 10
RW9
Diamond | Level 26 RW9
Diamond | Level 26

It looks to me like you are tabbing things across the screen.  The tab character is interpreted in different editors to mean different spacing.  The way to fix this is to not use the tab character, but to put spaces in.  SAS Enhanced Editor (not sure about EG) has the ability to replace tabs with spaces so you can still press the tab key.  This is under, Tools->Options->Enhanced Editor.  You can select replace tabs with blanks, and how many blanks.  I tend to put 2 for a tab.  Try just using spaces, it should fix your problem, although why is exlinee in the first an not the second?

ucvikas
Obsidian | Level 7

I set option "insert spaces to tabs" in SAS EG - options-sas programs-editor options. But of no help. I have always used spaces instead of tab.

to do testing if it helps , I wrote only few lines and notice that if statement is going beyond column 80 then in exported code sas statement goes to next line where it finds first space before column 80 .

If I have only ******************************************************************************************************************************************************;

going beyond 80 columns then apparently SAS considers it one string and in exported code it remains on same line.

Is it true? can we change it somewhere ? Or at least does SAS has any documentation on this?

regarding "exlinee" . I do not know how did it arrive there but it was not in my editor when I pasted.

TomKari
Onyx | Level 15

How are you exporting it? I only have EG 6.1, but the following two methods don't introduce the problem you're describing:

- Copy and paste into a Notepad session;

- Highlight the program in the process flow, and click Export | Export Program...

Tom

ucvikas
Obsidian | Level 7

When I paste in notepad file it is not a problem. it arises only when I do export program. I wanted to share some screenshot but SAS page is not doing that for the moment. so I can't upload images.

ballardw
Super User

In NOTEPAD ensure that the FORMAT menu item Word Wrap is not checked. If it is then Notepad wraps the text to fit the displayed window size. It has nothing to do with the actual length of the line you export but the size of the window.

I would look for something similar related to Putty.

ucvikas
Obsidian | Level 7

I tried to uncheck 'word wrap' and it did not help.

I tried to upload some images which could have helped in much better way to understand this issue. But looks like that SAS community page is not allowing to upload the images .

CaseySmith
SAS Employee

This is a bug in EG 4.3 that was fixed in EG 5.1 (and later).  I am easily able to reproduce this issue in EG 4.3 (by pasting the "For example" code in the original post into a code node, then selecting Export->Export Program... to export).  I also confirmed the issue does not occur in 5.1, 6.1, 7.1, or 7.11.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

ucvikas
Obsidian | Level 7

Thanks CaseyS@SAS. Do you have any SAS note or paper where this is mentioned . I ask just to refer in detail if possible.

CaseySmith
SAS Employee

I found the entry in our internal tracking system related to this issue, but I did not find an associated SAS Note, and I doubt it is covered in any paper.  I confirmed it was a bug in 4.3 and has been fixed.

A little more detail:

The cause of the bug is the fact that EG 4.3 attempted to auto-wrap code lines when exporting, so that the line lengths would not be too long (thus more likely to run on other servers with potentially different line length limits).  EG 5.1 and later do not attempt to auto-wrap code lines when exporting, both since we weren't able to do it reliably in all scenarios and since the more reasonable expectation is that exported code will be *exactly* the same (line lengths and all) as what was in the editor.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 10 replies
  • 2351 views
  • 3 likes
  • 6 in conversation