Sunday, November 17, 2013

Why the notepad is such a cool feature in 2E

The notepad feature in 2E is used by most of us during our development.

More often than not its a case of loading the notepad via the NR or NA commands and then navigate to the target function and insert the logic using the NI command.   We generally use it as a Copy function across function boundaries.

This is pretty neat but there is a particular flaw with this.

The notepad in its default configuration is session bound.  i.e. log in tomorrow and it'll be empty.  In fact its slightly worse than that.  Once you have exited all open programs the notepad is cleared.  This means you may often find yourself reloading the notepads with the relevant code.

Imagine a maintenance scenarios where you are visiting 10, 20, 50 or 250 programs to apply the same maintenance......

Thankfully, our friends at Synon/CA have had a little hidden gem for years and years and it amazes me that nearly every site I go to, no one has ever heard of this little feature.

Firstly, let's understand the science.  The notepad is basically and execute internal function that isn't saved.  What the developers did was to effectively allow us to configure a function that will be saved.

Here's how to go about setting this up at your site.
  • Create a structure called #Notepads or any other name that suits your site standards.  I prefer to have a structure file so all developers notepads are in one place rather than added to a business entity.
  • Create a function similar to those in the screen print below.  The choice is yours how you name it of whether its an EIF or EEF.
  • Now go to the services menu (The F17 one) and take option 11 Edit model profile (YEDTMDLPRF).  Towards the bottom of the screen you will see a section for configuring your notepad.

And that it pretty much it.  You will now get asked if you wish to save the notepad when you use it but it remains over many sessions.  You will also have guessed that you can have many of these 'code snippets' waiting for you.

About the only fly in the ointment is that the notepad can get locked out with multiple sessions but if using for cut and paste I believe the benefits outweigh this.

Thanks for reading.
Lee.

Monday, June 10, 2013

Those pesky little 2E errors we all make

After 8 months in the Plex and 2E badlands (employment break).  I am back working in the 2E space for a fantastic company based in Sydney.  I've been super busy with this work and have had little spare time to blog.  Sorry!

I've dusted off my old tips and technique guides and thought it was about time I finished off some of the 2E stuff that I had planned.

Today I'd thought I'd touch on a few 101's.  You know the simple errors we have all made.  The content is aimed a junior or new developers but I encourage the very experienced to also contribute to the debate as I am sure there are other examples.

If you do choose to comment and add to this.  Thank You.

Room 101!

I started writing this list a few months ago and it was added to every time I or a colleague (main culprits) made one of those simple mistakes!  In no particular order....


  1. If you want your RTVOBJ to return the values of a 'RTV All Record' call then it is important to put the *MOVE ALL from DB1 to PAR inside. ;-)  I guarantee that every 2E site on the planet has a set of these.
  2. If you want to promote your programs via CM, then ensure they are on the correct model list, otherwise the stay where they are. :-)
  3. If you want to edit a source member ensure that you use '2' to edit and not '5' to display. :-)
  4. It's not really that important to worry about change control when files are in QTEMP :-)
  5. When debugging ensure you have the option for debugging production files set to *YES :-P
  6. If calling a 2E program via a CLP wrapper (API), remember to put the *return code in the parameter interface.
  7. *QUIT in a Internal Function is NOT a good thing to do if you were trying to exit the code block quicker.
  8. When waiting around for a generate and compilation to complete make sure that you have pressed enter and confirmed!!!!
  9. Don't try to generate a function you have open in another session :-)
  10. If your program relies on a new file or access path, make sure that it is compiled AND/OR moved to the correct library first :-)
  11. If you plan to do a rollback using Test Bench ensure that you have set the checkpoint in the first place.
This list will be expanded over time......


Thanks for reading.
Lee.