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

    From techie21 IT@techiei876@gmail.com to comp.sys.ibm.as400.misc on Thu Jan 13 06:47:59 2022
    From Newsgroup: comp.sys.ibm.as400.misc

    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 .....
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Yann Oche@yann.hennequin@gmail.com to comp.sys.ibm.as400.misc on Fri Mar 4 01:08:59 2022
    From Newsgroup: comp.sys.ibm.as400.misc

    Le jeudi 13 janvier 2022 |a 15:48:01 UTC+1, techie21 IT a |-crit-a:
    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,
    For primary, teh doc says: 'P Input or Update Primary file Not supported in free-form'
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Carlos@carlosirgm2013@gmail.com to comp.sys.ibm.as400.misc on Mon Oct 3 14:19:50 2022
    From Newsgroup: comp.sys.ibm.as400.misc

    On Friday, March 4, 2022 at 3:09:01 AM UTC-6, yann.he...@gmail.com wrote:
    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');


    Thanks .....
    Hi,
    For primary, teh doc says: 'P Input or Update Primary file Not supported in free-form'
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Carlos@carlosirgm2013@gmail.com to comp.sys.ibm.as400.misc on Mon Oct 3 14:21:37 2022
    From Newsgroup: comp.sys.ibm.as400.misc

    On Friday, March 4, 2022 at 3:09:01 AM UTC-6, yann.he...@gmail.com wrote:
    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');


    Thanks .....
    Hi,
    For primary, teh doc says: 'P Input or Update Primary file Not supported in free-form'
    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From jon.f...@gmail.com@jon.f.paris@gmail.com to comp.sys.ibm.as400.misc on Tue Oct 4 14:21:31 2022
    From Newsgroup: comp.sys.ibm.as400.misc

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2