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



Could the recid (postion 1) and wrcons have the same data in them? This way it would look like the chain
was working for the validation of a code. How is the file defined internally? Does the fields match up?
William...

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Jerry Adams
Sent: Monday, March 24, 2008 9:39 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: RPG II Question


I re-compiled the program (an RPG36 source type) with 'IC' as the file
type and the same erroneous key starting position. Put the program
under debug (ISDB), and it still worked flawlessly. By that, I mean it
performed as I would have expected if the starting position had been
correct in the source code.


* Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Jerry Adams wrote:
Peter,

The non-contiguous keys (aka Alternate Index) used (on the S/36) EXTK
as the key starting position. But this table is a physical with a
single key field.
It may have something to do with it being defined as full procedural
(IF) rather than the old fashioned chain (IC) designation. The RPG II
manual did not make any special note of this. Just that the "key
starting position" was a required entry for an IF file.

* Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Peter Dow (ML) wrote:
Hi Jerry,

Keeping in mind that my grey cells are leaking out and making my hair
grey, but I have this recollection that when IBM started allowing
non-contiguous key fields, the key location in RPG II changed to just
1, i.e. pretty much unused. I always thought of it as the position
of the key in the index, not in the physical file, and in the index
entry, the key would always start in pos.1.

hth,
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /

Jerry Adams wrote:

I really don't expect an answer. In fact most people will probably
just delete this when they see the subject line. But this is
puzzling the heck out of me.

I went in to an RPG II program (old package) to do some simple
maintenance changes. I noticed that one of the files was defined as:

FFilenameIPEAFBlenRlenLK1AIOvKlocEDevice+
FLISTCONSIF 27 1AI 1 DISK
Well, the key length is '1' but the key actually starts in position
'2' of the record. The purpose of the file is to validate a code
entered on a panel:

C WRCONS CHAINLISTCONS 54
C 54 SETON 99
C 54 *ZEROS ADD 23 $ C
54 GOTO X2A
The first position of LISTCONS is a status byte. Currently every
record has an 'A' in position 1. The program has been successfully
validating these codes for years. How is that possible? I even put
the program under debug (ISDB) and verified the codes entered
(WRCONS) and in the file (ABCONS) are the same after the chain, and
that indicator 54 is turned *Off.

It has been awhile since I programmed on a S/36, but I'm pretty sure
that, first, when the program started up it would give me a file
mismatch error. Is the i5 really smart enough to say, "Well, he
botched that. Let's just use what is really in the file."?

Thanks.





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.