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 5.0 by 5 people

  • Currently 5/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: ,

Free Open Source SQR Editor - Notepad++ & Custom Language File

by dstock 30. March 2009 06:57

Often I go to clients where the standard IDE for developing SQRs is Notepad.  Now this will work in a pinch but after staring at that for a few minutes I decided there had to be a better alternative.  With the budget of $0 and needing something immediately, the solution was Notepad++ and a custom language file.

 This solution will provide you with:

  • Syntax Highlighting
  • Syntax Folding ( Collapse Functions \ Procedures )
  • Advanced Find \ Replace Functionality
  • Tabbed Documents 

The setup is quite simple.

  1. Download and Install Notepad++ 
  2. Download my custom User Defined Language File (UserDefineLang.xml (35.43 kb))
  3. Save the UserDefineLang.xml to your%appdata%\Notepad++ directory
  4. If you had Notepad++, Close and Open it.
  5. If you open an SQR file, you should see the syntax properly highlighted, if not go to the language menu and scroll to the bottom and choose SQR.

I have to give credit to some others for their work on the language files as for the most part I have copied and enhanced their version (SQR, PeopleCode,Cobol and PowerShell)
If you are looking for additional languages, the Notepad++ site or a google search should find it for you.

I'm going to follow this up with a few other useful things you can do with Notepad++ and PeopleSoft development.

Update 08-Apr-2009: Check out my new post on syntax checking and running a SQR from within Notepad++!

If you found this useful, please click and look at one of the ads on this page.  It's where I get the money for this site.  Thx 

 

 

Another alternative is you want to pay is:

 SQR Express  ( 30 day trial available ) 

 I've used it as well and it is very good and adds quite a bit of additional functionality.

Be the first to rate this post

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

Tags: , , ,

Open Source | PeopleSoft

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