I found it (or least it compiled now) was that one of the other key fields
OHCSNO was the wrong field to use which obviously threw off the key length.
Thanks to all who assisted me the past couple of days with tips (this was
not the only issue) and suggestions to get this whole mess resolved with
using variable fields and key fields in an ILE RPG program. Now I'm on my
own with the rest of the logic of the program...
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Holden Tommy
Sent: Monday, June 11, 2007 2:30 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Accessing a File with a Variable Key
Yes I got that...but how is the field in the file itself defined??? Surely
the field name in the file isn't W#TRAK (at least I would hope...)
Thanks,
Tommy Holden
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Fred Horvat
Sent: Monday, June 11, 2007 1:16 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Accessing a File with a Variable Key
From the Compile listing W#TRAK says it is:
W#TRAK A(20) 64D 445 546M
VARYING
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Holden Tommy
Sent: Monday, June 11, 2007 1:51 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Accessing a File with a Variable Key
Post the actual key field definitions for the file...could be that your
klist does not match the actual file field definitions. Is the 3rd key
"actually" a varying field???
Thanks,
Tommy Holden
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Fred Horvat
Sent: Monday, June 11, 2007 12:33 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Accessing a File with a Variable Key
Oops, yes the K was needed and I added it. I put that in and get the
following error message now for the SETLL statement.
*RNF7073 30 1 Length of KFLD is not equal to corresponding key field in
file.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [
mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Kesterson, Randy
Sent: Monday, June 11, 2007 1:06 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Accessing a File with a Variable Key
I'm sure this is not it, but you wouldn't have forgotten the K in the F spec
would you?
As an Amazon Associate we earn from qualifying purchases.