× 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: Query
  • From: Roger Boucher <RBoucher@xxxxxxxxxxx>
  • Date: Wed, 2 Jun 1999 13:51:17 -0700

Thankyou, but no... same error again.  And I've used the quadruple
quotes in other CLs that call QM Queries and they work fine... as long
as the field in the file is not numeric... :-(


-----Original Message-----
From: Rob Berendt [mailto:rob@dekko.com]
Sent: Wednesday, June 02, 1999 10:47 AM
To: MIDRANGE-L@midrange.com
Subject: RE: Query


The problem is with your variable &QUOTE.  I started using hex 
values because I couldn't remember the rules about the number of 
apostrophes.  Replace:
DCL        VAR(&QUOTE) TYPE(*CHAR) LEN(1) VALUE('''')
with:
DCL        VAR(&QUOTE) TYPE(*CHAR) LEN(1) VALUE(X'7D')
and give that a try.





RBoucher@stanpac.com on 06/02/99 12:14:14 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RE: Query

Thank you!!  Ask and ye shall receive!!  This is the Email I sent to IBM
(haven't heard back from them yet)...

This is the (stripped down version) of the program...

             PGM

/* --------- Define program file(s) and variable(s). --------------- */

             DCL        VAR(&PSOPT1) TYPE(*CHAR) LEN(8)
             DCL        VAR(&PSOPT2) TYPE(*CHAR) LEN(2)

             DCL        VAR(&QUOTE) TYPE(*CHAR) LEN(1) VALUE('''')
             DCL        VAR(&DOCO) TYPE(*CHAR) LEN(10)
             DCL        VAR(&DCTO) TYPE(*CHAR) LEN(4)

/* --------- Retrieve processing options. -------------------------- */
/* --------- NOTE TO IBM:  THE &PSOPT1 IS THE 8 CHARACTER VALUE ---- */
/* ---------               RETURNED FROM THE RPG PROGRAM P98CLOPT--- */
/* ---------                        (EG. '00001438')             --- */
/* ---------               BUT IN THE FILE THE QMQRY IS USING THE--- */
/* ---------               FIELD IS NUMERIC.                     ---

             CALL       PGM(P98CLOPT) PARM(&PSOPT1 &PSOPT2)


             CHGVAR     VAR(&DOCO) VALUE(&QUOTE *CAT &PSOPT1 *CAT +
                          &QUOTE)
             CHGVAR     VAR(&DCTO) VALUE(&QUOTE *CAT &PSOPT2 *CAT +
                          &QUOTE)

             STRQMQRY   QMQRY(LINEONE) SETVAR((DOCO &DOCO) (DCTO +
                          &DCTO))

             ENDPGM


HERE IS THE QMQRY SOURCE...  (NOTE:  PDDOCO is numeric)

SELECT PDDOCO, PDDCTO, PDSFXO, PDOBJ, PDSUB, PDSBL,
       PDURRF as Plan, PDPDS2 as Elev
FROM F4311
WHERE PDDOCO=&DOCO and PDDCTO=&DCTO and PDLNID=1


Thanks again for any help.
=)

-----Original Message-----
From: Rob Berendt [mailto:rob@dekko.com]
Sent: Wednesday, June 02, 1999 6:42 AM
To: MIDRANGE-L@midrange.com
Subject: RE: Query


I need to see the CL, at least in the area of the STRQMQRY.




RBoucher@stanpac.com on 06/01/99 08:23:57 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RE: Query

Well, my field is signed, not packed, so I'm not sure if it would be of
any assistance but when I try to pass the selection value as a character
field... I get this:

Message ID . . . . . . :   SQL0401       Severity . . . . . . . :   30

Message type . . . . . :   Diagnostic

Date sent  . . . . . . :   06/01/99      Time sent  . . . . . . :
16:15:17 
 

Message . . . . :   Comparison operator = operands not compatible.

Cause . . . . . :   The operands of comparison operator = are not
compatible.
    -- Numeric operands are compatible with any other numeric operands.

    -- Character operands are compatible with operands that are
character,   
  graphic, date, time, or timestamp.

    -- Date, time, or timestamp operands are compatible with character

  operands or with another operand of the same type.

    -- Graphic operands are compatible with graphic or character
operands.   

Thanks again for ANY help... HELP!!!

P.S.  I've already done the Digits() thing and it works but it is WAY
too slow.

-----Original Message-----
From: Rob Berendt [mailto:rob@dekko.com]
Sent: Tuesday, June 01, 1999 3:08 PM
To: MIDRANGE-L@midrange.com
Subject: RE: Query


CALL PGM(ROB/IIM2) PARM('00029')

Program IIM2:
PGM (                                                                + 
      &VENDOR#         /* Vendor #                                */ + 
    )                                                                  
    DCL  &VENDOR#     *CHAR   5  /* Vendor Number                    */
             STRQMQRY   QMQRY(ROB/IIM2) SETVAR((VENDOR &VENDOR#))      
END:                                                                   
             ENDPGM                                                   


QMQRY IIM2:
SELECT                     
  ALL       IPROD, IDESC   
  FROM      GPIDIVF/IIM T01
  WHERE     IVEND = &VENDOR
  ORDER BY  IPROD ASC       

Is the above any assistance?  IVEND is a packed 5,0 field in the IIM
file.





RBoucher@stanpac.com on 06/01/99 03:03:52 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RE: Query

How can I pass a numeric variable to a QMQRY from a CL?  I need to
select on a field that is 8 signed.  To further complicate things... the
value I'm trying to pass is retrieved through a call to another
program... and being returned as an 8 *CHAR to the calling CL.

Thanks!!
  =)



+---
| 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
+---


+---
| 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
+---


+---
| 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.