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



This program works for me. Warning: no error checking!
You can run this program directly from the command line (not needed from
browser) and inspect the file in the IFS. Adjust all commands accordingly.

The only other note is in how your opnqryf command is stated (in a constant,
or inline like below). Anywhere you need a single quote mark in the opnqryf
statement, you must use two single quote marks. Double quote marks are
unaffected: qryslt(' department="500" ') becomes qryslt('' department="500"
'')

The open query example for me proves the query selection and sorting options
work. The resulting file /tmp/cgiopnqry.txt:

 Browse : /tmp/cgiopnqry.txt
...
 ************Beginning of data**************
703
702
701
680
660
 ************End of Data********************

HTH,
Loyd


CGIOPNQRY type RPGLE:



 /copy DEV2SRC/qrpglesrc,hspecs
 /copy DEV2SRC/qrpglesrc,hspecsbnd

fdeptmap   if   e           k disk    usropn

 /copy DEV2SRC/qrpglesrc,prototypeb
 /copy DEV2SRC/qrpglesrc,usec
 /copy DEV2SRC/qrpglesrc,variables3

 /free
    gethtml('HTMLSRC':'DEV2OBJ':'CGIOPNQRY');
    rc = docmd('OPNQRYF FILE((PROD_MOD/DEPTMAP)) KEYFLD((DEPARTMENT -
         *DESCEND)) QRYSLT(''department=%range("600" "799")'') ');
    rc = docmd('OVRDBF FILE(DEPTMAP) TOFILE(PROD_MOD/DEPTMAP) SHARE(*YES) -
         OVRSCOPE(*JOB) ');
    open deptmap;
    read deptmapr;
    dow not %eof;
        updhtmlvar('dept':department);
        wrtsection('record');
        read deptmapr;
    enddo;
    close deptmap;
    rc = docmd('DLTOVR FILE(DEPTMAP)');
    rc = docmd('CLOF DEPTMAP');
    wrthtmltostmf(%trim('/tmp/cgiopnqry.txt'):437);
    *inlr = *on;
    return;
 /end-free

-----------------------

DEV2OBJ/HTMLSRC,CGIOPNQRY (template)

/$record 
/%dept%/ 

------------------

On Thu, 22 Apr 2004 15:05:14 -0400, "James Lundy" <jlundy@xxxxxxxxx> wrote:

>
>       Is it possible to use OPNQRYF with CGIDEV2?
>
>       I have tried ever combination if can think of to make this work.
>
>       CL calling RPG, RPG using docmd calling CL 
>               OPNQRYF runs but program is reading file in file order
>sequence.
>
>       RPG using docmd to issue OVRDBF and OPNQRYF, docmd returns error on
>OPNQRYF.
>
>       Have made search of Google, Midrange archives, and Yahoo Easy400
>group.
>       
>
>       Any help or suggestions appreciated.
>
>       TIA
>
>     Jim
>
> 
>
>_______________________________________________
>This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
>To post a message email: MIDRANGE-L@xxxxxxxxxxxx
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/mailman/listinfo/midrange-l
>or email: MIDRANGE-L-request@xxxxxxxxxxxx
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/midrange-l.

--  
"Don't need therpay, all better now!" --Jaye, Wonderfalls
loyd@xxxxxxxxxxxxxx  ICQ#504581  http://www.blackrobes.net/




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.