IBM Support

RPG Cafe: January 2023 Control the record length for QTEMP/QSQLPRE, avoid RNF0733

News


Abstract

Two enhancements for the RPG compiler to control the record length for the output file created by CRTSQLRPGI when the RPGPPOPT parameter is not *NONE.

Content

You are in: RPG Cafe > Control the record length for QTEMP/QSQLPRE, avoid RNF0733

Short URL: https://ibm.biz/rpgcafe_PPMINOUTLN_qsqlpre

Two enhancements to control the record length of the QTEMP/QSQLPRE output file for CRTSQLRPGI with RPGPPOPT(*LVLx).

If the record length is too small, the compile can fail with RNF0733 ("The record length of the output file is too small.").

With these enhancements, you can control the line length of the source file specified by the PPSRCFILE parameter for CRTBNDRPG or CRTRPGMOD when the RPG compiler is called in pre-processor mode.

The most common reason for the RPG compiler to be called in pre-processor mode is when the CRTSQLRPGI command is specified with RPGPPOPT(*LVL1) or RPGPPOPT(*LVL2). In that case, the SQL precompiler calls the RPG compiler, specifying PPSRCFILE(QTEMP/QSQLPRE).

The actual record length of the file is 12 bytes longer than the line length. For example, if the line length is the default of 100, the record length is 112.

  1. Support for compile-time environment variable QIBM_RPG_PPSRCFILE_LENGTH. When this environment variable is specified with a value between 100 and 32754, the file specified by the PPSRCFILE parameter is created with that line length, if the file does not exist.

    When the environment variable is specified with a numeric value between 100 and 32754:

    Envvar value PPMINOUTLN Value SRCSTMF Max length SRCFILE Line length PPSRCFILE Line length (RCDLEN)
    100 Ignored Ignored Ignored 100 (112)
    250 Ignored Ignored Ignored 250 (262)
    32754 Ignored Ignored Ignored 32754 (32766)
  2. Support for new command parameter PPMINOUTLN (Minimum output length for PPSRCFILE). You can specify a value between 100 and 32754. This parameter specifies the minimum line length for the file specified by the PPSRCFILE parameter. If the file does not exist, the RPG compiler creates the file with the higher of these two values, up to a maximum length of 32754:
    • The value specified by the PPMINOUTLN parameter.
    • The longest line length in the file specified by the SRCFILE or SRCSTMF parameter

    The compiler checks the record length of the main source file only. If you have /COPY or /INCLUDE files with longer record lengths, specify a higher value for PPMINOUTLN so that the output file can hold the records from the /COPY or /INCLUDE files.

    When the environment variable is not specified or it is not between 100 and 32754.

    PPMINOUTLN Value SRCSTMFMax length SRCFILE Line length (RCDLEN) PPSRCFILE Line length (RCDLEN)
    100 50 100 (112)
    100 80 (92) 100 (112)
    100 101 101 (113)
    100 80 (92) 100 (112)
    200 50 200 (212)
    200 80 (92) 200 (212)
    200 100 200 (212)
    200 100 (112) 200 (212)
    200 127 200 (212)
    200 138 (150) 200 (212)
    200 201 201 (213)
    200 201 (213) 201 (213)
.                                                            .
.                                                            .

PTFs for 7.3, 7.4, and 7.5 available in January 2023

7.3:

  • PTF to support environment variable QIBM_RPG_PPSRCFILE_LENGTH: 5770WDS SI82184
  • PTF to support parameter PPMINOUTLN for CRTBNDRPG and CRTRPGMOD: 5770WDS SI82183.

    Warning: Be sure to read the Special Instructions in the cover letter before you apply this PTF. When you apply or remove this PTF, any changes that were made with CHGCMDDFT revert to the shipped defaults.

7.4:

  • PTF to support environment variable QIBM_RPG_PPSRCFILE_LENGTH: 5770WDS SI82178
  • PTF to support parameter PPMINOUTLN for CRTBNDRPG and CRTRPGMOD: 5770WDS SI82179.

    Warning: Be sure to read the Special Instructions in the cover letter before you apply this PTF. When you apply or remove this PTF, any changes that were made with CHGCMDDFT revert to the shipped defaults.

7.5:

  • PTF to support environment variable QIBM_RPG_PPSRCFILE_LENGTH: 5770WDS SI82185
  • PTF to support parameter PPMINOUTLN for CRTBNDRPG and CRTRPGMOD: 5770WDS SI82186.

    Warning: Be sure to read the Special Instructions in the cover letter before you apply this PTF. When you apply or remove this PTF, any changes that were made with CHGCMDDFT revert to the shipped defaults.

The ILE RPG compiler PTFs will also be available with the Db2 for i Fix Packs. See Db2 for IBM i 2020 PTF Group Schedule.

However, the PTFs for the commands will not be in the Db2 for i Fix Packs, and they will not be in any Cumulative PTF.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS69QP","label":"Rational Development Studio for i"},"ARM Category":[{"code":"a8m0z0000000C4BAAU","label":"IBM i"},{"code":"a8m0z0000000CHtAAM","label":"Programming ILE Languages"}],"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.3.0;and future releases"}]

Document Information

Modified date:
17 March 2023

UID

ibm16857461