| 
 | 
Hi,
I'm trying to run SQL.  I'm getting an error saying:
Message . . . . :   RUN QUERY command failed with SQLCODE -
104.              
Cause . . . . . :   The SQLCODE is -104. The SQLSTATE is 42601. 
The DB2 SQL  
  OS/400 message text for this error is: Token <END-OF-
STATEMENT> was not valid. Valid tokens: + - AS <IDENTIFIER>.                    
              
The source statements in a source member are:
SELECT                                                          +  
        COUNT(*) AS "NUMBER OF OBJECTS",                        +  
        SUM(CAST(ST_SIZE AS DEC(31))) AS "FILE SIZE",           +  
        SUM(CAST(ST_ALLOCSZ AS DEC(31))) AS "ALLOCATED 
SIZE",   +  
        SUBSTR(DIRNAME,1,200) AS "DIRECTORY",                   +  
FROM                                                            +  
        QRYIFSLIB                                               +  
GROUP BY,                                                       +  
              SUBSTR(DIRNAME,1,200)                                
I created the above source object with:
CRTQMQRY QMQRY(GARY1/IFSLISTRUN)  + 
SRCFILE(GARY1/QCLSRC) SRCMBR(IFSLISTQRY) 
I am runing it in a cl pgm with:
STRQMQRY   QMQRY(GARY1/IFSLISTRUN) 
Does anyone have any idea what might be causing this error?
TIA,
Gary Kuznitz
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.