LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 2 May 2010 23:12:10 -0400
Reply-To:     "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Subject:      Re: Enhancements to SAS editors: was Notes from SAS Global Forum
Comments: To: Alan Churchill <alan.churchill@SAVIAN.NET>
In-Reply-To:  <00af01caea65$9a4d3cb0$cee7b610$@savian.net>
Content-Type: text/plain; charset="us-ascii"

Another feature of KEDIT, it's mainframe predecessor XEDIT, and I presume ISPF, is the ability to hide columns, thereby showing columns 1-20 contiguous with, say, columns 60-80. Very handy for examining raw data, when you want to confirm the presence of certain data values in widely separated parts of the data record.

MK

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Alan Churchill > Sent: Sunday, May 02, 2010 10:09 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: Enhancements to SAS editors: was Notes from SAS Global > Forum > > Nat, > > Personally, I would use a regex in ultraedit to do what you indicated. > Regex, though, may be difficult for some people who aren't used to that > low-level detail. > > This is a good case to have a) SAS R&D add it to their list, b) have > someone > write an EG Add-In that contains this functionality. > > Personally, I would like to see b because I think the user community > should > start participating and sharing code. > > Alan > > Alan Churchill > Savian > Work: 719-687-5954 > Cell: 719-310-4870 > > > -----Original Message----- > From: Nat Wooding [mailto:nathani@VERIZON.NET] > Sent: Sunday, May 02, 2010 8:18 AM > Subject: Enhancements to SAS editors: was Notes from SAS Global Forum > > I just looked at the EG discussion group on SAS Community but decided > to > place the following thoughts on the L. It seemed time to change the > subject > line to be more meaningful. > > There is a feature in the ISPF editor on the mainframe that I sorely > miss in > the Windows environment and value to the point that I will move a pc > file to > the mainframe in order to have it available. In the ISPF editor, one > has the > ability to "exclude" or hide all of the lines of text (or just a few if > that > is useful) in a file. Then, one may issue find commands to locate the > occurances of strings and the entire line is displayed wherever the > string(s) is/are found. This is very nice if you need to change a > variable > name and need to ensure that what you are changing is actually what you > want > to change. For example, if you want to change "DATE", you do not want > to > change the format "DATE.". Yes, in the windows editor, you can do a > find/replace and step through them one at a time but in the ISPF > scenario, > you can display all of the occurances and muse over them before making > a > global change or you can do a repeat find/replace and select the > desired > changes. > > I have long used this feature when I needed to locate a program or some > bit > of code. In Windows, I can now give programs much more meaningful names > than > on Z/OS but sometimes the names still do not help. On Z/OS, there is a > tool > called Proc Source which will copy each file in a directory (there are > some > nuances to that I am going to ignore) and place them in a single text > file > along with a line that identifies the original program. When you open > this > "flat" file with the editor, you may > > 1) exclude all the lines > 2) start doing "find all" for the program name lines as well as title > lines > or some other suitable strings. > 3) Once you find the programs with the items suggest that that they may > be > candidates, you may quickly delete the large excluded blocks that are > not of > interest and > 4) unexclude the text and start looking for the desired program or code > elements. > > You may, of course, do a Windows search for specific strings but you > are > then presented with a list of files that must be opened one a time. A > while > back, I wrote a PC SAS program that will extract the SAS programs from > one > or more folders and dump them in much the same manner as Proc Source. > Using > the "flat" file, I can either use the DM find feature or move the file > to > the mainframe where the really useful tools live. > > For those who might find the program of interest, here 'tis. > > Birdies: Are you listening? > > Nat > > dm 'log;clear;output;clear;pgm;'; > > ** note that the member name is not correct. the scan function is not > recognizing the slashes > > ** as delimiter. reported as us 6125345 > > ** note that the ./ add card may need a bit of editing on the mainframe > > ** SearchText > > ** Nat Wooding > > ** Dominion Virginia Power > > ** March, 2003 > > ** > > ** this code lists the statements of any files in a given path that > have the > extension > > ** SAS. The code is displayed in the sas log and the name of the file > is > also shown. > > ** The output window may be searched for specific strings using the > find > option in the > > ** SAS pull down Find command; > > > > data a; > > filename txt ('u:\my sas files\natsas\pgms 2005\*.sas', > > 'u:\my sas files\natsas\pgms 200\8*.sas'); > > length file $ 50; > > infile txt filename=file lrecl=80 truncover; > > informat txt $72.; > > input txt $ 1-72;; > > if index(file,'7bdat') then delete;* do not include sas data sets; > > source=file; > > > source=scan(source,-2 ); > > /* now, add a break between the code from each file. */ > > run; > > > > data a; > > set a; > > by notsorted source; > > if first.source then do; > > hold=txt; > > txt='./add name ='||source ;* the ./add here is for use if I want to > > * to move the programs to the mainframe. > > * note that it also sticks the file name at the > > *front ; > > output; > > txt=hold; > > output; > > end; > > else output; > > drop hold; > > * you now have your sas code in a sas data set which you could write to > a > flat file > > and edit if you wish. > > *; > > data a; > > set; > > filename new 'c:\park\upload storage.txt'; > > file new; > > put txt; > > proc print; > > run;


Back to: Top of message | Previous page | Main SAS-L page