Copyright (C) 2002 Programmers Group & Management Resources, Inc. All rights reserved.

This readme.txt was last updated on September 18, 2002

*************************************************
Query File Usage (QRYFUSG) Utility for the AS/400
*************************************************

This README.TXT file covers the following topics

     1.  Requirements
     2.  Getting Help
     3.  Installation Procedures
     4.  Removing Query File Usage Utility
     5.  Instructions
     6.  Object Source


Section 1 - Requirements
========================
1) Prior to installation, make sure you are authorized to FTP 
2) You must be authorized to a "SUPERUSER" profile - someone with
   CRTLIB and RST* command authorities.
3) The library QRYFUSG does not exist in your AS/400.
4) WINZIP or another UnZip tool to extract the QRYFUSG file.
5) Your current Operating System on the AS/400 is V4R5M0 or higher.



Section 2 - Getting Help
========================
  Technical Support for Convert Spooled File Utility for the AS/400 is
  available to licensed users under certain conditions by
  calling:

          1-310-210-7467 in the United States and Canada.
          9am-5pm PST
          Monday through Friday

     INTERNET

     PGMR, Inc. Home Page - AS/400 Journal:
          http://www.as400journal.com
     Email:
          mailto:alex_nubla@msn.com



Section 3 - Installation Procedure
==================================
1. Issue the AS/400 command:
     CRTPF  FILE(QGPL/QRYFUSG) RCDLEN(528) SIZE(*NOMAX)

   Note: QGPL/QRYFUSG may be substituted by another file. If you
         do so, any referenced to QGPL/QRYFUSG hereafter must be
         substituted by your file.

2. Extract the QRYFUSG file (from QRYFUSG.ZIP) and transfer the
   file into QGPL/QRYFUSG (use file transfer facility or FTP).
   
   On your FTP Session:
   ====================
   binary
   put c:\qryfusg qgpl/qryfusg


3. CRTJOBD JOBD(QGPL/GODJOBD) USER(SUPERUSER)

   Note: SUPERUSER must be substituted with a user name who has
         CRTLIB and RST* command authorities.  SUPERUSER must also
         have been added to the directory entry of the system.


4. Issue the AS/400 command:
     SBMDBJOB  FILE(QGPL/QRYFUSG)


5. The utility will be installed in the library QRYFUSG.


6. Issue the AS/400 command:
     DLTF FILE(QGPL/QRYFUSG) 


Section 4 - Removing the Utility
================================
1. Issue the AS/400 command:
     DLTLIB  LIB(QRYFUSG)


Section 5 - Instruction
=======================
The Query File Usage (QRYFUSG) command is used to get the input and output
files referenced within the query (*QRYDFN) object.  This tool is not made
for Query Management (*QMQRY) queries.

The command would look like this (help is available in the command):


                           Query File Usage (QRYFUSG)                           
                                                                                
 Type choices, press Enter.                                                     
                                                                                
 Scan 'File string' . . . . . . .   *NONE         Name, *NONE                   
                + for more values                                               
 Query  . . . . . . . . . . . . .   *ALL          Name, generic*, *ALL          
 Query library  . . . . . . . . .   *LIBL         Name, *LIBL, *CURLIB, *ALLUSR 
 Output . . . . . . . . . . . . .   *             *, *PRINT, *OUTFILE           
                                                                                
                                                                                
The first paramter SCAN (Scan File string) is used to search for file names 
used in the query.  The file usage can either be for input or output -- 
both these file usages are search.  If *NONE is specified, no file search is executed.

The second parameter QRY (Query) is for the name.  You may enter generic 
names (ABC*) or *ALL.  The query name is used to search within the specified 
library what *QRYDFN object to select.

The third parameter (QRYLIB) is for the query library to search.  It searches 
for the *QRYDFN using all the libraries in the *LIBL, using only the *CURLIB 
or using *ALLUSR -- all user library list considered by AS/400.  For details 
of *ALLUSR, press help on the QRYLIB field.  If we decide to search for specific 
libraries only, the best way to start prior to executing QRYFUSG command is to 
do EDTLIBL.  You have 25 libraries you can maintain for the tool to search from.  
When QRYFUSG gets submitted (automatically submitted to batch if *PRINT or 
*OUTFILE is selected on output), it uses the *CURRENT library list for the 
submitted job.  Hence, it is very important that you edit your *LIBL when you 
submit the request using *LIBL for the QRYLIB.  QRYFUSG does not stop the process 
when the *QRYDFN search is found within the first library in *LIBL, it continues 
searching until all *QRYDFN is returned that met the selection criteria in the *LIBL.  
In V5R1, this is where the flexibility comes in -- 250 Libraries to search for.

The fourth parameter is OUTPUT.  Like any commands -- '*' means to display the 
result interactively, *PRINT prints a report and *OUTFILE will return the selected 
query definition into the output file you selected.  The last parameter OUTFILE 
will be display when *OUTFILE is selected for this parameter. To see the file 
layout of the output file, check QRYF.


Section 6 - Object Source
=========================
The Query File Usage Utility is a Freeware for the AS/400.  The source is
not available at this time.

For questions:

     PGMR, Inc. Home Page - AS/400 Journal:
                 http://www.as400journal.com
     Email:
                 mailto:alex_nubla@msn.com
      