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

Hi-

 

In EG 5.1 I was able to view, edit, and save different file types within EG; in EG 7.1 I get a 'View Results?' window that shows results in an external viewer(Notepad).

 

I would like to be able to edit .sh files in 7.1 like I was able to in 5.1- it's easier to follow and edit every step involved in a process without having to jump 'outside' of EG.

 

I write a lot of shell scripts to run sas programs and being able to edit them inside EG 5.1 made things easy to keep track of- is there any way to do this in 7.1?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
CaseySmith
SAS Employee

The behavior changed in EG 7.12 as a side-effect of improvements made related to external file handling (support adding any file to EG project, able to open in OS default application, open containing folder, etc).  Prior to 7.12, unrecognized file types (not explicitly handled by EG) would always be opened in the EG text editor by default (this obviously doesn't make sense for non-text file formats, but can be nice for text-based file formats, like script files).  Starting in 7.12, file types unrecognized by EG are opened by the Windows associated application by default instead.

 

It is certainly not obvious (which we hope to improve in a future release), but you can override the new behavior and explicitly instruct EG to open a file (such as .sh) in the EG text editor.  It can be accomplished in EG 7.12 and later by unchecking Tools->Options->Data->Data General->"Automatically import data when added to project", then click File->Open->Other to bring up the file open dialog, navigate to your .sh file, click the Open dropdown, and select "Text" or "Text with Encoding".  EG's "text" viewer is then associated with that node as long as it exists in the EG project.

 

As @Patrick noted, it was improved in EG 7.13 with the addition of the Tools->Options->Results->Viewer->"File extensions to open as text by default" option.  If you add "sh" (and any other desired extensions), EG will open files with those extensions in the EG editor by default (without having to use the "Open As" dropdown steps mentioned above).  (Note: We are adding "sh", "ksh", "ps1" extensions to the option by default in the next release.)

 

We are considering for a future release an even more intuitive, "Open in EG Text Editor" context menu item on file shortcut nodes, that would allow users to easily open any file shortcut into the EG text editor at any time.

 

One final note...  while it causes no harm, the "View Results?" pane that is currently displayed when opening nodes that reference external files is unecessary.  Rather, the external file (which can't be rendered by any EG viewers by default) should be immediately opened by the OS default application instead.  We are making this change in the next 7.13 update.


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

View now: on-demand content for SAS users

View solution in original post

9 REPLIES 9
Patrick
Opal | Level 21

I believe that's a simple option setting - and someone might have changed it as part of the EG upgrade at your site.

Capture.PNG

cjinsf
Obsidian | Level 7

Thanks- but I don't have 'File extensions to open as text by default' as an option; is this something that needs to be included as part of the install?

Capture.JPG

Patrick
Opal | Level 21

My EG version is 7.13 HF1

 

What do you get when clicking on More (F1)....

cjinsf
Obsidian | Level 7

Thanks for taking the time to help!

 

clicking 'more' brings up the Help window (capture below).

 

We are running 7.12 HF6 

 

When we upgraded from 5.1 to 7.1 we mirrored all the 5.1 options during the actual EG UI install process on windows computers; I wasn't there when we upgraded SAS to a new linux server, but I do have access to all the SAS tools (delpoyment manager, etc).

 

Not sure how to check if an option to associate file types like you have was missed during install...

 

 

 

 

 

 

 

 

 

 

 

sashelp.JPG

Patrick
Opal | Level 21

My help page looks the same than yours.

 

I was hoping for someone like @ChrisHemedinger to join in and provide an answer but if this doesn't happen soon then I'd suggest that you contact SAS TechSupport with this question. There must be a way to get what you want.

ChrisHemedinger
Community Manager

Hi @cjinsf -- I don't see a way to make this work in 7.1, but I'll double-check with the dev team.  I know that they have improved the way that EG interacts with external editors (detecting file changes, allowing you to open certain files with your "Windows default" application), but I don't see a way to use the built-in editor to open these "non-SAS" file types.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
cjinsf
Obsidian | Level 7

Thank you guys for your help!

CaseySmith
SAS Employee

The behavior changed in EG 7.12 as a side-effect of improvements made related to external file handling (support adding any file to EG project, able to open in OS default application, open containing folder, etc).  Prior to 7.12, unrecognized file types (not explicitly handled by EG) would always be opened in the EG text editor by default (this obviously doesn't make sense for non-text file formats, but can be nice for text-based file formats, like script files).  Starting in 7.12, file types unrecognized by EG are opened by the Windows associated application by default instead.

 

It is certainly not obvious (which we hope to improve in a future release), but you can override the new behavior and explicitly instruct EG to open a file (such as .sh) in the EG text editor.  It can be accomplished in EG 7.12 and later by unchecking Tools->Options->Data->Data General->"Automatically import data when added to project", then click File->Open->Other to bring up the file open dialog, navigate to your .sh file, click the Open dropdown, and select "Text" or "Text with Encoding".  EG's "text" viewer is then associated with that node as long as it exists in the EG project.

 

As @Patrick noted, it was improved in EG 7.13 with the addition of the Tools->Options->Results->Viewer->"File extensions to open as text by default" option.  If you add "sh" (and any other desired extensions), EG will open files with those extensions in the EG editor by default (without having to use the "Open As" dropdown steps mentioned above).  (Note: We are adding "sh", "ksh", "ps1" extensions to the option by default in the next release.)

 

We are considering for a future release an even more intuitive, "Open in EG Text Editor" context menu item on file shortcut nodes, that would allow users to easily open any file shortcut into the EG text editor at any time.

 

One final note...  while it causes no harm, the "View Results?" pane that is currently displayed when opening nodes that reference external files is unecessary.  Rather, the external file (which can't be rendered by any EG viewers by default) should be immediately opened by the OS default application instead.  We are making this change in the next 7.13 update.


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

View now: on-demand content for SAS users

cjinsf
Obsidian | Level 7

Thank you so much!  Would have never thought of 'Open/ Other'...; never had a reason to navigate to it so it got ignored.

 

Thanks everyone, and thank you Casey for the detailed explanation!

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
  • 9 replies
  • 2539 views
  • 2 likes
  • 4 in conversation