× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: OPNQRYF quru needed
  • From: Scott Mildenberger <Smildenber@xxxxxxxxxxxx>
  • Date: Fri, 15 Jun 2001 11:11:10 -0600

Sam,

You don't want the quotes (&DQ) around the numeric value when comparing to a
numeric field.  Take those out and see what you get.

Scott Mildenberger

> -----Original Message-----
> From: Sam Kanakanui [mailto:skanakanui@triad.rr.com]
> Sent: Thursday, June 14, 2001 7:08 PM
> To: midrange-l@midrange.com
> Subject: OPNQRYF quru needed
> 
> 
> Hi,
> I have been struggling with an OPNQRYF problem for the better 
> part of a day
> now.  I have included some code excerpts below if anyone  
> would care to tell
> me what I am doing wrong.  I have put the QRYSLT parm in a 
> variable (which I
> learned from this list) for readability.  Any help would be gratly
> appreciated.
> 
> File layout of fields:
>            Data        Field  Buffer    Buffer        Field    Column
>  Field      Type       Length  Length  Position        Usage  
>   Heading
>  .
>  .
>  STYLE#     ZONED        4  0       4        11        Both     STYLE#
>  L4AMT      ZONED       10  2      10        15        Both     L4AMT
>  .
>  .
>  MIMRGO     CHAR            1       1       260        Both     MIMRGO
>   Coded Character Set Identifier  . . . . . :     37
> 
> The CL code is as follows:
> DCL        VAR(&DQ) TYPE(*CHAR) LEN(1) VALUE('"')
>  DCL        VAR(&BLANKS) TYPE(*CHAR) LEN(1) VALUE(' ')
>  CHGVAR     VAR(&SELECT) VALUE('STYLE# *GT ' *CAT &DQ +
>               *CAT '100' *CAT &DQ *CAT ' *AND MIMRGO +
>               *EQ ' *CAT &DQ *CAT &BLANKS *CAT &DQ *CAT +
>              ' *AND L4AMT *GT ' *CAT &DQ *CAT '0' +
>               *CAT &DQ *CAT ' ')
> 
>  OPNQRYF    FILE((QTEMP/CSFMWEEK)) QRYSLT(&SELECT) +
>               KEYFLD((QTYUOM) (SAMCOD) (STYLE#) +
>               (O#FVAR) (PGROUP) (PATERN))
> 
> The error I get when running this is:
> Message ID . . . . . . :   CPD3131       Severity . . . . . . . :   30
> 
>  Message type . . . . . :   Diagnostic
> 
>  Date sent  . . . . . . :   06/13/01      Time sent  . . . . . . :
> 12:51:44
> 
> 
>  Message . . . . :   Operand for *GT function not valid.
> 
>  Cause . . . . . :   The operator or built-in function *GT, 
> was specified at
> 
>    position 8 in the expression on the QRYSLT parameter.  If the error
> occurred
>    on the MAPFLD parameter, the expression was specified for 
> the definition
> of
>    field *N.  For the %RANGE, %VALUES, and %WLDCRD built-in 
> functions, the
> 
>    error may be caused by the first operand for the *EQ 
> operator that is
> 
>    associated with the built-in function.  Conditions that 
> can cause this
> error
>    include:
> 
> Thanks in advance,
> Sam Kanakanui
> Borg Systems Inc.
> 
> 
> 
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to 
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: 
> david@midrange.com
> +---
> 
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.