|
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 #727Hey 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
OTHERI 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 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.