× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 11-Feb-2014 07:04 -0800, Paul Bailey wrote:

I am using RDi 9.0.1 on v6r1. When I enter a CPYF command into a
CLLE source member I usually have no problem.

When I enter the following into CLLE source, Rational complains with
error "EVFCL0071: Parameter INCREL required.":
CPYF FROMFILE(FILE1) TOFILE(FILE2) MBROPT(*ADD) +
INCREL((*IF FLD1 *EQ ' '))

If FLD1 is not a 1-byte char field, pad the literal value [specified as the fourth element of the first list-element in the INCREL] to the full length of the field FL1 to ensure including records whereby the value of FLD1 is all blanks if that is the intention, versus including records whereby just the first byte of FLD1 is a blank. As coded, the latter is the effect of the request.

I can't prompt (F4) the line. If I remove the INCREL clause, I can
then prompt the line, but I can not "add" the INCREL option with ' '
as the value.

As a workaround I am declaring a variable as ' ' and using the
variable instead of the quoted string, but all of this works fine in
SEU.

<<SNIP>>

As a circumvention for the prompting issue, use of a variable name is acceptable. Be aware however, that care must be taken...

If that circumvention is carried\compiled into the actual code, nuances of using a variable in the actual compiled code to provide a comparison value [in any of the CPYF parameters] may yield unexpected results [for anyone unaware of the how to overcome those nuances]. To effect a comparison against the full length of the field, the variable typically would be declared as one byte longer than the field, with the last byte assigned to any non-blank value, to ensure any blank-padding is accounted for. I suggested in the following archived message, that the INCREL is not eligible for that circumvention of using a larger variable, per error msg CPF2843, so I noted potential alternatives [other than building the command string such that the variable becomes the delimited literal value]: <http://archive.midrange.com/midrange-l/201107/msg00408.html> I doubt that restriction for the longer length variable was ever lifted; FWiW, verified to exist still on v5r3. A number of discussions in the archives exist with tokens CPYF and INCREL; the site seems not to be responding presently, so I did not look for and add any other good links for reference.

The issue is that... A trimmed [non-zero] length of the compare-value from a variable, is the length of data from the field that is compared against; this is similar for a literal compare value, but a padded literal value is seen by the CPP as the full length versus the effective trimmed length. Thus having compared a variable having the value of blanks against a field, yields a one-byte blank compare against the first one byte of data in that field; i.e. if FLD1 in the scenario is a CHAR(1), then there is no issue, however if the FLD1 is CHAR(2_or_greater) then:
A row with FLD1=' LeftPad' will be included in the results for INCREL((*IF FLD1 *EQ &char10)) if the value of &char10 *eq ' '.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.