IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this forum will no longer be available. More details available on our FAQ.
Topic
  • 3 replies
  • Latest Post - ‏2019-09-10T10:28:25Z by barbara_morris
Sergey Chebotarev
Sergey Chebotarev
16 Posts

Pinned topic Work with DDM file

‏2019-09-09T13:40:06Z |

Good day. I increased the number of fields in the physical file and now the program that worked with it through DDM began to produce an error. Error text from joblog:


"Message . . . . :   Output size larger than limit for DDM file RULEH1PF in
                                       SDATSTL.
                                     Cause . . . . . :   A Distributed Data Management (DDM) file has been opened
                                       with SEQONLY(YES) for output.  However, the combination of record length and
                                       number of records in the output buffer is greater than the maximum of 131072
                                       bytes. Recovery  . . . :   Reduce the number of records using the SEQONLY
                                       parameter of the OVRDBF command. Then, try the request again."


Tell me how to solve this problem? I heard that a DDM file has restrictions on access to a physical file, if the latter has a record length that exceeds a certain value.

  • barbara_morris
    barbara_morris
    606 Posts

    Re: Work with DDM file

    ‏2019-09-09T15:33:37Z  

    What is the message ID?

    The message says it's a combination of the record length and the number of records. Did you try OVRDBF SEQONLY(*NO) so that it will only get one record at a time?

    If the OVRDBF solves the problem, you could instead add code in your program to prevent the file being blocked.. In RPG, add keyword BLOCK(*NO) to your file definition.

    If the OVRDBF doesn't solve the problem, you might get more help if you post your question to the Db2 for i forum: https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000292

    Don't forget to mention the message ID if you post your question to the Db2 for i forum.

  • Sergey Chebotarev
    Sergey Chebotarev
    16 Posts

    Re: Work with DDM file

    ‏2019-09-10T07:05:12Z  

    Barbara, the full text of the joblog, regarding the error, looks like this:

    CPD9229    Diagnostic              40   09/09/19  13:45:34.851020  QTSPUTM      QSYS        *STMT    QC2IO       QSYS        *STMT
                                         From module . . . . . . . . :   QTSPUTM
                                         From procedure  . . . . . . :   SNDPMSG
                                         Statement . . . . . . . . . :   9500
                                         To module . . . . . . . . . :   QC2CRIC1
                                         To procedure  . . . . . . . :   _Rwrite
                                         Statement . . . . . . . . . :   140
                                         Message . . . . :   Output size larger than limit for DDM file RULEH1PF in
                                           SDATSTL.
                                         Cause . . . . . :   A Distributed Data Management (DDM) file has been opened
                                           with SEQONLY(YES) for output.  However, the combination of record length and
                                           number of records in the output buffer is greater than the maximum of 131072
                                           bytes. Recovery  . . . :   Reduce the number of records using the SEQONLY
                                           parameter of the OVRDBF command. Then, try the request again.
    CPF5169    Escape                  40   09/09/19  13:45:34.851052  QTSPUTM      QSYS        *STMT    CLCH1RULE   SPGMSTL     *STMT
                                         From module . . . . . . . . :   QTSPUTM
                                         From procedure  . . . . . . :   QTSPUTM
                                         Statement . . . . . . . . . :   7944
                                         To module . . . . . . . . . :   CLCH1RULE
                                         To procedure  . . . . . . . :   SaveReport
                                         Statement . . . . . . . . . :   234          *PRCLT
                                         Message . . . . :   Cannot complete input or output (I/O) to DDM file RULEH1PF
                                           in SDATSTL.
                                         Cause . . . . . :   This system or the target Distributed Data Management
                                           (DDM) system detected a condition that caused the I/O operation to fail.
                                           Recovery  . . . :   See the previous messages in the system log to analyze
                                           the conditions that caused the failure. Make the needed corrections, and
                                           then try the request again.
    


    The program is written in C, but since I did not find the corresponding section on this form, I wrote it here.
    Now I will try to change the SECONLEY parameter.
    May I ask for more details about this parameter? What is his purpose? From the background information is not understood.
    Thank.

  • barbara_morris
    barbara_morris
    606 Posts

    Re: Work with DDM file

    ‏2019-09-10T10:28:25Z  

    Sorry, I wasn't exactly correct when I suggested that you try OVRDBF SEQONLY(*YES). I should have suggested to use SEQONLY(*YES 1), so it would only process one record at a time.

    In C, if you are opening the file with _Ropen, you can specify 'blkrcd=N' to prevent the records from being blocked. But I see that blkrcd=N is the default for _Ropen. 

    https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_74/rtref/ropen.htm

    About blocking records in general, when you open a file for input or output, if records are blocked, it means that the read function for your file will be able to receive a block of records (basically an array of record) instead of receiving the records one at a time, even though only one record at a time is actually given to your program. Blocking records can greatly improve performance.