Google 그룹스는 더 이상 새로운 유즈넷 게시물 또는 구독을 지원하지 않습니다. 과거의 콘텐츠는 계속 볼 수 있습니다.

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

조회수 77회
읽지 않은 첫 메시지로 건너뛰기

techie21 IT

읽지 않음,
2022. 1. 13. 오전 9:48:0122. 1. 13.
받는사람
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

읽지 않음,
2022. 3. 4. 오전 4:09:0122. 3. 4.
받는사람
Hi,
For primary, teh doc says: 'P Input or Update Primary file Not supported in free-form'

Carlos

읽지 않음,
2022. 10. 3. 오후 5:19:5122. 10. 3.
받는사람

Carlos

읽지 않음,
2022. 10. 3. 오후 5:21:3922. 10. 3.
받는사람
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

읽지 않음,
2022. 10. 4. 오후 5:21:3322. 10. 4.
받는사람
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개