This one any good?
https://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c0918170.pdf
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rpg400-l-request@xxxxxxxxxxxx
Sent: 18 December 2015 15:07
To: rpg400-l@xxxxxxxxxxxx
Subject: RPG400-L Digest, Vol 14, Issue 480
Send RPG400-L mailing list submissions to
rpg400-l@xxxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/rpg400-l
or, via email, send a message with subject or body 'help' to
rpg400-l-request@xxxxxxxxxxxx
You can reach the person managing the list at
rpg400-l-owner@xxxxxxxxxxxx
When replying, please edit your Subject line so it is more specific than "Re: Contents of RPG400-L digest..."
*** NOTE: When replying to this digest message, PLEASE remove all text unrelated to your reply and change the subject line so it is meaningful.
Today's Topics:
1. Re: Actually using commitment control and QTEMP (Alan Campin)
2. CHAIN not found and subsequent READ - docs wrong? (Vernon Hamberg)
3. RE: CHAIN not found and subsequent READ - docs wrong?
(Kurt Anderson)
4. Re: CHAIN not found and subsequent READ - docs wrong?
(Vernon Hamberg)
5. RE: CHAIN not found and subsequent READ - docs wrong?
(Kurt Anderson)
6. How to define a java array in RPG (Mark Bonges)
7. Need link to RPG/400 manual (Craig Pelkie)
----------------------------------------------------------------------
message: 1
date: Fri, 18 Dec 2015 05:53:12 -0800
from: Alan Campin <alan0307d@xxxxxxxxx>
subject: Re: Actually using commitment control and QTEMP
To my understanding yes. If you do a CREATE TABLE it is registered with the database, a slow expensive process. Global Temporary Tables are not registered with the database and are very fast to create or at least that is what the manual says.
On Fri, Dec 18, 2015 at 5:30 AM, <darren@xxxxxxxxx> wrote:
I had always assumed global temporary tables were just an SQL standard
way of referring to QTEMP, so it wasn't any different. I found the "with NC"
syntax at the same time as someone mentioned the global temporary
tables, and the "with NC" worked, so I didn't try the other.
Are there really performance improvements to using global temporary
tables, compared to creating a QTEMP/TBL table?
From: Alan Campin <alan0307d@xxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>
Date: 12/17/2015 03:55 PM
Subject: Re: Actually using commitment control and QTEMP
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>
Why are you not using Global Temporary Tables? They don't get
registered with the database and are fast.
On Thu, Dec 17, 2015 at 12:50 PM, <darren@xxxxxxxxx> wrote:
I think I've found something that works. I can add a "with NC", as
long
as
its not part of the create table. This works:
exec sql create table QTEMP/PARTLIST like FRT;
exec sql commit;
exec sql insert into QTEMP/PARTLIST
(select *
from FRTL01 FRT
where exists
(select * from FRTL01 b
where RWRKC in (31380,31385)
and RPROD=FRT.RPROD and RTWHS=FRT.RTWHS)
) with NC;
--
This is the RPG programming on the IBM i (AS/400 and 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.
--
This is the RPG programming on the IBM i (AS/400 and 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.
--
This is the RPG programming on the IBM i (AS/400 and 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.
------------------------------
message: 2
date: Fri, 18 Dec 2015 08:17:49 -0600
from: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
subject: CHAIN not found and subsequent READ - docs wrong?
Y'all
The ILE RPG Reference has this to say about a CHAIN that does not complete -
"When the CHAIN operation is not completed successfully (for example, an error occurs or no record is found), the file specified in name must be repositioned (for example, by a CHAIN or SETLL operation) before a subsequent read operation can be done on that file."
Now I've seen that when record-not-found happens, that I can do a READ without repositioning, no problem. Here's the scenario -
READ keyedfile fileds;
CHAIN somekey keyedfile fileds; (%found(keyedfile) = *OFF)
READ keyedfile fileds;
The 2nd READ returns the record that follows the one returned by the first READ - so the READ continues from where things were before the failed CHAIN.
That seems NOT to be how the documentation says it should work - I did not have to do another successful CHAIN or SETLL - "successful" is my word added as my assumption.
Confirm or deny, anyone?
Cheers
Vern
------------------------------
message: 3
date: Fri, 18 Dec 2015 14:29:18 +0000
from: Kurt Anderson <Kurt.Anderson@xxxxxxxxxxxx>
subject: RE: CHAIN not found and subsequent READ - docs wrong?
While what you quoted doesn't say this, I'm guessing a Chain that results in no hit, does not change the file position. So with your read before the chain having already read successfully, it set the file position, the failed Chain did not move it, so the read after the Chain "works" and reads the next record.
So the line from the documentation that backs up what I just said comes right before what you quoted:
"When the CHAIN operation is successful, the file specified in name is positioned such that a subsequent read operation retrieves the record logically following or preceding the retrieved record."
Specifically, it's saying that the file is positioned after a successful chain. So if it's not successful, it's not positioned. That's my take. Keep in mind that I don't recall the last time I coded a Chain and then a Read to follow it.
Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: Friday, December 18, 2015 9:18 AM
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Subject: CHAIN not found and subsequent READ - docs wrong?
Y'all
The ILE RPG Reference has this to say about a CHAIN that does not complete -
"When the CHAIN operation is not completed successfully (for example, an error occurs or no record is found), the file specified in name must be repositioned (for example, by a CHAIN or SETLL operation) before a subsequent read operation can be done on that file."
Now I've seen that when record-not-found happens, that I can do a READ without repositioning, no problem. Here's the scenario -
READ keyedfile fileds;
CHAIN somekey keyedfile fileds; (%found(keyedfile) = *OFF)
READ keyedfile fileds;
The 2nd READ returns the record that follows the one returned by the first READ - so the READ continues from where things were before the failed CHAIN.
That seems NOT to be how the documentation says it should work - I did not have to do another successful CHAIN or SETLL - "successful" is my word added as my assumption.
Confirm or deny, anyone?
Cheers
Vern
--
This is the RPG programming on the IBM i (AS/400 and 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.
------------------------------
message: 4
date: Fri, 18 Dec 2015 08:36:46 -0600
from: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
subject: Re: CHAIN not found and subsequent READ - docs wrong?
Thanks, Kurt, yeah, I hear you - but the line I quoted says you CAN'T do a subsequent read operation unless you reposition the file.
So the docs are at least confusing, right?
Vern
On 12/18/2015 8:29 AM, Kurt Anderson wrote:
While what you quoted doesn't say this, I'm guessing a Chain that results in no hit, does not change the file position. So with your read before the chain having already read successfully, it set the file position, the failed Chain did not move it, so the read after the Chain "works" and reads the next record.
So the line from the documentation that backs up what I just said comes right before what you quoted:
"When the CHAIN operation is successful, the file specified in name is positioned such that a subsequent read operation retrieves the record logically following or preceding the retrieved record."
Specifically, it's saying that the file is positioned after a successful chain. So if it's not successful, it's not positioned. That's my take. Keep in mind that I don't recall the last time I coded a Chain and then a Read to follow it.
Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery
Platform
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Vernon Hamberg
Sent: Friday, December 18, 2015 9:18 AM
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Subject: CHAIN not found and subsequent READ - docs wrong?
Y'all
The ILE RPG Reference has this to say about a CHAIN that does not
complete -
"When the CHAIN operation is not completed successfully (for example, an error occurs or no record is found), the file specified in name must be repositioned (for example, by a CHAIN or SETLL operation) before a subsequent read operation can be done on that file."
Now I've seen that when record-not-found happens, that I can do a READ
without repositioning, no problem. Here's the scenario -
READ keyedfile fileds;
CHAIN somekey keyedfile fileds; (%found(keyedfile) = *OFF)
READ keyedfile fileds;
The 2nd READ returns the record that follows the one returned by the first READ - so the READ continues from where things were before the failed CHAIN.
That seems NOT to be how the documentation says it should work - I did not have to do another successful CHAIN or SETLL - "successful" is my word added as my assumption.
Confirm or deny, anyone?
Cheers
Vern
--
This is the RPG programming on the IBM i (AS/400 and 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.
------------------------------
message: 5
date: Fri, 18 Dec 2015 14:47:29 +0000
from: Kurt Anderson <Kurt.Anderson@xxxxxxxxxxxx>
subject: RE: CHAIN not found and subsequent READ - docs wrong?
I see what you're saying, but I think the documentation is speaking to a very specific situation wherein you did not do a Read before your Chain that is chaining out to the very same record. In that case success would position the file to where you Chain'd to, and a failed chain wouldn't reposition the file, but in your scenario the position of the file is already there.
Given what you're seeing, Chain is not like SetLL, which would position to the end of the file if no record was found for the SetLL.
Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: Friday, December 18, 2015 9:37 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: CHAIN not found and subsequent READ - docs wrong?
Thanks, Kurt, yeah, I hear you - but the line I quoted says you CAN'T do a subsequent read operation unless you reposition the file.
So the docs are at least confusing, right?
Vern
On 12/18/2015 8:29 AM, Kurt Anderson wrote:
While what you quoted doesn't say this, I'm guessing a Chain that results in no hit, does not change the file position. So with your read before the chain having already read successfully, it set the file position, the failed Chain did not move it, so the read after the Chain "works" and reads the next record.
So the line from the documentation that backs up what I just said comes right before what you quoted:
"When the CHAIN operation is successful, the file specified in name is positioned such that a subsequent read operation retrieves the record logically following or preceding the retrieved record."
Specifically, it's saying that the file is positioned after a successful chain. So if it's not successful, it's not positioned. That's my take. Keep in mind that I don't recall the last time I coded a Chain and then a Read to follow it.
Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery
Platform
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Vernon Hamberg
Sent: Friday, December 18, 2015 9:18 AM
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Subject: CHAIN not found and subsequent READ - docs wrong?
Y'all
The ILE RPG Reference has this to say about a CHAIN that does not
complete -
"When the CHAIN operation is not completed successfully (for example, an error occurs or no record is found), the file specified in name must be repositioned (for example, by a CHAIN or SETLL operation) before a subsequent read operation can be done on that file."
Now I've seen that when record-not-found happens, that I can do a READ
without repositioning, no problem. Here's the scenario -
READ keyedfile fileds;
CHAIN somekey keyedfile fileds; (%found(keyedfile) = *OFF)
READ keyedfile fileds;
The 2nd READ returns the record that follows the one returned by the first READ - so the READ continues from where things were before the failed CHAIN.
That seems NOT to be how the documentation says it should work - I did not have to do another successful CHAIN or SETLL - "successful" is my word added as my assumption.
Confirm or deny, anyone?
Cheers
Vern
--
This is the RPG programming on the IBM i (AS/400 and 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.
--
This is the RPG programming on the IBM i (AS/400 and 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.
------------------------------
message: 6
date: Thu, 17 Dec 2015 15:37:39 -0600
from: "Mark Bonges" <mrb1@xxxxxxxxxxxxxxxxxxxxxxxx>
subject: How to define a java array in RPG
It's simpler than you would think. An array in RPG is defined using the DIM
keyword, so you just add the same keyword to the prototype. You do have to
define the length of the array in RPG, which can cause some issues when java
is expecting to receive the exact number of elements filled instead of
receiving blank elements in the array.
Your prototype would look something like: (forgive the fixed form)
d addConditionalFormatting...
d pr like(jint)
d EXTPROC(*JAVA:
d 'MyClass.addConditionalFormatting':
d 'close')
d prRegions like(CellRangeAddress) dim(5)
d prRule like(ConditionalFormattingRule)
date: Thu, 17 Dec 2015 15:06:55 -0500
from: "Mark Murphy/STAR BASE Consulting Inc."
<mmurphy@xxxxxxxxxxxxxxx>
subject: How to define a java array in RPG
I cross posted this in the Midrange, RPG, and Java lists because Java
doesn't get much traffic. Answer wherever you feel is most appropriate.
I need to call a java method with the following signature:
int addConditionalFormatting(CellRangeAddress[] regions,
ConditionalFormattingRule rule)
How do I (or maybe more appropriately, can I) write a prototype in RPG for
the first parameter which is an array?
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
------------------------------
message: 7
date: Thu, 17 Dec 2015 23:59:24 -0800
from: "Craig Pelkie" <craig@xxxxxxxxxx>
subject: Need link to RPG/400 manual
I need a link to the RPG/400 (not ILE RPG) manual. Trying to maintain some
older code, forgetting some of the options.
I've tried to locate this in InfoCenter/Knowledge Center, but can only find
manuals back to V5R3, without RPG/400.
Also, it will not work, in this case, to try to convert to ILE. This is
packaged code that the vendor runs through some macro expansion (that we
don't have the source for), so it has to be maintained "as-is".
Thanks
Craig Pelkie
------------------------------
Subject: Digest Footer
As an Amazon Associate we earn from qualifying purchases.