× 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.



Is the following true for you:
 
Include-relationship values
    are specified only for the INCREL parameter when the from-file is a
    physical or logical file, and are not valid for a copy operation from
    all record formats of a logical file with many formats (when
    RCDFMT(*ALL) is specified).
And were you aware of this:
 
    field-value:  Specify the value (up to 256 characters) to be compared
    with the contents of the specified field.  The specified value cannot
    be another field name.  The field value must be enclosed in
    apostrophes if it contains blanks or special characters, and it may be
    specified in hexadecimal format.  If a CL variable is specified for
    the value, it must be a character variable.  Any non-*NULL comparison
    to a field value in a record that is null will test false, regardless
    of the operator used.  For variable-length fields, specify only the
    data portion of the value, not the 2-byte length portion.
 
    Each field value specified is converted from the displayed format to
    the type defined by the field in the from-file record format.  If a
    value is specified for a character field that is shorter than the
    actual field, the comparison is performed using only the length of the
    character string value.  A value specified for a character field is
    converted from the current job CCSID to the CCSID of the from-file
    field.  A value specified for a numeric field is converted to an
    internal form with the same number of decimal numbers defined in the
    DDS for the field.  For DBCS graphic fields, specify the input string
    (DBCS data) within SO-SI characters.  The SO-SI pair is removed from
    the input string and the remaining DBCS data is converted from the
    associated DBCS CCSID of the current job to the DBCS CCSID of the DBCS
    graphic field.  If a value is either too large for the corresponding
    record format field definition, or cannot be converted to the type
    required for the field, an error message is sent and the copy
    operation is not done.
 
All from the manual...
 

Richard Jackson
mailto:richardjackson@richardjackson.net
http://www.richardjacksonltd.com
Voice: 1 (303) 808-8058
Fax:   1 (303) 663-4325

-----Original Message-----
From: owner-midrange-l@midrange.com [mailto:owner-midrange-l@midrange.com]On Behalf Of RBBaird@premsys.com
Sent: Wednesday, September 27, 2000 8:40 AM
To: MIDRANGE-L@midrange.com
Subject: Re: MIDRANGE-L Digest V3 #727

Hey all,

I've got a problem, and I truly believe IBMs implementation of this feature is wrong, but it IS documented in the CL reference manual.

According to IBM, the cpyf command INCREL parameters works this way when character fields are compared to strings:

"If a value is specified for a character field that is shorter than the actual field, the comparison is performed using only the length of the character string value".

So.... I have a file with the following values:

DQNAME
------
TEST
TEST
TEST1
TEST1
TESTONE
TESTONE
OTHER

I call a CLP.  the value of &NAME is 'TEST      '

       DCL        VAR(&NAME)    TYPE(*CHAR) LEN(10)
      CPYF       FROMFILE(file1) TOFILE(lib1/file2) +
                    MBROPT(*REPLACE) CRTFILE(*YES) +
                    INCREL((*IF DQNAME *EQ &NAME))

Which, when run, interperates to

       CPYF       FROMFILE(file1) TOFILE(lib1/file2) +
                    MBROPT(*REPLACE) CRTFILE(*YES) +
                    INCREL((*IF DQNAME *EQ 'TEST'))

Which copies the first 6 records in the above example, not, as I could have sworn it should have done, just the first two.

This, I firmly believe, is VERY wrong!!!!!  Being that as it may, I still need a work around.

What I need to do is to append at least one space on the end of the character string.

I've tried concatonating quotes around the variable several different ways, but am hitting a brick wall.

The problem is that the copy file command automatically puts the quotes around char strings, which is giving me fits.

Anyone have any idea of a workaround?

Thanks,

Rick

+--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.