Simplify logging into Sage Pro when developing/debugging

You can use the KEYBOARD command to auto login into Sage Pro and
select an application.

Use the auto login only in a "development/debugging test environment"
as you will lose security.

Here is how (in Sage Pro 7.4:

- This is for auto login
Modify pro.prg and before line 4633 (that calls u_getus) give
** Auto login
KEYBOARD "ADMN{Enter}ADMN{Enter}"

- This is to choose an application at startup
Modify pro.prg and at line 5227 (2 lines after it displays
"Select initial application...." give
** Select Purchase orders
KEYBOARD "{ALT-F}OO"

The above two help you to go to the application w/o having to type
anything once you launch Sage Pro.

Sage Pro debugging during transaction rollback

When debugging Sage Pro during the save and that process is part of a
transaction and it throws a dialog, you cannot hit Ctrl+F9 to go to
the line causing the error. This is even if you have SBTDUTIL=ON.

There is a different windows environment variable that you can use
here. It is called TRANPOS.

In your Windows user settings if you add this variable and set it to
ON then it will break whenever the transaction gets an error. Use this
if you are debugging during transaction rollback

VFP 9 and ICASE

VFP 9 has a new useful function (especially for reports) named ICASE.
This helps where you had to do IIF(...(IIF...(IF now you can do it
using ICASE in a simpler way

Example (you can run it from command prompt):
Before:

FOR ln_count = 1 TO 4
DO CASE
CASE ln_count = 1
gc_cstmeth = "A"
CASE ln_count = 2
gc_cstmeth = "F"
CASE ln_count = 3
gc_cstmeth = "C"
CASE ln_count = 4
gc_cstmeth = " "
ENDCASE

? IIF(gc_cstmeth = "A", "Average", IIF(gc_cstmeth = "F", "FIFO",
IIF(gc_cstmeth = "L", "LIFO", "Not entered")))
NEXT

Now, using ICase
FOR ln_count = 1 TO 4
DO CASE
CASE ln_count = 1
gc_cstmeth = "A"
CASE ln_count = 2
gc_cstmeth = "F"
CASE ln_count = 3
gc_cstmeth = "C"
CASE ln_count = 4
gc_cstmeth = " "
ENDCASE

? ICASE(gc_cstmeth = "A", "Average", gc_cstmeth = "F", "FIFO",
gc_cstmeth = "L", "LIFO", "Not Entered")
NEXT