Category: SQR

Evaluate in SQR

I did a quick little test on the Evaluate syntax in SQR.  I can’t ever remember how the break statement works and if it is required.  So, here is the test —

Here is the code:

  move 1 to #test
  while #test < 6
    show 'Test = ' #test
    evaluate #test
      when = 1
      when = 2
        show 'evaluated as 1 or 2'
      when = 3
        show 'evaluated as 3'
      when = 4
        show 'evaluated as 4'
      when-other
        show 'evaluated as other'
    end-evaluate
    add 1 to #test
  end-while

Here is the output:

Test = 1.000000
evaluated as 1 or 2
Test = 2.000000
evaluated as 1 or 2
Test = 3.000000
evaluated as 3
Test = 4.000000
evaluated as 4
Test = 5.000000
evaluated as other

SQR Shortcut

Every server should have this shortcut on its desktop:

C:\<path>\sqrw.exe  ? <db user name>/<db password>@<db name> -zifC:\<PS Home>\sqr\pssqr.ini -ic:\<PS Home>\sqr -oc:\temp\sqr.log -fc:\temp\ -printer:pd

This shortcut allows a system administrator to double click on a shortcut, enter an SQR program name, and run the program.  The output goes to the c:\temp directory — both the report and the log.