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



In RPG IV? Sure...
     C                   if        cotsz1 >= '0'
     C                              and %scan('AN':COAT1) = 0
     C                              or size <= '00014'
     C                              and %scan('X':size) = 0
     C                              and %scan('S':size) = 0
     C                              or size <= SZDIA1
     C                              or  cotsz2 <= COTSZ1
     C                              and cotsz2 > '0'
     C                              and %scan('B':size) = 0
     C                              or UTS >= 820000
     C                              or WGT <= 0
     C                              or UTS < YTS
     C                              or %scan('NOMAT':desc) > 0
     C                              and %scan('BX':size) = 0

-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Willie J. Moore
Sent: Friday, March 11, 2005 3:03 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Convert QUERY record select to RPG

We have a query that has the following record select tests:
AND/OR          Field             Test                  Value
                        SIZE              GE                    cotsz1   
  AND           COTSZ1        GE                '0'      
  AND           COAT1          NLIKE            '%AN%'   
  OR            SIZE              LE                    '00014'  
  AND           SIZE              NLIKE         '%X%'    
  AND           SIZE              NLIKE         '%S%'    
  OR            SIZE              LE                    SZDIA1   
  OR            COTSZ2        LE                COTSZ1   
  AND           COTSZ2        GT                '0'      
  AND           SIZE              NLIKE         '%B%'    
  OR            UTS               GE                    820000   
  OR            WGT              LE                     0        
  OR            UTS               LT                    YTS      
  OR            DESC             LIKE           '%NOMAT%'
  AND           SIZE              NLIKE         '%BX%'   

Field def.:
Size    15      A
Cotsz1 20       A
Coat1   3       A
Cotsz2 20       A
UTS     7.0     D
YTS     7.0     D
WGT     9.3     D
DESC    30      A

I have been asked to program this in RPG.
My question is can this be done in RPG? 
One thought that our network person had who does Java. Is to pass the data
from the RPG program to Java and let Java do the checking. Then pass a Y
(record passed) or N (record did not pass) back the RPG program. I could
also write the record out to a database file then call the that the Java
program. Can this be done? 
Any and all ideals and help would be appreciated,
William Moore                               

-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.