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



I think I see the idea.

Thanks,

Bob

On Thu, Jun 17, 2010 at 8:21 AM, Dennis Lovelady <iseries@xxxxxxxxxxxx>wrote:

If I understand correctly, what I posted at midrange-l
(http://archive.midrange.com/midrange-l/201006/msg00558.html) will work
for
you.

Let us know if that doesn't help.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"The honeymoon is over when he phones that he'll be late for supper - and
she has already left a note that it's in the refrigerator."
-- Bill Lawrence


The file (it is a PF) looks like this.


NTAPPTYP A 1

NTAPPCDE A 10

NTSEQNBR P 5 0

NTAUTOCD A 4

NTNOTE A 75

NTUSERID A 10

NTWRKSTN A 10

NTRCDCCC S 2 0

NTRCDYYY S 2 0

NTRCDMMM S 2 0

NTRCDDDD S 2 0

NTRCDTIM S 6 0
There are over 3 million records in it.
In the program I have already found and deleted records. NTAPPTYP is a
"type" of Record and NTAPPCDE is a customer number. Each customer may
have
have 1 or several hundred records. I am trying to re-sequence NTSEQNBR
within the record type and customer number

This is what i tried. (Count is INZ at 1)

Reset Count;

exec sql

Declare C2 cursor for

Select NTAPPTYP, NTAPPCDE, NTSEQNBR

FROM NOTESNT

Where NTAPPTYP = :APPTYP and

NTAPPCDE = :OldAppCde

ORDER BY NTAPPTYP, NTAPPCDE, NTSEQNBR;

Dow Sqlstate = ErrStateOk;

If Sqlstate = ErrStateNoRow;

Leave;

endIf;

exec sql

fetch C2 Into :APPTYP, :APPCDE, :SEQNBR;

exec sql

Update misrabgbr/notesnt

Set NTSEQNBR = :Count

Where NTAPPTYP = :APPTYP and

NTAPPCDE = :APPCDE;

Count +=1;

EndDo;

ENDSR;
--
> This is the RPG programming on the IBM i / System i (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.


--
This is the RPG programming on the IBM i / System i (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 ...

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.