SQR Function Completion in Notepad++

by dstock 27. April 2009 06:37

To further enhance Notepad++ as an editor for SQRs, I'll show you how to add Function Completion.  Function Completion is where the names of the functions will appear when you type the first letter of the word.  Below is an example:

Notepad++ provides you with the ability to add a custom function list to each user-defined language you added.  In this case I will provide you with function list file and help you configure Notepad++ to recognize it.


Setup Steps:

  1. Ensure you have installed the SQR User-Defined language file.  (See my post here for help with this)
  2. Download and save the file below to your Notepad++ Plugin API directory (by default located at C:\Program Files\Notepad++\plugins\APIs)
    SQR Function Completion XML File(3.61 kb)
    (File name should be saved as sqr.xml.  My blog engine seems to be modifying the filename)
  3. Under the Settings Menu, Choose Preferences
  4. Click on the Backup/Auto-completion tab
  5. Make the "Enable Auto-completion on each input" checkbox checked and the Function Completion radio button is selected
  6. You can also check the Function Parameter hint on input is checked.  (The current version of the SQR file does not include this but I may add it in the future)
  7. Click Close
  8. Restart Notepad++

To test if you were successful:

  1. Open Notepad++
  2. On a new document, Choose Language then SQR  (way at the bottom of the list)
  3. Go back into the document.  Type BE, you should see the function completion appear
  4. Use your arrow keys to scroll through the list and press enter when you are on the procedure you want.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

PeopleSoft

Running SQRs from Notepad++

by dstock 7. April 2009 18:33

In order to further enhance the functionality of Notepad++ when editing a PeopleSoft SQR, it would be great if it could be run from within notepad++ and display the results or just compile the SQR and see if there are any syntax errors.  This can be accomplished with Notepad++ using the NppExec plugin that comes installed by default.

 

Below are the steps to accomplish this task 

  1. Determine the properly command for running a SQR in your environment.

    Example: C:\psoft\FSDEV\bin\sqr\mss\binw\sqrw.exe MySqr.sqr Database/Username/password  -ZIFC:\psoft\FSDEV\sqr\PSSQR.ini -ic:\psoft\FSDEV\custom\sqr\;c:\psoft\FSDEV\sqr\ -oc:\temp\sqr.log

    It's a good idea to ensure you have this part right first.  Also you can see I included Database/Username/Password.  This format is for MSSQL or DB2.  If you are using Oracle, the format is UserName/Password@Database.    If you exclude this option you will be prompted when the SQR runs.

  2. Modfy the above statement so it will use the current document in Notepad++ by replacing the MySqr.sqr with $(FULL_CURRENT_PATH). (We'll use this statement later)

    Example: C:\psoft\FSDEV\bin\sqr\mss\binw\sqrw.exe "$(FULL_CURRENT_PATH)" Database/Username/password  -ZIFC:\psoft\FSDEV\sqr\PSSQR.ini -ic:\psoft\FSDEV\custom\sqr\;c:\psoft\FSDEV\sqr\ -oc:\temp\sqr.log

  3. Open Notepad++.  Click Plugins->NppExec->Execute  (Or press F6)

  4. In the Command(s): box enter the statement from #2 and on the next line enter  CMD /c type yourlogfilepath  (The path after the -o arguement in the command line.
    Example:

    C:\psoft\FSDEV\bin\sqr\mss\binw\sqrw.exe "$(FULL_CURRENT_PATH)" Database/Username/password  -ZIFC:\psoft\FSDEV\sqr\PSSQR.ini -ic:\psoft\FSDEV\custom\sqr\;c:\psoft\FSDEV\sqr\ -oc:\temp\sqr.log
    CMD /c type c:\temp\sqr.log

  5. Click the Save button, type in Run SQR,  Click Save, then click Cancel

  6. We are going to do the same thing for the syntax checking command but the script will have two differents, an extra -RS paramenter for SQRW and a line to delete the compiled SQR.
    So Click Plugins->NppExec->Execute

  7. Enter a script similar to the following: (I've marked the changes in bold)
    C:\psoft\FSDEV\bin\sqr\mss\binw\sqrw.exe "$(FULL_CURRENT_PATH)" Database/Username/password  -RS -ZIFC:\psoft\FSDEV\sqr\PSSQR.ini -ic:\psoft\FSDEV\custom\sqr\;c:\psoft\FSDEV\sqr\ -oc:\temp\sqr.log
    CMD /c type c:\temp\sqr.log
    cmd /c del "$(CURRENT_DIRECTORY)\$(NAME_PART).sqt"

  8. Click Save, Type in Check SQR Syntax, Click Save, then click Cancel

  9. Click Plugins->NppExec->Advanced Options...

  10. From the Associated Scripts Dropdown list, Choose the Run SQR script and click the Add button. Then choose the Check SQR Syntax script from the Dropdown list and click Add

  11. Ensure the checkbox for "Place to the Macros Submenu" is checked and that [Console] "Visible on Start" is Yes, then click OK


  12. You should get a message you need to restart Notepad++.  Once you close and reopen Notepad++, look under the "Macros" menu and you should see your two new commands.

  13. Now we'll take this one step further and associate these two commands so you can use a key to check the syntax or run the sqr
    Click Settings->Shortcut Mapper

  14. Click the "Plugins commands" button, Scroll down until you see your two new commands, Double click on them and enter the key you want to use for each one.  I used F9, F10. Click Close
    ( Becareful the key you choose and if it is used for another purpose you can get some strange results ) . 

  15. Your done!

If you found this helpful, please check out one of the ads on the page.  Thx!

Currently rated 4.1 by 11 people

  • Currently 4.090909/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Open Source | PeopleSoft

New Stock Enterprises Logo and FavIcon

by dstock 2. April 2009 16:27

With the recent change in the website I decided to update my logo.  I still wanted to retain the original feel but update it

I have a couple goals in mind:

1) Make the logo better represent the Stock Enterprises brand at a glance, primarly by incorporating the letters S and E into the design

2) Design a logo that will show up well on a number of mediums and where the detail may not be clear.  The original logo the words "Stock Enterprises" looked poor on faxes as well the drop shadow ended up looking messy.

I've put them below for you to compare

The old logo The new logo


The new logo was created with the Open Source Image Editor - Paint.Net
I highly recommend it and it is one of the first programs I install when I get a new PC.

The other thing I wanted was to have a favicon for my site.  (The icon on the left of your address bar).

Again I used Paint.Net to slim the icon down to 32x32 and then used the free website http://www.favicongenerator.com/ to generate it.

I'm pleased with the way the logo and icon came out and I hope you like them too!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Powered by BlogEngine.NET 1.4.5.0
Theme by Extensive SEO

About the blog

Focusing on PeopleSoft, SQL, PowerShell, C# and anything else that tweaks my interest