     /*******************************************************/
     /* This report script will create a report of all      */
     /* users, sorted by security level and name.  The      */
     /* output will be sent to a disk file called USERS.TXT */
     /*******************************************************/

     /*******************************************************/
     /* Note that the report scripts look a great deal like */
     /* C code!  ALL report script commands are in upper    */
     /* case.  References to user file or message file      */
     /* fields are detailed in the documentation.           */
     /*******************************************************/


     /*******************************************************/
     /* All report scripts must begin with START            */
     /*******************************************************/

START


     /*******************************************************/
     /* Virtual fields are used within the report.  They    */
     /* are normally used to provide computations.  For     */
     /* instance, the username field is taking the user's   */
     /* first name and last name, striping off the spaces   */
     /* and then joining the two names together.            */
     /*******************************************************/


VIRTUAL

  userfile      STRING  32      "C:\GAP\MAIN\USERS.DAT"
  username      STRING  32      STRIP(first) # " " # STRIP(last)




     /*******************************************************/
     /* The SEARCH section is where you tell the report     */
     /* generator how to search the file.  In this case, we */
     /* are searching by the userindex.  The same way you   */
     /* see the users in GAPUSER.                           */
     /*******************************************************/


SEARCH 

  FILE userfile USING_KEY user_index



     /*******************************************************/
     /* The SELECTION section is where you tell the report  */
     /* generator how to select individual records.  For    */
     /* instance, you could tell it to to select ONLY those */
     /* users with a level of 90 or greater.                */
     /*******************************************************/


SELECT

  ALL



     /*******************************************************/
     /* The sort section allows you to format the report in */
     /* any order you wish.  It must be realized however    */
     /* that in using SORTS, the report generator will need */
     /* to actually sort the data before it prints the      */
     /* report.  This may take some time with large files.  */
     /*******************************************************/

     
SORT USING_KEY                      /* format report according to the      */
                                    /* following fields.                   */
  DSC_NO_MOD    level               /*  By user level (decending order)    */
  NO_MOD        last                /*  By last name  (ascending order)    */
  NO_MOD        first               /*  By first name (ascending order)    */



     /*******************************************************/
     /* The DISPLAY section is where you tell the report    */
     /* generator where to send the report.  Output can be  */
     /* directed to any valid DOS device.                   */
     /*******************************************************/


DISPLAY

  DEVICE        OUTFILE
  PAGE_LENGTH   0                     /* no page formatting */


     /*******************************************************/
     /* The IMAGE section is where the report is actually   */
     /* produced.   You set up exactly how you want the     */
     /* report to appear, and the report generator will     */
     /* substitute your user or message fields in place of  */
     /* of the format specifications.                       */
     /*                                                     */
     /* Anything after a '+' is printed except that the     */
     /* format specifications are substitued with the       */
     /* actual fields that appear in the line beneath.      */
     /*                                                     */
     /* Inside the body, you may refer to either an actual  */
     /* DODA name, or a name that was defined in the        */
     /* VIRTUAL section above.  For instance, "username"    */
     /* does not exists as one of the DODA names but it was */
     /* defined in the VIRTUAL section as a formula to use  */
     /* "first" and "last" (both defined in DODA)           */
     /*******************************************************/


     /*******************************************************/
     /*  NOTE!!!  DO NOT place any comments after a line    */
     /*  that begins with a '+'!  If you do, then your      */
     /*  comments will be printed and/or shown!             */
     /*******************************************************/



IMAGE

BODY


+  Name : @xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx         Level :  @999
          username                                         level
+  City : @xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx      Times On : @9999
          city                                           timeson
+
+    Total Downloads :    @9999        Total Uploads :    @9999
                       downloads                          uploads
+     Download Bytes : @9999999         Upload Bytes : @9999999
                       total_bytes                     up_bytes
+     Home Telephone : @999999999999  Data Telephone : @999999999999
                        home_phone                      data_phone
+
     /*******************************************************/
     /* EXIT must be the last line in each script           */
     /*******************************************************/


EXIT
