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



Interesting. Thanks Scott. I added the DEBUG(*input) option and it's working as expected.

Must be having a brain-fart cuz I don't remember having to do that before. I thought the default compiler option of OPTION(*UNREF) took care of that?

Thanks

Bob Cagle
IT Manager
Lynk, Inc.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Tuesday, February 10, 2015 11:17 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: RE: New free format file declarations' input fields

That is how it has always worked, you can override by putting DEBUG(*INPUT) on your h spec. From the manual

*INPUT
All externally described input fields will be read during input operations even if they are not used in the program. Normally, externally described input fields are only read during input operations if the field is otherwise used within the program.


Scott

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob Cagle
Sent: Tuesday, February 10, 2015 9:50 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: New free format file declarations' input fields

So I've written a very simple update program using the new free-format.

Here's a very simplified version of the code:

dcl-f File1 keyed;
dcl-f File2 keyed;
dcl-f File3 keyed;

read File1;
DOW not %eof;

Setll F1FLD1 File2;
Reade F1FLD1 File2;
DOW not %eof;

Setll (F2FLD1:F2FLD2) File3;
Reade (F2FLD1:F2FLD2) File3;
DOW not %eof;

F3FLD1 = NewValue;
Update File3;

Reade (F2FLD1:F2FLD2) File3;
ENDDO;

Reade F1FLD1 File2;
ENDDO;

Read File1;
ENDDO;


I've put it in debug to check my code, but only the fields that I've actually referenced in the program are being populated. For example, any other field in File1 besides F1FLD1 is blank/zero. Is this a side-effect of the new DCL-F statements? Shouldn't the field buffer still be getting populated with the values from the file?


Thanks

Bob Cagle
IT Manager
Lynk, Inc.


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.