Wednesday, July 9, 2014

First SQR Program

1.Open Production Reporting Studio
2.Open SQR Editor
3.Copy below code and save as fisrtSQRprogram.sqr

begin-program
print 'A Startup Program' (1,1)
end-program






4.Click on Process (select any database)

5.Output looks like for above fisrtSQRprogram.sqr






output file is in SQR Portable Format (recognizable by its SPF extension).

Lets understand the above SQR coding.
  • It consists of three lines of code, starting with BEGIN-PROGRAM and ending with END-PROGRAM.
  • These two commands and the code between them define the PROGRAM section, which is used to control the order of processing.
  • The PROGRAM section is required, and you may have only one. It is typically placed at or near the top of the program.
  • The PROGRAM section contains a PRINT command, which in this case prints the text “A Startup Program” 



No comments:

Post a Comment