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 .....Hi,
Le jeudi 13 janvier 2022 |a 15:48:01 UTC+1, techie21 IT a |-crit :
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');
--- Synchronet 3.21d-Linux NewsLink 1.2Thanks .....Hi,
For primary, teh doc says: 'P Input or Update Primary file Not supported in free-form'
Le jeudi 13 janvier 2022 |a 15:48:01 UTC+1, techie21 IT a |-crit :
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');
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 IrigoyenThanks .....Hi,
For primary, teh doc says: 'P Input or Update Primary file Not supported in free-form'
Hi,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.
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.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.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 74 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 01:14:35 |
| Calls: | 1,102 |
| Calls today: | 2 |
| Files: | 1,339 |
| Messages: | 276,785 |