SAS Explorer Tips for SAS/AF
- Create GenDoc documentation
- Using the enhanced editor
- Creating .class entries from .scl entries
- Exporting an SCL entry
- Exporting all SCL entries of catalog
- Exploring folders containing SAS objects
- Browse AF Entries
- Debug AF Entries
Create GenDoc documentation for a class, interface, resource, or frame entryStep 1. Compile this SCL in init: classEntry = getNitemC ( getNitemL ( envlist('L') , '_CMDLIST_' ) , 'CLASSENTRY', 1, 1, '' ); if classEntry ne ' ' then rc = CreateDoc (classEntry, 'C:\temp\classdoc'); return; Step 2. Add a CreateDoc action to each of the class, interface, resource, or frame registered types 1. Highlight the explorer window. 2. Select Tools>Options=>Explorer 3. Select Catalog Entries from the File selector 4. Select The Class entry from the registered types 5. Select the Edit Button 6. Select the Add Button 7. In the Action field enter Create&Doc In the Action Command field enter AFA C=COMMON.UTILS.GENDOC.SCL CLASSENTRY=%8b.%32b.%32b.%8b; wbrowse "C:\temp\classdoc\%8b\%32b\%32b.htm" |
Using the enhanced editor with SCL entriesFrom SAS Note SN-004191 1. Highlight the explorer window. 2. Select Tools>Options=>Explorer 3. Select Catalog Entries from the File selector 4. Select The SCL entry from the registered types 5. Select the Edit Button 6. Select the Add Button 7. In the Action field enter &Enhanced Open In the Action Command field enter Whostedit Entry="%8b.%32b.%32b.%8b" |
Creating .class entries from .scl entries containing CLASS statementThis tip should only be used for SCL entries known to contain CLASS statements. SCL entries that are class defining contain a CLASS statement. At present there is no process for allowing the SAS Explorer Options dialog (used to add items to the context menu) to examine the content of the item being operated on. This means the context menu cannot determine the special case of class defining SCL. Note: The gendoc guidelines indicate that if class entry xyz.class is defined by an SCL entry, then the SCL entry should be named xyzclass.scl (this is so that the special GenDoc comment can be included in any documentation created by GenDoc.) 1. Highlight the explorer window. 2. Select Tools>Options=>Explorer 3. Select Catalog Entries from the File selector 4. Select The SCL entry from the registered types 5. Select the Edit Button 6. Select the Add Button 7. In the Action field enter Save&class In the Action Command field enter BUILD %8b.%32b.%32b.%8b;SAVECLASS;END |
Exporting an SCL entryAdd an Export SCL action to the registered type class 1. Highlight the explorer window. 2. Select Tools>Options=>Explorer 3. Select Catalog Entries from the dropdown selector 4. Select the SCL item from the registered types 5. Select the Edit Button 6. Select the Add Button 7. In the Action field enter E&xport SCL In the Action Command field enter BUILD %8b.%32b.%32b.%8b; FILE "C:\TEMP\%8b.%32b.%32b.%8b"; CANCEL |
Exporting all SCL entries of a catalogAdd an Export Source & SCL Entries action to the registered member catalog 1. Highlight the explorer window. 2. Select Tools>Options=>Explorer 3. Select Members from the dropdown selector 4. Select the CATALOG item from the registered types 5. Select the Edit Button 6. Select the Add Button 7. In the Action field enter Export Source & SCL Entries In the Action Command field enter afa c=example.catout.thebag.frame from=%8b.%32b
|
Exploring folders containing SAS thingsI often want to use plain old Windows Explorer to root around a folder containing a catalog, table or view of interest. You can customize your SAS Explorer as follows. Click in the SAS/Explorer window - select menu Tools/Options/Explorer... (or issue command EXPOPTS) - select CATALOG, click Edit - click Add Action: Explore Containing Folder Action Command: gsubmit "options noxwait noxsync;"; x "Explorer /e,""%%sysfunc(pathname(%8b))""" Repeat for registered types TABLE and VIEW Note: Unix afficionados can replace Explorer with a suitable Unix file manager. |
Browse AF entriesAdd a Browse action to AF related registered types SCL, Frame, Class 1. Highlight the explorer window. 2. Select Tools>Options=>Explorer 3. Select Catalog Entries from the File selector 4. Select The SCL entry from the registered types 5. Select the Edit Button 6. Select the Add Button 7. In the Action field enter &Browse In the Action Command field enter BUILD %8b.%32b.%32b.%8b BROWSE=YES Repeat for registered types FRAME and CLASS |
Debug FramesAdd a Debug action to registered type Frame 1. Highlight the explorer window. 2. Select Tools>Options=>Explorer 3. Select Catalog Entries from the File selector 4. Select The Frame entry from the registered types 5. Select the Edit Button 6. Select the Add Button 7. In the Action field enter &Debug In the Action Command field enter AFA C=%8b.%32b.%32b.%8b DEBUG=YES Note: The SCL code invoked by running the frame must have been previously compiled for debugging. |