× 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 is sort of a standard we use in our SQLRPGLE programs
 * Move initial SQL values to the save fields
C                   MOVE      SQLSORT1      SVSORT1
C                   MOVE      SQLSORT2      SVSORT2
C                   MOVE      SQLSORT3      SVSORT3
C                   MOVE      SQLSORT4      SVSORT4
C                   MOVE      SQLSORT5      SVSORT5
C                   ENDIF

C                   MOVE      'N'           PRTRCDS

 * Fetch records while not EOF and not an error
C                   DOW       SQLCOD <> 100 AND SQLCOD >= *ZERO

 * Force page breaks if Sorts change.
C                   IF        SQLSORT1 <> SVSORT1
C                              OR SQLSORT2 <> SVSORT2
C                              OR SQLSORT3 <> SVSORT3

C                              OR SQLSORT4 <> SVSORT4
C                              OR SQLSORT5 <> SVSORT5
C                   EXSR      $PAGBRK
C                   IF        PRTRCDS = 'Y'
C                   MOVE      'N'           PRTRCDS
C                   ENDIF
C                   MOVE      SQLSORT1      SVSORT1
C                   MOVE      SQLSORT2      SVSORT2
C                   MOVE      SQLSORT3      SVSORT3
C                   MOVE      SQLSORT4      SVSORT4
C                   MOVE      SQLSORT5      SVSORT5
C                   EVAL      HDRSW = 'Y'
C                   ENDIF

reply to the sarcasism --

 EVAL      STRSQL = 'SELECT BLBIDKY, SORT5, SORT4, +
                    SORT3, SORT2, SORT1, SORT0 +
           FROM ' + #WRKLIBR + '/RCB650V'

If one of our programmers cannot look at this line and see what file the
records are coming from then they also should spend some time learning SQL.

Ron

-----Original Message-----
From: Douglas Handy [mailto:dhandy1@bellsouth.net]
Sent: Wednesday, May 22, 2002 1:52 PM
To: rpg400-l@midrange.com
Subject: Re: Difference bet. Primary and Full procedural file.


Ron,

>Yes Doug you are right I have not posted alternative code.  However, when
>nearly all my programs are done with SQLRPGLE,

Fine.  Then post a sample program in SQLRPGLE which shows how you perform
heading and total level calculations and printing.

SQL is great for many things -- although I have my beefs with the current
precompiler -- so I don't care if you post SQL or REXX if you think it is
more
readable and easier to maintain.

The goal is for programs which are easy to maintain.  If it is faster to
code
and / or executes faster too, that is an added bonus.  I've shown you what I
consider to be the easiest to maintain, and it also happens to be very fast
to
code and performs well to boot.

All I'm asking is for you do to the same -- show me what you consider to be
the
right way to do this simple, common task.

>I don't even have an F spec for my primary files.

<sarcasm *on>

What?  You mean - gasp - that you are asking the compiler to do something
for
you like opening files and reading records when you are not explicitly
coding
the operations?  How is the poor maintenance programmer supposed to know
what is
going on?

<sarcasm *off>

Doug
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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:

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.