Plex 2E

  • 1.  DT#/TM# SQLRPGLE issue

    Posted Jul 12, 2017 08:26 AM

    So, before i submit this as a bug I wanted to see if anyone else has had this issue.

     

    When you create a file with ISO date or time fields in SQL (8.6 or 8.7) the change object generates the move statements as MOVEL(P).  This is not allowed with date/time fields and the compiler coughs with the following error:

     

    RNF7506 20 2 Padding is not allowed for a MOVE or MOVEL to a Date, Time,
    or Timestamp field.

     

    I've tried added the option COMPILEOPT('CVTOPT(*DATETIME)') but it has no effect.  If i change the program to not use SQL for access the issue goes away.

     

    Also, if I do not pass the field as a parameter to the change object (for example an audit field that is set inside the change object) the code generates correctly.  

     

    The create object does not have this issue.

     

    For my test I used an Edit Record.  The error code always showed up in the change object code moving the non-key fields to the record format.  I also used an execute external function with just the change object inside, same error.

     

    Let  me know if anyone else had come across this and is it an actual error or just a PEBKAC (Problem Exists Between Keyboard and Chair).

     

    Eamonn



  • 2.  Re: DT#/TM# SQLRPGLE issue
    Best Answer

    Posted Jul 12, 2017 09:49 AM

    Hello Eamonn,

    As you are talking about SQLRPGLE could you try and add OPTION(*CVTDT) to the *CRTSQLRPGI and *CRTSQLRPGI (*MODULE) messages in your concerned model and see whether it works then?

    The *DATETIME you tried is the parameter on the CVTOPT parameter on the CRTBNDRPG message. The equivalent in *CRTSQLRPGI is *CVTDT for the OPTION parameter (see F1 on the parameter description)

     

    Best regards

    Anette-Nicole, NIIT Germany



  • 3.  Re: DT#/TM# SQLRPGLE issue

    Posted Jul 12, 2017 10:38 AM

    That was it.  File this under PEPKEC error.

     

    Glad it didn't turn out to be the dreaded ID-TEN-T error  .

     

    E