Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Declaring primary file in fully free format in rpgle and error *RNF7421

97 views
Skip to first unread message

techie21 IT

unread,
Jan 13, 2022, 9:48:01 AM1/13/22
to
Hi,

How can we declare primary file in a fully free format RPGLE program also how to avoid *RNF7421-Operands are not compatible with the type of operator.
for below piece of program:-


If fld1 = 'ABCDEF' AND +
%Date(fld2 : *CYMD) = %Date AND +

(fld3 = 'AAA' or FLD3 = 'BBB');


Thanks .....

Yann Oche

unread,
Mar 4, 2022, 4:09:01 AM3/4/22
to
Hi,
For primary, teh doc says: 'P Input or Update Primary file Not supported in free-form'

Carlos

unread,
Oct 3, 2022, 5:19:51 PM10/3/22
to

Carlos

unread,
Oct 3, 2022, 5:21:39 PM10/3/22
to
On Friday, March 4, 2022 at 3:09:01 AM UTC-6, yann.he...@gmail.com wrote:
Try SQL cursors and do a loop. You primary file will be the one that you are using in the Select. For MR, you can use JOIN. I hope it helps. Carlos Irigoyen

jon.f...@gmail.com

unread,
Oct 4, 2022, 5:21:33 PM10/4/22
to
On Thursday, January 13, 2022 at 9:48:01 AM UTC-5, techie21 IT wrote:
> Hi,
>
> How can we declare primary file in a fully free format RPGLE program

Simple answer - you can't. When fully free-form RPG was introduced the decision was taken to not support primary/secondary files. The cycle is not taught in schools and is rarely used in modern programs.

>also how to avoid *RNF7421-Operands are not compatible with the type of operator.

You have used "+" signs to continue a line when no such continuation marker is needed. Normally the only continuations needed in expressions is when a literal has to stretch over multiple lines. So just remove the "+"s and all will be well - assuming the rest of the syntax is kosher of course.
0 new messages